Re: [PATCH/RFC] VFS: don't keep disconnected dentries on d_anon

2017-12-20 Thread Al Viro
On Wed, Dec 20, 2017 at 04:57:28PM -0800, Linus Torvalds wrote: > On Wed, Dec 20, 2017 at 2:45 PM, NeilBrown wrote: > > > > We could just leave the code unchanged, but apart from that being > > potentially confusing, the (unfair) bit-spin-lock which protects > > s_anon can become a bottle neck whe

Re: [PATCH/RFC] VFS: don't keep disconnected dentries on d_anon

2017-12-20 Thread Linus Torvalds
On Wed, Dec 20, 2017 at 2:45 PM, NeilBrown wrote: > > We could just leave the code unchanged, but apart from that being > potentially confusing, the (unfair) bit-spin-lock which protects > s_anon can become a bottle neck when lots of disconnected dentries are > being created. > > So this patch ren

Re: [PATCH/RFC] VFS: don't keep disconnected dentries on d_anon

2017-12-20 Thread Al Viro
On Thu, Dec 21, 2017 at 09:45:40AM +1100, NeilBrown wrote: > -c/ Helper routines to allocate anonymous dentries, and to help attach > + prefix. If the refcount on a dentry with this flag set > + becomes zero, the dentry is immediately discarded, rather than being > + kept in the dcache. If

Re: [PATCH/RFC] VFS: don't keep disconnected dentries on d_anon

2017-12-20 Thread NeilBrown
On Wed, Dec 20 2017, Matthew Wilcox wrote: > On Thu, Dec 21, 2017 at 09:45:40AM +1100, NeilBrown wrote: >> -c/ Helper routines to allocate anonymous dentries, and to help attach >> + prefix. If the refcount on a dentry with this flag set >> + becomes zero, the dentry is immediately discarded,

Re: [PATCH/RFC] VFS: don't keep disconnected dentries on d_anon

2017-12-20 Thread Matthew Wilcox
On Thu, Dec 21, 2017 at 09:45:40AM +1100, NeilBrown wrote: > -c/ Helper routines to allocate anonymous dentries, and to help attach > + prefix. If the refcount on a dentry with this flag set > + becomes zero, the dentry is immediately discarded, rather than being > + kept in the dcache. If

[PATCH/RFC] VFS: don't keep disconnected dentries on d_anon

2017-12-20 Thread NeilBrown
The original purpose of the per-superblock d_anon list was to keep disconnected dentries in the cache between consecutive requests to the NFS server. Dentries can be disconnected if a client holds a file open and repeatedly performs IO on it, and if the server drops the dentry, whether due to mem