Re: [PATCH v5 03/78] xarray: Add the xa_lock to the radix_tree_root

2018-01-02 Thread Matthew Wilcox
On Tue, Jan 02, 2018 at 10:01:55AM -0800, Darrick J. Wong wrote: > On Tue, Dec 26, 2017 at 07:58:15PM -0800, Matthew Wilcox wrote: > > spin_lock_irqsave(>pages, flags); > > __delete_from_page_cache(page, NULL); > > spin_unlock_irqrestore(>pages, flags); > > > > More details

Re: [PATCH v5 03/78] xarray: Add the xa_lock to the radix_tree_root

2018-01-02 Thread Matthew Wilcox
On Tue, Jan 02, 2018 at 10:01:55AM -0800, Darrick J. Wong wrote: > On Tue, Dec 26, 2017 at 07:58:15PM -0800, Matthew Wilcox wrote: > > spin_lock_irqsave(>pages, flags); > > __delete_from_page_cache(page, NULL); > > spin_unlock_irqrestore(>pages, flags); > > > > More details

Re: [PATCH v5 03/78] xarray: Add the xa_lock to the radix_tree_root

2018-01-02 Thread Darrick J. Wong
On Tue, Dec 26, 2017 at 07:58:15PM -0800, Matthew Wilcox wrote: > On Tue, Dec 26, 2017 at 07:43:40PM -0800, Matthew Wilcox wrote: > > Also add the xa_lock() and xa_unlock() family of wrappers to make it > > easier to use the lock. If we could rely on -fplan9-extensions in > > the

Re: [PATCH v5 03/78] xarray: Add the xa_lock to the radix_tree_root

2018-01-02 Thread Darrick J. Wong
On Tue, Dec 26, 2017 at 07:58:15PM -0800, Matthew Wilcox wrote: > On Tue, Dec 26, 2017 at 07:43:40PM -0800, Matthew Wilcox wrote: > > Also add the xa_lock() and xa_unlock() family of wrappers to make it > > easier to use the lock. If we could rely on -fplan9-extensions in > > the

Re: [PATCH v5 03/78] xarray: Add the xa_lock to the radix_tree_root

2017-12-27 Thread Kirill A. Shutemov
On Tue, Dec 26, 2017 at 07:58:15PM -0800, Matthew Wilcox wrote: > On Tue, Dec 26, 2017 at 07:43:40PM -0800, Matthew Wilcox wrote: > > Also add the xa_lock() and xa_unlock() family of wrappers to make it > > easier to use the lock. If we could rely on -fplan9-extensions in > > the

Re: [PATCH v5 03/78] xarray: Add the xa_lock to the radix_tree_root

2017-12-27 Thread Kirill A. Shutemov
On Tue, Dec 26, 2017 at 07:58:15PM -0800, Matthew Wilcox wrote: > On Tue, Dec 26, 2017 at 07:43:40PM -0800, Matthew Wilcox wrote: > > Also add the xa_lock() and xa_unlock() family of wrappers to make it > > easier to use the lock. If we could rely on -fplan9-extensions in > > the

Re: [PATCH v5 03/78] xarray: Add the xa_lock to the radix_tree_root

2017-12-27 Thread Kirill A. Shutemov
On Tue, Dec 26, 2017 at 07:43:40PM -0800, Matthew Wilcox wrote: > On Tue, Dec 26, 2017 at 07:54:40PM +0300, Kirill A. Shutemov wrote: > > On Fri, Dec 15, 2017 at 02:03:35PM -0800, Matthew Wilcox wrote: > > > From: Matthew Wilcox > > > > > > This results in no change in

Re: [PATCH v5 03/78] xarray: Add the xa_lock to the radix_tree_root

2017-12-27 Thread Kirill A. Shutemov
On Tue, Dec 26, 2017 at 07:43:40PM -0800, Matthew Wilcox wrote: > On Tue, Dec 26, 2017 at 07:54:40PM +0300, Kirill A. Shutemov wrote: > > On Fri, Dec 15, 2017 at 02:03:35PM -0800, Matthew Wilcox wrote: > > > From: Matthew Wilcox > > > > > > This results in no change in structure size on 64-bit

Re: [PATCH v5 03/78] xarray: Add the xa_lock to the radix_tree_root

2017-12-26 Thread Matthew Wilcox
On Tue, Dec 26, 2017 at 07:43:40PM -0800, Matthew Wilcox wrote: > Also add the xa_lock() and xa_unlock() family of wrappers to make it > easier to use the lock. If we could rely on -fplan9-extensions in > the compiler, we could avoid all of this syntactic sugar, but that > wasn't

Re: [PATCH v5 03/78] xarray: Add the xa_lock to the radix_tree_root

2017-12-26 Thread Matthew Wilcox
On Tue, Dec 26, 2017 at 07:43:40PM -0800, Matthew Wilcox wrote: > Also add the xa_lock() and xa_unlock() family of wrappers to make it > easier to use the lock. If we could rely on -fplan9-extensions in > the compiler, we could avoid all of this syntactic sugar, but that > wasn't

Re: [PATCH v5 03/78] xarray: Add the xa_lock to the radix_tree_root

2017-12-26 Thread Matthew Wilcox
On Tue, Dec 26, 2017 at 07:54:40PM +0300, Kirill A. Shutemov wrote: > On Fri, Dec 15, 2017 at 02:03:35PM -0800, Matthew Wilcox wrote: > > From: Matthew Wilcox > > > > This results in no change in structure size on 64-bit x86 as it fits in > > the padding between the gfp_t

Re: [PATCH v5 03/78] xarray: Add the xa_lock to the radix_tree_root

2017-12-26 Thread Matthew Wilcox
On Tue, Dec 26, 2017 at 07:54:40PM +0300, Kirill A. Shutemov wrote: > On Fri, Dec 15, 2017 at 02:03:35PM -0800, Matthew Wilcox wrote: > > From: Matthew Wilcox > > > > This results in no change in structure size on 64-bit x86 as it fits in > > the padding between the gfp_t and the void *. > >

Re: [PATCH v5 03/78] xarray: Add the xa_lock to the radix_tree_root

2017-12-26 Thread Kirill A. Shutemov
On Fri, Dec 15, 2017 at 02:03:35PM -0800, Matthew Wilcox wrote: > From: Matthew Wilcox > > This results in no change in structure size on 64-bit x86 as it fits in > the padding between the gfp_t and the void *. The patch does more than described in the subject and commit

Re: [PATCH v5 03/78] xarray: Add the xa_lock to the radix_tree_root

2017-12-26 Thread Kirill A. Shutemov
On Fri, Dec 15, 2017 at 02:03:35PM -0800, Matthew Wilcox wrote: > From: Matthew Wilcox > > This results in no change in structure size on 64-bit x86 as it fits in > the padding between the gfp_t and the void *. The patch does more than described in the subject and commit message. At first I was

[PATCH v5 03/78] xarray: Add the xa_lock to the radix_tree_root

2017-12-15 Thread Matthew Wilcox
From: Matthew Wilcox This results in no change in structure size on 64-bit x86 as it fits in the padding between the gfp_t and the void *. Signed-off-by: Matthew Wilcox --- fs/f2fs/gc.c | 2 +- include/linux/idr.h|

[PATCH v5 03/78] xarray: Add the xa_lock to the radix_tree_root

2017-12-15 Thread Matthew Wilcox
From: Matthew Wilcox This results in no change in structure size on 64-bit x86 as it fits in the padding between the gfp_t and the void *. Signed-off-by: Matthew Wilcox --- fs/f2fs/gc.c | 2 +- include/linux/idr.h| 12 ++-- include/linux/radix-tree.h