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]
Message-ID: <20091025044755.GA6678@linux.vnet.ibm.com>
Date:	Sat, 24 Oct 2009 21:47:55 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Octavian Purdila <opurdila@...acom.com>
Cc:	Eric Dumazet <eric.dumazet@...il.com>,
	Benjamin LaHaise <bcrl@...et.ca>, netdev@...r.kernel.org,
	Cosmin Ratiu <cratiu@...acom.com>
Subject: Re: [PATCH] net: allow netdev_wait_allrefs() to run faster

On Sun, Oct 25, 2009 at 02:49:00AM +0300, Octavian Purdila wrote:
> On Saturday 24 October 2009 17:24:27 you wrote:
> > Paul E. McKenney a écrit :
> > > On Sat, Oct 24, 2009 at 10:49:55AM +0200, Eric Dumazet wrote:
> > >> On my dev machine, a synchronize_rcu() lasts between 2 an 12 ms
> > >
> > > That sounds like the right range, depending on what else is happening
> > > on the machine at the time.
> > >
> > > The synchronize_rcu_expedited() primitive would run in the 10s-100s
> > > of microseconds.  It involves a pair of wakeups and a pair of context
> > > switches on each CPU.
> > 
> > Hmm... I'll make some experiments Monday and post results, but it seems
> >  very promising.
> > 
> 
> Got some time today and did some experiments myself. The test is deleting 1000 
> dummy interfaces (interface status down, no IP/IPv6 addresses assigned) on a 
> UP non-preempt ppc750 @800Mhz system.
> 
> 1. Ben's patch:
> 
> real    0m 3.42s
> user    0m 0.00s
> sys     0m 0.00s
> 
> 2. Eric's schedule_timeout_uninterruptible(1);
> 
> real    0m 3.00s
> user    0m 0.00s
> sys     0m 0.00s
> 
> 3. Simple synchronize_rcu_expedited()
> 
> This doesn't seem to work well with the UP non-preempt case since 
> synchronize_rcu_expedited() is a noop in this case - turning 
> netdev_wait_allrefs() into a while(1) loop.

Indeed -- but then again, in the UP case, synchronize_rcu() itself
is pretty much a no-op.  So if your main target is UP, you should
be able to have seriously fast RCU updates.

(I know, I know, you want SMP to run fast as well...)

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ