Re: [RFC][PATCH 3/3] sched: On-demand tg_shares_up()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul Turner
Date: Thursday, September 2, 2010 - 6:52 pm

On Sat, Aug 28, 2010 at 11:30 PM, Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:

This will multiply visit taskgroups:

In the case of a-b-task, both {a} and {b} will be on the leaf cfs_rq
list.  Resulting in a being visited both as b's parent and as a leaf
entity.

Rather than juggling to avoid this, it seems easier to maintain an
ordering on rq->leaf_cfs_rq_list.

That is:

When an entity is added:
a) If it has a parent, insert it immediately before the parent in the list.
b) Otherwise it is attached to the root, attach it to the tail of
rq->leaf_cfs_rq_list

This can actually be simplified to: if no parent insert at the tail,
otherwise insert at the head, since we know the parent will always
have been processed prior to the child.

Traversing the list in order should then ensure that all child
entities have been processed for the 'next' entity at any given time
and that its update is coherent.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC][PATCH 0/3] Try and make cpu-cgroup suck less, Peter Zijlstra, (Sat Aug 28, 3:30 pm)
[RFC][PATCH 1/3] sched: Rewrite tg_shares_up, Peter Zijlstra, (Sat Aug 28, 3:30 pm)
[RFC][PATCH 2/3] sched: On-demand cfs_rq list, Peter Zijlstra, (Sat Aug 28, 3:30 pm)
[RFC][PATCH 3/3] sched: On-demand tg_shares_up(), Peter Zijlstra, (Sat Aug 28, 3:30 pm)
Re: [RFC][PATCH 1/3] sched: Rewrite tg_shares_up, Srivatsa Vaddagiri, (Mon Aug 30, 10:20 am)
Re: [RFC][PATCH 1/3] sched: Rewrite tg_shares_up, Peter Zijlstra, (Mon Aug 30, 10:53 am)
Re: [RFC][PATCH 3/3] sched: On-demand tg_shares_up(), Paul Turner, (Thu Sep 2, 6:52 pm)
Re: [RFC][PATCH 1/3] sched: Rewrite tg_shares_up, Paul Turner, (Thu Sep 2, 8:09 pm)
Re: [RFC][PATCH 2/3] sched: On-demand cfs_rq list, Paul Turner, (Thu Sep 2, 8:33 pm)
Re: [RFC][PATCH 2/3] sched: On-demand cfs_rq list, Peter Zijlstra, (Fri Sep 3, 12:59 am)
Re: [RFC][PATCH 1/3] sched: Rewrite tg_shares_up, Peter Zijlstra, (Fri Sep 3, 12:59 am)
Re: [RFC][PATCH 3/3] sched: On-demand tg_shares_up(), Peter Zijlstra, (Fri Sep 3, 12:59 am)