code: private void preemptTasks(int tasksToPreempt) {
      LOG.info("Start preempt " + tasksToPreempt + " for type " + type);
      long maxRunningTime = configManager.getPreemptedTaskMaxRunningTime();
      int rounds = configManager.getPreemptionRounds();
      while (tasksToPreempt > 0) {
        int preempted = preemptOneSession(tasksToPreempt, maxRunningTime);
        if (preempted == 0) {
          maxRunningTime *= 2;
          // Check for enough rounds or an overflow
          if (--rounds <= 0 || maxRunningTime <= 0) {
            LOG.warn("Cannot preempt enough " + type + " tasks " +
                " rounds " + configManager.getPreemptionRounds() +
                " maxRunningTime " + maxRunningTime +
                " tasks not preempted:" + tasksToPreempt);
            return;
          }
        }
        tasksToPreempt -= preempted;
      }
    }
docs: Kill tasks from over-scheduled sessions
  @param tasksToPreempt The number of tasks should kill