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: <20110121212245.GN17752@linux.vnet.ibm.com>
Date:	Fri, 21 Jan 2011 13:22:45 -0800
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	Nick Piggin <npiggin@...il.com>, Jeff Moyer <jmoyer@...hat.com>,
	Jan Kara <jack@...e.cz>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [patch] fs: aio fix rcu lookup

On Thu, Jan 20, 2011 at 09:15:55PM +0100, Eric Dumazet wrote:
> Le jeudi 20 janvier 2011 à 12:02 -0800, Paul E. McKenney a écrit :
> > On Fri, Jan 21, 2011 at 05:31:53AM +1100, Nick Piggin wrote:
> > > call_rcu() is the obvious alternative, yes.
> > > 
> > > Basically, once we give in to synchronize_rcu() we're basically giving
> > > up. That's certainly a very good tradeoff for something like filesystem
> > > unregistration or module unload, it buys big simplifications in real
> > > fastpaths. But I just don't think it should be taken lightly.
> > 
> > Makes sense to me!
> > 
> > BTW, on your earlier usage classification:
> > 
> > > I think synchronize_rcu should firstly not be used unless it gives a good
> > > simplification, or speedup in fastpath.
> > >
> > > When that is satified, then it is a question of exactly what kind of slow
> > > path it should be used in. I don't think it should be used in process-
> > > synchronous code (eg syscalls) except for error cases, resource
> > > exhaustion, management syscalls (like module unload).
> > 
> > I don't have any feedback either way on your guidance to where
> > synchronize_rcu() should be used, as I believe that it depends a lot
> > on the details of usage, and would vary from one part of the kernel
> > to another, and possibly also over time.
> > 
> 
> Sometime, a mixture of call_rcu() and synchronize_rcu() is used, to have
> a limit on pending callbacks (eating too much memory)
> 
> net/ipv4/fib_trie.c for example issues call_rcu() most of the time, but
> is able to trigger one synchronize_rcu() if more than XXX (128) pages of
> memory were queued in rcu queues.
> 
> For details, check commit c3059477fce2d956
> (ipv4: Use synchronize_rcu() during trie_rebalance())

Good point!

							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