Messages in this thread | | | Date | Thu, 4 Feb 2010 01:53:30 +0100 | From | Frederic Weisbecker <> | Subject | Re: [PATCH RFC tip/core/rcu] v2 accelerate grace period if last non-dynticked CPU |
| |
On Sun, Jan 31, 2010 at 08:24:04PM -0800, Paul E. McKenney wrote: > There is nothing illegal about the following: > > static void my_rcu_callback(struct rcu_head *rcu) > { > struct foo *fp = container_of(rcu, struct foo, rcu_head); > > if (fp->refcnt != 0) { > call_rcu(rcu); > return; > } > kfree(fp); > } > > And allowing RCU_NEEDS_CPU_FLUSHES of infinity would work correctly in > some sense, but would be a massive power inefficiency. > > The choice of "5" allows a callback that posts one other callback, > which happens often enough to be worth the extra iterations. It is > necessary to budget two passes through the loop per level of RCU > callback, one for the current CPU to start the grace period and another > for it to end it. > > Seem reasonable?
Yeah ok, I did not considered situations like the above example.
Thanks.
| |