Re: [PATCH 1/4] kernfs: switch kernfs to use an rwsem

2020-06-08 Thread Ian Kent
On Sun, 2020-06-07 at 16:40 +0800, Ian Kent wrote: > Hi Greg, > > On Mon, 2020-05-25 at 13:47 +0800, Ian Kent wrote: > > @@ -189,9 +189,9 @@ int kernfs_iop_getattr(const struct path *path, > > struct kstat *stat, > > struct inode *inode = d_inode(path->dentry); > > struct kernfs_node *kn

Re: [PATCH 1/4] kernfs: switch kernfs to use an rwsem

2020-06-07 Thread Ian Kent
Hi Greg, On Mon, 2020-05-25 at 13:47 +0800, Ian Kent wrote: > @@ -189,9 +189,9 @@ int kernfs_iop_getattr(const struct path *path, > struct kstat *stat, > struct inode *inode = d_inode(path->dentry); > struct kernfs_node *kn = inode->i_private; > > - mutex_lock(_mutex); > +

[PATCH 1/4] kernfs: switch kernfs to use an rwsem

2020-05-24 Thread Ian Kent
The kernfs global lock restricts the ability to perform kernfs node lookup operations in parallel. Change the kernfs mutex to an rwsem so that, when oppertunity arises, node searches can be done in parallel. Signed-off-by: Ian Kent --- fs/kernfs/dir.c | 119