Re: [PATCH v7 08/11] sched: Push put_prev_task() intopick_next_task()

From: Tejun Heo
Date: Thu Jun 06 2013 - 19:56:59 EST


On Wed, May 29, 2013 at 03:03:19PM +0400, Glauber Costa wrote:
> From: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
>
> In order to avoid having to do put/set on a whole cgroup hierarchy
> when we context switch, push the put into pick_next_task() so that
> both operations are in the same function. Further changes then allow
> us to possibly optimize away redundant work.

I suppose this is to optimize out css_put/get() if the previous and
next tasks are in the same group? css refcnt will soon (this week) be
converted to percpu reference counter, so the optimization might not
be as meaningful unless there are other things which are being
optimized.

Thanks.

--
tejun
--
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/