aboutsummaryrefslogtreecommitdiffstats
path: root/.mailmap (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2018-10-21memremap: Convert to XArrayMatthew Wilcox1-60/+16
Use the new xa_store_range function instead of the radix tree. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21xarray: Add range store functionalityMatthew Wilcox4-2/+139
This version of xa_store_range() really only supports load and store. Our only user only needs basic load and store functionality, so there's no need to do the extra work to support marking and overlapping stores correctly yet. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21xarray: Move multiorder_check to in-kernel testsMatthew Wilcox2-48/+44
This version is a little less thorough in order to be a little quicker, but tests the important edge cases. Also test adding a multiorder entry at a non-canonical index, and erasing it. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21xarray: Move multiorder_shrink to kernel testsMatthew Wilcox2-173/+37
Test this functionality inside the kernel as well as in userspace. Also remove insert_bug() as there's no comparable thing to test in the XArray code. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21xarray: Move multiorder account test in-kernelMatthew Wilcox2-24/+32
Move this test to the in-kernel test suite, and enhance it to test several different orders. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21radix tree test suite: Convert iteration test to XArrayMatthew Wilcox3-58/+63
With no code left in the kernel using the multiorder radix tree, convert the iteration test from the radix tree to the XArray. It's unlikely to suffer the same bug as the radix tree, but this test will prevent that bug from ever creeping into the XArray implementation. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21radix tree test suite: Convert tag_tagged_items to XArrayMatthew Wilcox10-71/+46
The tag_tagged_items() function is supposed to test the page-writeback tagging code. Since that has been converted to the XArray, there's not much point in testing the radix tree's tagging code. This requires using the pthread mutex embedded in the xarray instead of an external lock, so remove the pthread mutexes which protect xarrays/radix trees. Also remove radix_tree_iter_tag_set() as this was the last user. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21radix tree: Remove radix_tree_clear_tagsMatthew Wilcox4-44/+40
The page cache was the only user of this interface and it has now been converted to the XArray. Transform the test into a test of xas_init_marks(). Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21radix tree: Remove radix_tree_maybe_preload_orderMatthew Wilcox2-75/+0
This function was only used by the page cache which is now converted to the XArray. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21radix tree: Remove split/join codeMatthew Wilcox4-513/+2
radix_tree_split and radix_tree_join were never used upstream. Remove them; if they're needed in future they will be replaced by XArray equivalents. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21radix tree: Remove radix_tree_update_node_tMatthew Wilcox4-42/+11
The only user of this functionality was the workingset code, and it's now been converted to the XArray. Remove __radix_tree_delete_node() entirely as it was also only used by the workingset code. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21page cache: Finish XArray conversionMatthew Wilcox2-2/+2
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 <willy@infradead.org>
2018-10-21dax: Convert page fault handlers to XArrayMatthew Wilcox1-301/+128
This is the last part of DAX to be converted to the XArray so remove all the old helper functions. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21dax: Convert dax_lock_mapping_entry to XArrayMatthew Wilcox1-48/+35
Instead of always retrying when we slept, only retry if the page has moved. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21dax: Convert dax writeback to XArrayMatthew Wilcox1-68/+62
Use XArray iteration instead of a pagevec. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21dax: Convert __dax_invalidate_entry to XArrayMatthew Wilcox1-8/+9
Avoids walking the radix tree multiple times looking for tags. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21dax: Convert dax_layout_busy_page to XArrayMatthew Wilcox1-43/+21
Instead of using a pagevec, just use the XArray iterators. Add a conditional rescheduling point which probably should have been there in the original. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21dax: Convert dax_insert_pfn_mkwrite to XArrayMatthew Wilcox1-32/+117
Add some XArray-based helper functions to replace the radix tree based metaphors currently in use. The biggest change is that converted code doesn't see its own lock bit; get_unlocked_entry() always returns an entry with the lock bit clear. So we don't have to mess around loading the current entry and clearing the lock bit; we can just store the unlocked entry that we already have. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21dax: Hash on XArray instead of mappingMatthew Wilcox1-14/+15
Since the XArray is embedded in the struct address_space, its address contains exactly as much entropy as the address of the mapping. This patch is purely preparatory for later patches which will simplify the wait/wake interfaces. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21dax: Rename some functionsMatthew Wilcox1-44/+42
Remove mentions of 'radix' and 'radix tree'. Simplify some names by dropping the word 'mapping'. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21f2fs: Convert to XArrayMatthew Wilcox5-9/+7
This is a straightforward conversion. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21nilfs2: Convert to XArrayMatthew Wilcox2-33/+22
This is close to a 1:1 replacement of radix tree APIs with their XArray equivalents. It would be possible to optimise nilfs_copy_back_pages(), but that doesn't seem to be in the performance path. Also, I think it has a pre-existing bug, and I've added a note to that effect in the source code. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21fs: Convert writeback to XArrayMatthew Wilcox1-16/+9
A couple of short loops. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21fs: Convert buffer to XArrayMatthew Wilcox1-7/+7
Mostly comment fixes, but one use of __xa_set_mark. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21btrfs: Convert page cache to XArrayMatthew Wilcox2-8/+4
Signed-off-by: Matthew Wilcox <willy@infradead.org> Acked-by: David Sterba <dsterba@suse.com>
2018-10-21shmem: Comment fixupsMatthew Wilcox1-6/+6
Remove the last mentions of radix tree from various comments. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21memfd: Convert memfd_tag_pins to XArrayMatthew Wilcox1-26/+18
Switch to a batch-processing model like memfd_wait_for_pins() and use the xa_state previously set up by memfd_wait_for_pins(). Signed-off-by: Matthew Wilcox <willy@infradead.org> Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
2018-10-21memfd: Convert memfd_wait_for_pins to XArrayMatthew Wilcox1-36/+25
Simplify the locking by taking the spinlock while we walk the tree on the assumption that many acquires and releases of the lock will be worse than holding the lock while we process an entire batch of pages. Signed-off-by: Matthew Wilcox <willy@infradead.org> Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
2018-10-21shmem: Convert shmem_partial_swap_usage to XArrayMatthew Wilcox1-14/+4
Simpler code because the xarray takes care of things like the limit and dereferencing the slot. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21shmem: Convert shmem_free_swap to XArrayMatthew Wilcox1-2/+2
Since we are conditionally storing NULL in the XArray, we do not need to allocate memory and the GFP flags will be unused. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21shmem: Convert shmem_alloc_hugepage to XArrayMatthew Wilcox3-58/+6
xa_find() is a slightly easier API to use than radix_tree_gang_lookup_slot() because it contains its own RCU locking. This commit removes the last user of radix_tree_gang_lookup_slot() so remove the function too. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21shmem: Convert shmem_add_to_page_cache to XArrayMatthew Wilcox1-47/+34
We can use xas_find_conflict() instead of radix_tree_gang_lookup_slot() to find any conflicting entry and combine the three paths through this function into one. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21shmem: Convert find_swap_entry to XArrayMatthew Wilcox5-101/+66
This is a 1:1 conversion. The major part of this patch is converting the test framework from userspace to kernel space and mirroring the algorithm now used in find_swap_entry(). Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21shmem: Convert shmem_confirm_swap to XArrayMatthew Wilcox1-6/+1
xa_load has its own RCU locking, so we can eliminate it here. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21shmem: Convert shmem_radix_tree_replace to XArrayMatthew Wilcox1-14/+8
Rename shmem_radix_tree_replace() to shmem_replace_entry() and convert it to use the XArray API. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21pagevec: Use xa_mark_tMatthew Wilcox6-10/+12
Removes sparse warnings. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21mm: Convert is_page_cache_freeable to XArrayMatthew Wilcox1-4/+4
This is just a variable rename and comment change. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21mm: Convert khugepaged_scan_shmem to XArrayMatthew Wilcox1-12/+5
Slightly shorter and easier to read code. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21mm: Convert collapse_shmem to XArrayMatthew Wilcox1-93/+66
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 Wilcox <willy@infradead.org>
2018-10-21mm: Convert huge_memory to XArrayMatthew Wilcox1-10/+7
Quite a straightforward conversion. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21mm: Convert page migration to XArrayMatthew Wilcox1-30/+18
Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21mm: Convert __do_page_cache_readahead to XArrayMatthew Wilcox1-3/+1
This one is trivial. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21mm: Convert delete_from_swap_cache to XArrayMatthew Wilcox3-17/+14
Both callers of __delete_from_swap_cache have the swp_entry_t already, so pass that in to make constructing the XA_STATE easier. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21mm: Convert add_to_swap_cache to XArrayMatthew Wilcox1-64/+29
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 <willy@infradead.org>
2018-10-21mm: Convert truncate to XArrayMatthew Wilcox1-9/+6
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 <willy@infradead.org>
2018-10-21mm: Convert workingset to XArrayMatthew Wilcox3-39/+86
We construct an XA_STATE and use it to delete the node with xas_store() rather than adding a special function for this unique use case. Includes a test that simulates this usage for the test suite. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21mm: Convert page-writeback to XArrayMatthew Wilcox2-53/+36
Includes moving mapping_tagged() to fs.h as a static inline, and changing it to return bool. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21page cache: Convert filemap_range_has_page to XArrayMatthew Wilcox1-8/+19
Instead of calling find_get_pages_range() and putting any reference, use xas_find() to iterate over any entries in the range, skipping the shadow/swap entries. Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21page cache: Remove stray radix commentMatthew Wilcox1-1/+1
Signed-off-by: Matthew Wilcox <willy@infradead.org>
2018-10-21page cache: Convert delete_batch to XArrayMatthew Wilcox1-15/+13
Rename the function from page_cache_tree_delete_batch to just page_cache_delete_batch. Signed-off-by: Matthew Wilcox <willy@infradead.org>