Re: [patch 08/15] sched: throttle cfs_rq entities which exceedtheir local runtime

From: Peter Zijlstra
Date: Mon May 16 2011 - 12:05:31 EST


On Tue, 2011-05-03 at 02:28 -0700, Paul Turner wrote:
> + task_delta = -cfs_rq->h_nr_running;
> + for_each_sched_entity(se) {
> + struct cfs_rq *qcfs_rq = cfs_rq_of(se);
> + /* throttled entity or throttle-on-deactivate */
> + if (!se->on_rq)
> + break;
> +
> + if (dequeue)
> + dequeue_entity(qcfs_rq, se, DEQUEUE_SLEEP);
> + qcfs_rq->h_nr_running += task_delta;
> +
> + if (qcfs_rq->load.weight)
> + dequeue = 0;
> + }
> +
> + if (!se)
> + rq->nr_running += task_delta;

So throttle is like dequeue, it removes tasks, so why then insist on
writing it like its adding tasks? (I see you're adding a negative
number, but its all just weird).
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/