lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 22 Mar 2009 09:53:24 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Arjan van de Ven <arjan@...radead.org>
Cc:	Eric Dumazet <dada1@...mosbay.com>, dipankar@...ibm.com,
	linux-input@...r.kernel.org, dmitry.torokhov@...il.com,
	linux-kernel@...r.kernel.org
Subject: Re: Question about usage of RCU in the input layer

On Sat, Mar 21, 2009 at 10:53:18PM -0700, Arjan van de Ven wrote:
> On Sat, 21 Mar 2009 22:18:22 -0700
> "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com> wrote:
> 
> > > I'm measuring the time that the following code takes:
> > > 
> > >         init_completion(&rcu.completion);
> > >         /* Will wake me after RCU finished. */
> > >         call_rcu(&rcu.head, wakeme_after_rcu);
> > >         /* Wait for it. */
> > >         wait_for_completion(&rcu.completion);
> > > 
> 
> > 
> > No, my confusion -- I misread as 2700 milliseconds rather than 2700
> > -microseconds-.  2700 microseconds (or 2.7 milliseconds) is in the
> > expected range for synchronize_rcu() on an HZ=1000 system.  2.7
> > seconds would of course be way out of line.
> 
> > > > If the former, exactly which kernel are you using?  The single-CPU
> > > > optimization was added in 2.6.29-rc7, commit ID a682604838.
> > > 
> > > a bit after -rc8, specifically  commit
> > > 5bee17f18b595937e6beafeee5197868a3f74a06
> > 
> > How many synchronize_rcu() calls are you seeing on the boot path?
> 
> I see 20 that hit the above code path (eg ones that wait) until
> userspace starts.

So with well-behaved readers, the full sequence would be worth
something like 50-60 milliseconds.

> > Also, are you running with NO_HZ=y?
> 
> of course...  is there any other way ? ;-)

Well, if it does become necessary to make common-case no-readers
execution of synchronize_rcu() go faster, you certainly have made the
correct choice.  ;-)

						Thanx, Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ