Re: Avoiding the dentry d_lock on final dput(), part deux: transactional memory

2013-10-02 Thread Andi Kleen
Linus Torvalds writes: > On Mon, Sep 30, 2013 at 1:01 PM, Waiman Long wrote: >> >> I think this patch is worth a trial if relevant hardware is more widely >> available. The TSX code certainly need to be moved to an architecture >> specific area and should be runtime enabled using a static key. W

Re: Avoiding the dentry d_lock on final dput(), part deux: transactional memory

2013-10-01 Thread Paul E. McKenney
On Tue, Oct 01, 2013 at 05:16:54AM -0700, Paul E. McKenney wrote: > On Tue, Oct 01, 2013 at 02:52:28PM +1000, Michael Neuling wrote: > > >> Well we don't have to, I think Mikey wasn't totally clear about that > > >> "making all registers volatile" business :-) This is just something we > > >> need

Re: Avoiding the dentry d_lock on final dput(), part deux: transactional memory

2013-10-01 Thread Paul E. McKenney
On Tue, Oct 01, 2013 at 02:52:28PM +1000, Michael Neuling wrote: > >> Well we don't have to, I think Mikey wasn't totally clear about that > >> "making all registers volatile" business :-) This is just something we > >> need to handle in assembly if we are going to reclaim the suspended > >> transa

Re: Avoiding the dentry d_lock on final dput(), part deux: transactional memory

2013-09-30 Thread Michael Neuling
>> Well we don't have to, I think Mikey wasn't totally clear about that >> "making all registers volatile" business :-) This is just something we >> need to handle in assembly if we are going to reclaim the suspended >> transaction. Yeah, sorry. The slow path with all registers as volatile is onl

Re: Avoiding the dentry d_lock on final dput(), part deux: transactional memory

2013-09-30 Thread Paul E. McKenney
On Tue, Oct 01, 2013 at 12:05:03PM +1000, Benjamin Herrenschmidt wrote: > On Mon, 2013-09-30 at 17:56 -0700, Linus Torvalds wrote: > > On Mon, Sep 30, 2013 at 5:36 PM, Michael Neuling wrote: > > > > > > The scary part is that we to make all register volatile. You were not > > > that keen on doing

Re: Avoiding the dentry d_lock on final dput(), part deux: transactional memory

2013-09-30 Thread Benjamin Herrenschmidt
On Mon, 2013-09-30 at 17:56 -0700, Linus Torvalds wrote: > On Mon, Sep 30, 2013 at 5:36 PM, Michael Neuling wrote: > > > > The scary part is that we to make all register volatile. You were not > > that keen on doing this as there are a lot of places in exception > > entry/exit where we only save/

Re: Avoiding the dentry d_lock on final dput(), part deux: transactional memory

2013-09-30 Thread Linus Torvalds
On Mon, Sep 30, 2013 at 5:36 PM, Michael Neuling wrote: > > The scary part is that we to make all register volatile. You were not > that keen on doing this as there are a lot of places in exception > entry/exit where we only save/restore a subset of the registers. We'd > need to catch all these.

Re: Avoiding the dentry d_lock on final dput(), part deux: transactional memory

2013-09-30 Thread Michael Neuling
Ben, > On Mon, 2013-09-30 at 12:29 -0700, Linus Torvalds wrote: > > > > But I'm cc'ing the POWER people, because I don't know the POWER8 > > interfaces, and I don't want to necessarily call this "xbegin"/"xend" > > when I actually wrap it in some helper functions. > > The main problem with power

Re: Avoiding the dentry d_lock on final dput(), part deux: transactional memory

2013-09-30 Thread Benjamin Herrenschmidt
On Mon, 2013-09-30 at 12:29 -0700, Linus Torvalds wrote: > > But I'm cc'ing the POWER people, because I don't know the POWER8 > interfaces, and I don't want to necessarily call this "xbegin"/"xend" > when I actually wrap it in some helper functions. The main problem with powerpc TM is that we nee

Re: Avoiding the dentry d_lock on final dput(), part deux: transactional memory

2013-09-30 Thread Waiman Long
On 09/30/2013 03:29 PM, Linus Torvalds wrote: So with all the lockref work, we now avoid the dentry d_lock for almost all normal cases. There is one single remaining common case, though: the final dput() when the dentry count goes down to zero, and we need to check if we are supposed to get rid

Re: Avoiding the dentry d_lock on final dput(), part deux: transactional memory

2013-09-30 Thread Linus Torvalds
On Mon, Sep 30, 2013 at 1:01 PM, Waiman Long wrote: > > I think this patch is worth a trial if relevant hardware is more widely > available. The TSX code certainly need to be moved to an architecture > specific area and should be runtime enabled using a static key. We also need > more TSX support

Avoiding the dentry d_lock on final dput(), part deux: transactional memory

2013-09-30 Thread Linus Torvalds
So with all the lockref work, we now avoid the dentry d_lock for almost all normal cases. There is one single remaining common case, though: the final dput() when the dentry count goes down to zero, and we need to check if we are supposed to get rid of the dentry (or at least put it on the LRU lis