lkml.org 
[lkml]   [2010]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.



\
 
 \ /
  Last update: 2010-02-04 01:55    [W:0.055 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site