lkml.org 
[lkml]   [2010]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 0/2] rcu: Fix series of spurious RCU softirqs
On 11/24/2010 08:31 AM, Frederic Weisbecker wrote:
> Hi,
>
> I've observed some not so unfrequent series of spurious rcu
> softirqs, sometimes happening at each ticks for a random
> while.
>
> These patches aims at fixing them.
>
> Thanks.
>
> Frederic Weisbecker (2):
> rcu: Don't chase unnecessary quiescent states after extended grace periods
> rcu: Stop checking quiescent states after grace period completion from remote
>

If we ensure rdp->gpnum >= rdp->completed is always true, the problems as
you described will not be existed. Or maybe I misunderstand you.

rdp->gpnum >= rdp->completed is a very important guarantee I think.
(In my RCURING, it is guaranteed.) I'm afraid there are some other
problems still hidden if it is not guaranteed.

so I recommend: (code is better than words)

diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index d5bc439..af4e87a 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -648,6 +648,13 @@ __rcu_process_gp_end(struct rcu_state *rsp, struct rcu_node *rnp, struct rcu_dat

/* Remember that we saw this grace-period completion. */
rdp->completed = rnp->completed;
+
+ /* Ensure ->gpnum >= ->completed after NO_HZ */
+ if (unlikely(rnp->completed - rdp->gpnum > 0
+ || rdp->gpnum - rnp->gpnum > 0)) {
+ rdp->gpnum = rnp->completed;
+ rdp->qs_pending = 0;
+ }
}
}


\
 
 \ /
  Last update: 2010-11-25 04:43    [W:0.057 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site