Re: [PATCH v2 3/3] vfs: Use per-cpu list for superblock's inode list

2016-02-23 Thread Waiman Long
On 02/22/2016 08:04 AM, Jan Kara wrote: On Mon 22-02-16 13:12:22, Peter Zijlstra wrote: On Mon, Feb 22, 2016 at 12:54:35PM +0100, Jan Kara wrote: Also, I think fsnotify_unmount_inodes() (as per mainline) is missing a final iput(need_iput) at the very end, but I could be mistaken, that code hurt

Re: [PATCH v2 3/3] vfs: Use per-cpu list for superblock's inode list

2016-02-23 Thread Waiman Long
On 02/21/2016 04:34 PM, Dave Chinner wrote: On Fri, Feb 19, 2016 at 04:10:45PM -0500, Waiman Long wrote: +/* + * Superblock's inode list iterator function and arguments macros + */ +#define SB_INODES_ITER_FUNC(name, lock, struct_fields) \ + struct name ## _arg {

Re: [PATCH v2 3/3] vfs: Use per-cpu list for superblock's inode list

2016-02-22 Thread Jan Kara
On Tue 23-02-16 08:08:14, Dave Chinner wrote: > On Mon, Feb 22, 2016 at 02:04:35PM +0100, Jan Kara wrote: > > On Mon 22-02-16 13:12:22, Peter Zijlstra wrote: > > > On Mon, Feb 22, 2016 at 12:54:35PM +0100, Jan Kara wrote: > > > > > Also, I think fsnotify_unmount_inodes() (as per mainline) is missin

Re: [PATCH v2 3/3] vfs: Use per-cpu list for superblock's inode list

2016-02-22 Thread Dave Chinner
On Mon, Feb 22, 2016 at 02:04:35PM +0100, Jan Kara wrote: > On Mon 22-02-16 13:12:22, Peter Zijlstra wrote: > > On Mon, Feb 22, 2016 at 12:54:35PM +0100, Jan Kara wrote: > > > > Also, I think fsnotify_unmount_inodes() (as per mainline) is missing a > > > > final iput(need_iput) at the very end, but

Re: [PATCH v2 3/3] vfs: Use per-cpu list for superblock's inode list

2016-02-22 Thread Jan Kara
On Mon 22-02-16 13:12:22, Peter Zijlstra wrote: > On Mon, Feb 22, 2016 at 12:54:35PM +0100, Jan Kara wrote: > > > Also, I think fsnotify_unmount_inodes() (as per mainline) is missing a > > > final iput(need_iput) at the very end, but I could be mistaken, that > > > code hurts my brain. > > > > I t

Re: [PATCH v2 3/3] vfs: Use per-cpu list for superblock's inode list

2016-02-22 Thread Peter Zijlstra
On Mon, Feb 22, 2016 at 12:54:35PM +0100, Jan Kara wrote: > > Also, I think fsnotify_unmount_inodes() (as per mainline) is missing a > > final iput(need_iput) at the very end, but I could be mistaken, that > > code hurts my brain. > > I think the code is actually correct since need_iput contains "

Re: [PATCH v2 3/3] vfs: Use per-cpu list for superblock's inode list

2016-02-22 Thread Jan Kara
On Mon 22-02-16 10:18:44, Peter Zijlstra wrote: > On Mon, Feb 22, 2016 at 08:34:19AM +1100, Dave Chinner wrote: > > On Fri, Feb 19, 2016 at 04:10:45PM -0500, Waiman Long wrote: > > > +/* > > > + * Superblock's inode list iterator function and arguments macros > > > + */ > > > +#define SB_INODES_ITE

Re: [PATCH v2 3/3] vfs: Use per-cpu list for superblock's inode list

2016-02-22 Thread Peter Zijlstra
On Mon, Feb 22, 2016 at 08:34:19AM +1100, Dave Chinner wrote: > On Fri, Feb 19, 2016 at 04:10:45PM -0500, Waiman Long wrote: > > +/* > > + * Superblock's inode list iterator function and arguments macros > > + */ > > +#define SB_INODES_ITER_FUNC(name, lock, struct_fields) > > \

Re: [PATCH v2 3/3] vfs: Use per-cpu list for superblock's inode list

2016-02-21 Thread Dave Chinner
On Fri, Feb 19, 2016 at 04:10:45PM -0500, Waiman Long wrote: > +/* > + * Superblock's inode list iterator function and arguments macros > + */ > +#define SB_INODES_ITER_FUNC(name, lock, struct_fields) > \ > + struct name ## _arg {

[PATCH v2 3/3] vfs: Use per-cpu list for superblock's inode list

2016-02-19 Thread Waiman Long
When many threads are trying to add or delete inode to or from a superblock's s_inodes list, spinlock contention on the list can become a performance bottleneck. This patch changes the s_inodes field to become a per-cpu list with per-cpu spinlocks. With an exit microbenchmark that creates a large