On Fri, Mar 04, 2022 at 05:29:08PM +0100, Halil Pasic wrote:
> No problem, I can do that. It isn't hard to squash things together, but
> when I was about to write the commit message, I had the feeling doing
> a revert is cleaner.
>
> Any other opinions?
One patch, not two.
___
On Sat, Dec 25, 2021 at 09:16:55AM +, Hyeonggon Yoo wrote:
> # mm: Convert struct page to struct slab in functions used by other subsystems
> I'm not familiar with kasan, but to ask:
> Does kasan_slab_free detect invalid free if someone frees
> an object that is not allocated from slab?
>
On Mon, Dec 20, 2021 at 01:47:54AM +0100, Vlastimil Babka wrote:
> > * mm/slub: Convert print_page_info() to print_slab_info()
> > Do we really need to explicitly convert slab_folio()'s result to (struct
> > folio *)?
>
> Unfortunately yes, as long as folio_flags() don't take const struct folio *
On Wed, Dec 01, 2021 at 07:15:06PM +0100, Vlastimil Babka wrote:
> From: "Matthew Wilcox (Oracle)"
>
> page->freelist is for the use of slab. We already have the ability
> to free a list of pages in the core mm, but it requires the use of a
> list_head and for the
On Thu, Oct 14, 2021 at 05:17:18PM +0100, Robin Murphy wrote:
> On 2021-10-14 12:52, John Garry wrote:
> > On 14/10/2021 12:20, Matthew Wilcox wrote:
> > > I'm going to keep pinging this patch weekly.
> > >
> > > On Thu, Oct 07, 2021 at 07:17:02PM
I'm going to keep pinging this patch weekly.
On Thu, Oct 07, 2021 at 07:17:02PM +0100, Matthew Wilcox wrote:
> ping?
>
> On Thu, Sep 30, 2021 at 05:20:42PM +0100, Matthew Wilcox (Oracle) wrote:
> > page->freelist is for the use of slab. We already have the ability
> &g
ping?
On Thu, Sep 30, 2021 at 05:20:42PM +0100, Matthew Wilcox (Oracle) wrote:
> page->freelist is for the use of slab. We already have the ability
> to free a list of pages in the core mm, but it requires the use of a
> list_head and for the pages to be chained together throu
page->freelist is for the use of slab. We already have the ability
to free a list of pages in the core mm, but it requires the use of a
list_head and for the pages to be chained together through page->lru.
Switch the iommu code over to using free_pages_list().
Signed-off-by: Matthew
On Tue, Feb 09, 2021 at 08:20:18PM +0800, Zhou Wang wrote:
> Agree, will add it in next version.
No, don't do another version. Jason is right, this approach is wrong.
The point of SVA is that it doesn't require the application to do
anything special. If jitter from too-frequent page migration is
On Sun, Feb 07, 2021 at 10:24:28PM +, Song Bao Hua (Barry Song) wrote:
> > > In high-performance I/O cases, accelerators might want to perform
> > > I/O on a memory without IO page faults which can result in dramatically
> > > increased latency. Current memory related APIs could not achieve thi
On Sun, Feb 07, 2021 at 04:18:03PM +0800, Zhou Wang wrote:
> SVA(share virtual address) offers a way for device to share process virtual
> address space safely, which makes more convenient for user space device
> driver coding. However, IO page faults may happen when doing DMA
> operations. As the
On Mon, Sep 14, 2020 at 04:44:16PM +0200, Christoph Hellwig wrote:
> I'm still a little unsure about the API naming, as alloc_pages sort of
> implies a struct page return value, but we return a kernel virtual
> address.
Erm ... dma_alloc_pages() returns a struct page, so is this sentence
stale?
>
On Mon, Sep 14, 2020 at 04:44:27PM +0200, Christoph Hellwig wrote:
> drivers/net/ethernet/i825xx/lasi_82596.c | 25 ++---
> drivers/net/ethernet/i825xx/lib82596.c | 114 ++-
> drivers/net/ethernet/i825xx/sni_82596.c | 4 -
> drivers/net/ethernet/seeq/sgiseeq.c | 28
On Tue, Sep 01, 2020 at 06:41:12PM +0200, Helge Deller wrote:
> > I still have a zoo of machines running for such testing, including a
> > 715/64 and two 730.
> > I'm going to test this git tree on the 715/64:
The 715/64 is a 7100LC machine though. I think you need to boot on
the 730 to test the
On Tue, Sep 01, 2020 at 07:52:40AM -0700, James Bottomley wrote:
> I think this looks mostly OK, except for one misnamed parameter below.
> Unfortunately, the last non-coherent parisc was the 700 series and I no
> longer own a box, so I can't test that part of it (I can fire up the
> C360 to test
On Wed, Apr 08, 2020 at 05:12:03PM +0200, Peter Zijlstra wrote:
> On Wed, Apr 08, 2020 at 08:01:00AM -0700, Randy Dunlap wrote:
> > Hi,
> >
> > On 4/8/20 4:59 AM, Christoph Hellwig wrote:
> > > diff --git a/mm/Kconfig b/mm/Kconfig
> > > index 36949a9425b8..614cc786b519 100644
> > > --- a/mm/Kconfi
On Wed, Nov 27, 2019 at 03:40:05PM +0100, Christoph Hellwig wrote:
> +/**
> + * dma_addressing_limited - return if the device is addressing limited
> + * @dev: device to check
> + *
> + * Return %true if the devices DMA mask is too small to address all memory in
Could I trouble you to use a :
I'm looking at commit 562831747f6299abd481b5b00bd4fa19d5c8a259
which fails to adequately explain why we can't use PASID 0. Commit
af39507305fb83a5d3c475c2851f4d59545d8a18 also doesn't explain why PASID
0 is no longer usable for the intel-svm driver.
There are a load of simplifications that coul
On Thu, Feb 07, 2019 at 09:19:47PM +0530, Souptick Joarder wrote:
> Just thought to take opinion for documentation before placing it in v3.
> Does it looks fine ?
>
> +/**
> + * __vm_insert_range - insert range of kernel pages into user vma
> + * @vma: user vma to map to
> + * @pages: pointer to a
On Fri, Dec 07, 2018 at 03:34:56PM +, Robin Murphy wrote:
> > +int vm_insert_range(struct vm_area_struct *vma, unsigned long addr,
> > + struct page **pages, unsigned long page_count)
> > +{
> > + unsigned long uaddr = addr;
> > + int ret = 0, i;
>
> Some of the sites bei
On Fri, Dec 07, 2018 at 02:16:19PM +0800, Nicolas Boichat wrote:
> +#ifdef CONFIG_ZONE_DMA32
> +#define ARM_V7S_TABLE_GFP_DMA GFP_DMA32
> +#define ARM_V7S_TABLE_SLAB_CACHE SLAB_CACHE_DMA32
This name doesn't make any sense. Why not ARM_V7S_TABLE_SLAB_FLAGS ?
> +#else
> +#define ARM_V7S_TABLE_GFP_
On Tue, Dec 04, 2018 at 12:28:54PM -0800, Andrew Morton wrote:
> On Tue, 4 Dec 2018 12:18:01 -0800 Matthew Wilcox wrote:
> > I only had a review comment on 8/9, which I then withdrew during my review
> > of patch 9/9. Unless I missed something during my re-review of my
> >
On Tue, Dec 04, 2018 at 12:14:43PM -0800, Andrew Morton wrote:
> On Tue, 4 Dec 2018 11:22:34 -0500 Tony Battersby
> wrote:
>
> > On 11/13/18 1:36 AM, Matthew Wilcox wrote:
> > > On Mon, Nov 12, 2018 at 10:46:35AM -0500, Tony Battersby wrote:
> > >>
On Fri, Nov 23, 2018 at 05:23:06PM +, Robin Murphy wrote:
> On 15/11/2018 15:49, Souptick Joarder wrote:
> > Convert to use vm_insert_range() to map range of kernel
> > memory to user vma.
> >
> > Signed-off-by: Souptick Joarder
> > Reviewed-by: Matthew Wi
On Thu, Nov 22, 2018 at 12:26:02AM -0800, Christoph Hellwig wrote:
> On Wed, Nov 21, 2018 at 06:35:58PM -0800, Matthew Wilcox wrote:
> > I think you should look at using the page_frag allocator here. You can
> > use whatever GFP_DMA flags you like.
>
> So I actually trie
On Wed, Nov 21, 2018 at 10:26:26PM +, Robin Murphy wrote:
> These are IOMMU page tables, rather than CPU ones, so we're already well
> outside arch code - indeed the original motivation of io-pgtable was to be
> entirely independent of the p*d types and arch-specific MM code (this Armv7
> short
On Wed, Nov 21, 2018 at 06:20:02PM +, Christopher Lameter wrote:
> On Sun, 11 Nov 2018, Nicolas Boichat wrote:
>
> > This is a follow-up to the discussion in [1], to make sure that the page
> > tables allocated by iommu/io-pgtable-arm-v7s are contained within 32-bit
> > physical address space.
On Wed, Nov 21, 2018 at 04:19:11AM -0700, William Kucharski wrote:
> Could you add a line to the description explicitly stating that a failure
> to insert any page in the range will fail the entire routine, something
> like:
>
> > * This allows drivers to insert range of kernel pages they've alloc
On Sat, Nov 17, 2018 at 12:26:38PM +0530, Souptick Joarder wrote:
> On Fri, Nov 16, 2018 at 11:59 PM Mike Rapoport wrote:
> > > + * vm_insert_range - insert range of kernel pages into user vma
> > > + * @vma: user vma to map to
> > > + * @addr: target user address of this page
> > > + * @pages: po
On Fri, Nov 16, 2018 at 11:00:30AM +0530, Souptick Joarder wrote:
> On Thu, Nov 15, 2018 at 11:44 PM Randy Dunlap wrote:
> > On 11/15/18 7:45 AM, Souptick Joarder wrote:
> > What is the opposite of vm_insert_range() or even of vm_insert_page()?
> > or is there no need for that?
>
> There is no op
On Mon, Nov 12, 2018 at 10:40:57AM -0500, Tony Battersby wrote:
> I posted v3 on August 7. Nobody acked or merged the patches, and then
> I got too busy with other stuff to repost until now.
Thanks for resending. They were in my pile of things to look at, but
that's an ever-growing pile.
> I be
#x27;t
normally in the performance path, but might be with the right config
options. With that, I withdraw my objection to the previous patch and
Acked-by: Matthew Wilcox
Andrew, can you funnel these in through your tree? If you'd rather not,
I don't mind stuffing them into a git tree a
On Mon, Nov 12, 2018 at 10:45:58AM -0500, Tony Battersby wrote:
> +++ linux/mm/dmapool.c2018-08-06 17:52:53.0 -0400
> @@ -61,6 +61,7 @@ struct dma_pool { /* the pool */
> struct device *dev;
> unsigned int allocation;
> unsigned int boundary;
> + unsi
'size_t' when counting all
> the blocks in the entire pool.
>
> Signed-off-by: Tony Battersby
Acked-by: Matthew Wilcox
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
> dmapool private data directly in 'struct page', thereby eliminating
> 'struct dma_page'. In big O notation, this improves the algorithm from
> O(n^2) to O(n) while also reducing memory usage.
>
> Thanks to Matthew Wilcox for the suggestion to use struct page.
&
On Mon, Nov 12, 2018 at 10:44:02AM -0500, Tony Battersby wrote:
> Rename fields in 'struct dma_page' in preparation for moving them into
> 'struct page'. No functional changes.
>
> in_use -> dma_in_use
> offset -> dma_free_off
>
> Signed-of
> list of pages that have free blocks ready to (re)allocate. In big O
> notation, this improves the algorithm from O(n^2) to O(n).
>
> Signed-off-by: Tony Battersby
Acked-by: Matthew Wilcox
___
iommu mailing list
iommu@lists.linux
rsby
Acked-by: Matthew Wilcox
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
l.c for pool->dev == NULL are both insufficient and causing bloat.
> Remove them.
>
> Signed-off-by: Tony Battersby
Acked-by: Matthew Wilcox
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
On Mon, Nov 12, 2018 at 10:41:34AM -0500, Tony Battersby wrote:
> Fixes: e34f44b3517f ("pool: Improve memory usage for devices which can't
> cross boundaries")
> Signed-off-by: Tony Battersby
Acked-by: Matthew Wilcox
___
On Fri, Aug 03, 2018 at 02:43:07PM -0400, Tony Battersby wrote:
> Out of curiosity, I just tried to create a dmapool with a NULL dev and
> it crashed on this:
>
> static inline int dev_to_node(struct device *dev)
> {
> return dev->numa_node;
> }
>
> struct dma_pool *dma_pool_create(const ch
On Fri, Aug 03, 2018 at 04:05:35PM -0400, Tony Battersby wrote:
> For v3 of the patchset, I was also considering to add a note to the
> kernel-doc comments for dma_pool_create() to use dma_alloc_coherent()
> directly instead of a dma pool if the driver intends to allow userspace
> to mmap() the ret
On Fri, Aug 03, 2018 at 06:59:20PM +0300, Andy Shevchenko wrote:
> >>> I'm pretty sure this was created in an order to avoid bad looking (and
> >>> in some cases frightening) "NULL device *" part.
>
> JFYI: git log --no-merges --grep 'NULL device \*'
I think those commits actually argue in favour
On Thu, Aug 02, 2018 at 04:01:12PM -0400, Tony Battersby wrote:
> This is my attempt to shrink 'dma_free_o' and 'dma_in_use' in 'struct
> page' (originally 'offset' and 'in_use' in 'struct dma_page') to 16-bit
> so that it is unnecessary to use the '_mapcount' field of 'struct
> page'. However, it
On Thu, Aug 02, 2018 at 03:59:15PM -0400, Tony Battersby wrote:
> Rename fields in 'struct dma_page' in preparation for moving them into
> 'struct page'. No functional changes.
>
> in_use -> dma_in_use
> offset -> dma_free_o
I don't like dma_free_o. dma_free_off is OK by me.
___
On Thu, Aug 02, 2018 at 03:58:40PM -0400, Tony Battersby wrote:
> @@ -339,11 +360,16 @@ void *dma_pool_alloc(struct dma_pool *po
>
> spin_lock_irqsave(&pool->lock, flags);
>
> - list_add(&page->page_list, &pool->page_list);
> + list_add(&page->dma_list, &pool->page_list[POOL_AVAIL
On Fri, Jul 27, 2018 at 09:23:30AM -0400, Tony Battersby wrote:
> On 07/26/2018 08:07 PM, Matthew Wilcox wrote:
> > If you're up for more major surgery, then I think we can put all the
> > information currently stored in dma_page into struct page. Something
> > like t
On Thu, Jul 26, 2018 at 04:06:05PM -0400, Tony Battersby wrote:
> On 07/26/2018 03:42 PM, Matthew Wilcox wrote:
> > On Thu, Jul 26, 2018 at 02:54:56PM -0400, Tony Battersby wrote:
> >> dma_pool_free() scales poorly when the pool contains many pages because
> >> pool_fin
On Thu, Jul 26, 2018 at 02:54:56PM -0400, Tony Battersby wrote:
> dma_pool_free() scales poorly when the pool contains many pages because
> pool_find_page() does a linear scan of all allocated pages. Improve its
> scalability by replacing the linear scan with a red-black tree lookup.
> In big O n
On Thu, May 24, 2018 at 05:29:43PM +0200, Michal Hocko wrote:
> > ie if we had more,
> > could we solve our pain by making them more generic?
>
> Well, if you have more you will consume more bits in the struct pages,
> right?
Not necessarily ... the zone number is stored in the struct page
curren
On Thu, May 24, 2018 at 02:23:23PM +0200, Michal Hocko wrote:
> > If we had eight ZONEs, we could offer:
>
> No, please no more zones. What we have is quite a maint. burden on its
> own. Ideally we should only have lowmem, highmem and special/device
> zones for directly kernel accessible memory, t
On Tue, May 22, 2018 at 08:37:28PM +0200, Michal Hocko wrote:
> So why is this any better than the current code. Sure I am not a great
> fan of GFP_ZONE_TABLE because of how it is incomprehensible but this
> doesn't look too much better, yet we are losing a check for incompatible
> gfp flags. The d
On Mon, May 21, 2018 at 11:20:31PM +0800, Huaisheng Ye wrote:
> @@ -343,7 +343,7 @@ static void destroy_cache(struct zs_pool *pool)
> static unsigned long cache_alloc_handle(struct zs_pool *pool, gfp_t gfp)
> {
> return (unsigned long)kmem_cache_alloc(pool->handle_cachep,
> -
On Thu, Jan 18, 2018 at 05:56:12PM +0100, David Sterba wrote:
> On Thu, Jan 18, 2018 at 08:48:43AM -0800, Matthew Wilcox wrote:
> > Thank you! I shall attempt to debug. Was this with a btrfs root
> > filesystem? I'm most suspicious of those patches right now, since they
On Thu, Jan 18, 2018 at 05:07:50PM +0100, David Sterba wrote:
> On Wed, Jan 17, 2018 at 12:20:24PM -0800, Matthew Wilcox wrote:
> > From: Matthew Wilcox
> >
> > This version of the XArray has no known bugs.
>
> I've booted this patchset on 2 boxes, both had rando
From: Matthew Wilcox
Eliminate the buffer_lock as the internal xa_lock provides all the
necessary protection. We can remove the radix_tree_preload calls, but
I can't find a good way to use the 'exists' result from xa_cmpxchg().
We could resort to the advanced API to improve t
From: Matthew Wilcox
Signed-off-by: Matthew Wilcox
---
drivers/staging/lustre/lustre/llite/glimpse.c | 12 +---
drivers/staging/lustre/lustre/mdc/mdc_request.c | 16
2 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/lustre/lustre/llite
From: Matthew Wilcox
This is a very straightforward conversion. The handling of collisions
in the namecache could be better handled with an hlist, but that's a
patch for another day.
Signed-off-by: Matthew Wilcox
---
fs/btrfs/send.c | 19 +--
1 file changed, 9 inser
From: Matthew Wilcox
Replace slot_locked() with dax_locked() and inline unlock_slot() into
its only caller.
Signed-off-by: Matthew Wilcox
---
fs/dax.c | 48
1 file changed, 16 insertions(+), 32 deletions(-)
diff --git a/fs/dax.c b/fs/dax.c
From: Matthew Wilcox
This is a straightforward conversion.
Signed-off-by: Matthew Wilcox
---
fs/f2fs/data.c | 3 +--
fs/f2fs/dir.c| 5 +
fs/f2fs/inline.c | 6 +-
fs/f2fs/node.c | 10 ++
4 files changed, 5 insertions(+), 19 deletions(-)
diff --git a/fs/f2fs/data.c b
From: Matthew Wilcox
Quite a straightforward conversion.
Signed-off-by: Matthew Wilcox
---
mm/huge_memory.c | 19 ---
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index f71dd3e7d8cd..5c275295bbd3 100644
--- a/mm
From: Matthew Wilcox
This one is trivial.
Signed-off-by: Matthew Wilcox
---
mm/readahead.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/mm/readahead.c b/mm/readahead.c
index f64b31b3a84a..66bcaffd47f0 100644
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -174,9 +174,7
From: Matthew Wilcox
I did a fairly major rewrite of __add_ino_entry(); please check carefully.
Also, we can remove ino_list unless it's important to write out orphan
inodes in the order they were orphaned. It may also make more sense to
combine the array of inode_management structures i
From: Matthew Wilcox
Signed-off-by: Matthew Wilcox
---
mm/migrate.c | 41 -
1 file changed, 16 insertions(+), 25 deletions(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index 75d19904dd9a..7122fec9b075 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
From: Matthew Wilcox
The XArray API works out rather well for this user.
Signed-off-by: Matthew Wilcox
---
fs/f2fs/super.c | 2 --
fs/f2fs/trace.c | 60 -
fs/f2fs/trace.h | 2 --
3 files changed, 4 insertions(+), 60 deletions(-)
diff
From: Matthew Wilcox
Rename it to extent_array and use the xa_lock in place of the
extent_tree_lock mutex.
Signed-off-by: Matthew Wilcox
---
fs/f2fs/extent_cache.c | 59 +-
fs/f2fs/f2fs.h | 3 +--
2 files changed, 30 insertions(+), 32
From: Matthew Wilcox
Simpler code because the xarray takes care of things like the limit and
dereferencing the slot.
Signed-off-by: Matthew Wilcox
---
mm/shmem.c | 18 +++---
1 file changed, 3 insertions(+), 15 deletions(-)
diff --git a/mm/shmem.c b/mm/shmem.c
index 5a2226e06f8c
From: Matthew Wilcox
Signed-off-by: Matthew Wilcox
---
fs/btrfs/compression.c | 4 +---
fs/btrfs/extent_io.c | 6 ++
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index e687d06cd97c..4174b166e235 100644
--- a/fs/btrfs
From: Matthew Wilcox
Remove the last mentions of radix tree from various comments.
Signed-off-by: Matthew Wilcox
---
mm/shmem.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/mm/shmem.c b/mm/shmem.c
index 4dbcfb436bd1..5110848885d4 100644
--- a/mm/shmem.c
From: Matthew Wilcox
Signed-off-by: Matthew Wilcox
---
fs/dax.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/dax.c b/fs/dax.c
index b66b8c896ed8..e6b25ef112f2 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -1497,21 +1497,21 @@ static int dax_insert_pfn_mkwrite(struct
From: Matthew Wilcox
Signed-off-by: Matthew Wilcox
---
fs/dax.c | 98 +---
1 file changed, 26 insertions(+), 72 deletions(-)
diff --git a/fs/dax.c b/fs/dax.c
index 494e8fb7a98f..3eb0cf176d69 100644
--- a/fs/dax.c
+++ b/fs/dax.c
From: Matthew Wilcox
This eliminates a call to radix_tree_preload().
Signed-off-by: Matthew Wilcox
---
fs/xfs/xfs_mru_cache.c | 72 +++---
1 file changed, 33 insertions(+), 39 deletions(-)
diff --git a/fs/xfs/xfs_mru_cache.c b/fs/xfs
From: Matthew Wilcox
The XArray API is a slightly better fit for xhci_insert_segment_mapping()
than the radix tree API was.
Signed-off-by: Matthew Wilcox
---
drivers/usb/host/xhci-mem.c | 68 +++--
drivers/usb/host/xhci.h | 6 ++--
2 files changed
From: Matthew Wilcox
Signed-off-by: Matthew Wilcox
---
fs/dax.c | 18 ++
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/fs/dax.c b/fs/dax.c
index e6b25ef112f2..494e8fb7a98f 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -498,9 +498,9 @@ static void
From: Matthew Wilcox
Rename pag_ici_root to pag_ici_xa and use XArray APIs instead of radix
tree APIs. Shorter code, typechecking on tag numbers, better error
checking in xfs_reclaim_inode(), and eliminates a call to
radix_tree_preload().
Signed-off-by: Matthew Wilcox
---
fs/xfs/libxfs
From: Matthew Wilcox
A couple of short loops.
Signed-off-by: Matthew Wilcox
---
fs/fs-writeback.c | 25 +
1 file changed, 9 insertions(+), 16 deletions(-)
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index e2c1ca667d9a..897a89489fe9 100644
--- a/fs/fs
From: Matthew Wilcox
In a non-critical path, irqdomain wants to know how many entries are
stored in the xarray, so add xa_count(). This is a pretty straightforward
conversion; mostly just removing now-redundant locking. The only thing
of note is just how much simpler irq_domain_fix_revmap
From: Matthew Wilcox
This is a pretty straight-forward conversion.
Signed-off-by: Matthew Wilcox
---
fs/xfs/xfs_dquot.c | 38 +-
fs/xfs/xfs_qm.c| 36 ++--
fs/xfs/xfs_qm.h| 18 +-
3 files changed, 48
From: Matthew Wilcox
This is the first user of the radix tree I've converted which was
storing numbers rather than pointers. I'm fairly pleased with how
well it came out. There's less boiler-plate involved than there was
with the radix tree, so that's a win. It does use t
From: Matthew Wilcox
Removes another user of radix_tree_preload().
Signed-off-by: Matthew Wilcox
---
fs/fscache/cookie.c | 6 +-
fs/fscache/internal.h | 2 +-
fs/fscache/object.c | 2 +-
fs/fscache/page.c | 152 +---
fs/fscache
From: Matthew Wilcox
Use the xarray infrstructure like we used the radix tree infrastructure.
This lets us get rid of idr_get_free() from the radix tree code.
Signed-off-by: Matthew Wilcox
---
include/linux/idr.h| 8 +-
include/linux/radix-tree.h | 4 -
lib/idr.c
From: Matthew Wilcox
I found another victim of the radix tree being hard to use. Because
there was no call to radix_tree_preload(), khugepaged was allocating
radix_tree_nodes using GFP_ATOMIC.
I also converted a local_irq_save()/restore() pair to
disable()/enable().
Signed-off-by: Matthew
From: Matthew Wilcox
Mostly comment fixes, but one use of __xa_set_tag.
Signed-off-by: Matthew Wilcox
---
fs/buffer.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/fs/buffer.c b/fs/buffer.c
index 1a6ae530156b..e1d18307d5c8 100644
--- a/fs/buffer.c
+++ b/fs
From: Matthew Wilcox
Rename reada_tree to reada_array. Use the xa_lock in reada_array to
replace reada_lock. This has to use a nested spinlock as we take the
xa_lock of the reada_extents and reada_zones xarrays while holding
the reada_lock.
Signed-off-by: Matthew Wilcox
---
fs/btrfs/ctree.h
From: Matthew Wilcox
Use the XArray APIs to add and replace pages in the page cache. This
removes two uses of the radix tree preload API and is significantly
shorter code.
Signed-off-by: Matthew Wilcox
---
include/linux/swap.h | 8 ++-
mm/filemap.c | 143
From: Matthew Wilcox
Slightly shorter and easier to read code.
Signed-off-by: Matthew Wilcox
---
mm/khugepaged.c | 17 +
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index 9f49d0cd61c2..15f1b2d81a69 100644
--- a/mm
From: Matthew Wilcox
Straightforward conversion.
Signed-off-by: Matthew Wilcox
---
fs/btrfs/reada.c | 32 +---
fs/btrfs/volumes.c | 2 +-
fs/btrfs/volumes.h | 2 +-
3 files changed, 19 insertions(+), 17 deletions(-)
diff --git a/fs/btrfs/reada.c b/fs/btrfs
From: Matthew Wilcox
Includes moving mapping_tagged() to fs.h as a static inline, and
changing it to return bool.
Signed-off-by: Matthew Wilcox
---
include/linux/fs.h | 17 +--
mm/page-writeback.c | 62 +++--
2 files changed, 32
From: Matthew Wilcox
This is essentially xa_cmpxchg() with the locking handled above us,
and it doesn't have to handle replacing a NULL entry.
Signed-off-by: Matthew Wilcox
---
mm/truncate.c | 15 ++-
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/mm/truncate.c
From: Matthew Wilcox
This call to radix_tree_preload is awkward. At the point of allocation,
we're under not only a local lock, but also under the queue lock. So we
can't back out, drop the lock and retry the allocation. Replace this
preload call with a call to xa_reserve() which w
From: Matthew Wilcox
This is a 1:1 conversion.
Signed-off-by: Matthew Wilcox
---
mm/shmem.c | 23 +++
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/mm/shmem.c b/mm/shmem.c
index 654f367aca90..ce285ae635ea 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
From: Matthew Wilcox
We construct a fake XA_STATE and use it to delete the node with xa_store()
rather than adding a special function for this unique use case.
Signed-off-by: Matthew Wilcox
---
include/linux/swap.h | 9 -
mm/workingset.c | 51
From: Matthew Wilcox
The three radix trees in gmap are all converted to the XArray.
This is another case where the multiple locks held mandates the use
of the xa_reserve() API. The gmap_insert_rmap() function is
considerably simplified by using the advanced API;
gmap_radix_tree_free() turns out
From: Matthew Wilcox
xa_load has its own RCU locking, so we can eliminate it here.
Signed-off-by: Matthew Wilcox
---
mm/shmem.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/mm/shmem.c b/mm/shmem.c
index fad6c9e7402e..654f367aca90 100644
--- a/mm/shmem.c
+++ b/mm
From: Matthew Wilcox
Straightforward conversion.
Signed-off-by: Matthew Wilcox
---
drivers/gpu/drm/i915/i915_gem.c | 2 +-
drivers/gpu/drm/i915/i915_gem_context.c | 12 +---
drivers/gpu/drm/i915/i915_gem_context.h | 4 ++--
drivers/gpu/drm/i915
From: Matthew Wilcox
The radix tree was being protected by a raw spinlock. I believe that
was not necessary, and the new internal regular spinlock will be
adequate for this array.
Signed-off-by: Matthew Wilcox
---
drivers/sh/intc/core.c | 9 ++
drivers/sh/intc/internals.h | 5
From: Matthew Wilcox
Skip converting the lock to use xa_lock; I think this code can live with
the double-locking.
Signed-off-by: Matthew Wilcox
---
block/blk-ioc.c | 13 +++--
include/linux/iocontext.h | 6 +++---
2 files changed, 10 insertions(+), 9 deletions(-)
diff
From: Matthew Wilcox
I'm not 100% convinced that the rewrite of nilfs_copy_back_pages is
correct, but it will at least have different bugs from the current
version.
Signed-off-by: Matthew Wilcox
---
fs/nilfs2/btnode.c | 37 +++-
fs/nilfs2/page.c
From: Matthew Wilcox
With no more radix tree API users left, we can drop the GFP flags
and use xa_init() instead of INIT_RADIX_TREE().
Signed-off-by: Matthew Wilcox
---
fs/inode.c | 2 +-
include/linux/fs.h | 2 +-
mm/swap_state.c| 2 +-
3 files changed, 3 insertions(+), 3
From: Matthew Wilcox
Combine __add_to_swap_cache and add_to_swap_cache into one function
since there is no more need to preload.
Signed-off-by: Matthew Wilcox
---
mm/swap_state.c | 93 ++---
1 file changed, 29 insertions(+), 64 deletions
1 - 100 of 155 matches
Mail list logo