lkml.org 
[lkml]   [2011]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 8/9] jrcu: fix broken rcu_barrier
    On Wed, Mar 23, 2011 at 02:35:24AM -0400, Paul E. McKenney wrote:
    > On Mon, Mar 14, 2011 at 06:09:28PM -0400, Joe Korty wrote:
    > > On Mon, Mar 14, 2011 at 04:47:18AM -0400, Paul E. McKenney wrote:
    > > > On Sun, Mar 13, 2011 at 11:50:44PM -0400, Joe Korty wrote:
    > > > > +void rcu_barrier(void)
    > > > > +{
    > > > > + synchronize_sched();
    > > > > + synchronize_sched();
    > > > > +}
    > > >
    > > > This is still broken. You need to wait until all pre-existing RCU
    > > > callbacks on all CPUs have been invoked. Although this does guarantee
    > > > that all callbacks on the current CPU have been invoked, if one of the
    > > > other CPUs is busy, it might not yet have processed the callbacks from
    > > > earlier grace periods. The usual way to take care of this is to post
    > > > a callback on each CPU, then wait for them all to be invoked.
    > >
    > > Hi Paul,
    > > JRCU (eventually) chains together all callbacks from all
    > > cpus into a single queue and then it expires that single
    > > queue. So the double synchronize_sched() should work as
    > > a rcu_barrier implementation.
    >
    > Hello, Joe,
    >
    > So the following grace period is not permitted to start until all of
    > the callbacks from the prior grace period have been invoked?

    Yes, it is all synchronized. Every cpu's current batch is
    closed off at the same time. We tolerate some fuzz in the
    timing, but that is not the same as being unsynchronized.

    This happens as an automatic side effect of doing
    everything (except for call_rcu) from a single CPU.

    Joe


    \
     
     \ /
      Last update: 2011-03-23 14:51    [W:3.177 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site