summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | selftests/ftrace: Improve kprobe on module testcase to load/unload moduleMasami Hiramatsu2018-10-242-3/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve kprobe events on module testcase to check module load/unload with disabled/enabled events. This also change the target module to trace_printk.ko, so it depends on CONFIG_SAMPLE_TRACE_PRINTK=m. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
| * | selftests/ftrace: Use loopback address instead of localhostMasami Hiramatsu2018-10-2411-25/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use raw loopback address instead of localhost, because "localhost" can depend on nsswitch and in some case we can not resolve the localhost. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
| * | selftests/ftrace: Fix checkbashisms errorsMasami Hiramatsu2018-10-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fix a test case to make checkbashisms clean. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
| * | selftests/ftrace: Fix to test kprobe $comm arg only if availableMasami Hiramatsu2018-10-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test $comm in kprobe-event argument syntax testcase only if it is supported on the kernel because $comm has been introduced 4.8 kernel. So on older stable kernel, it should be skipped. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
| * | selftests/ftrace: Remove unneeded per-test init/cleanup ftraceMasami Hiramatsu2018-10-2444-378/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since ftracetest framework calls initialize_ftrace() right before each test and after all tests, we don't need to init/cleanup ftrace for each test case. Just remove such unneeded init/cleanup code because it can increase logfile size. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
| * | selftests/ftrace: Cleanup ftrace after running testMasami Hiramatsu2018-10-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup ftrace by initialize_ftrace() after running all test cases. This means we also don't need cleanup ftrace on each test case, except for some special options. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
| * | selftests/ftrace: Add SPDX License Identifier to templateMasami Hiramatsu2018-10-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add SPDX License Identifier line to template file so that someone who makes new testcase from the template does not forgot it. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
| * | selftests/ftrace: More initialize features in initialize_ftraceMasami Hiramatsu2018-10-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clear pid filter, synthetic_events, snapshots, ftrace filter, and trace log in initialize_ftrace(), since those are used in test cases. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
| * | selftests/ftrace: Add case number prefix to logfileMasami Hiramatsu2018-10-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a case number prefix to each logfile. This makes it easier to find which logfile is corresponding to which failure. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
| * | selftests/ftrace: Add --console hidden optionMasami Hiramatsu2018-10-241-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add --console hidden option for debug test cases. This option allows to put "sh" or something else when the test case hits a bug. For example, if you find a testcase which doesn't pass, you can insert sh for interactive debug as below ----- #!/bin/sh # description: sample test case good-command suspicious-wrong-command sh # <- add this for interactive debug ----- Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
| * | selftests/ftrace: Add --stop-fail hidden option for debugMasami Hiramatsu2018-10-241-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add --stop-fail option for debugging the ftracetest. With this option, ftracetest stops right after a testcase fails instead of finish running all testcases. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
* | | Merge branch 'xarray' of git://git.infradead.org/users/willy/linux-daxLinus Torvalds2018-10-2893-3821/+7052
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull XArray conversion from Matthew Wilcox: "The XArray provides an improved interface to the radix tree data structure, providing locking as part of the API, specifying GFP flags at allocation time, eliminating preloading, less re-walking the tree, more efficient iterations and not exposing RCU-protected pointers to its users. This patch set 1. Introduces the XArray implementation 2. Converts the pagecache to use it 3. Converts memremap to use it The page cache is the most complex and important user of the radix tree, so converting it was most important. Converting the memremap code removes the only other user of the multiorder code, which allows us to remove the radix tree code that supported it. I have 40+ followup patches to convert many other users of the radix tree over to the XArray, but I'd like to get this part in first. The other conversions haven't been in linux-next and aren't suitable for applying yet, but you can see them in the xarray-conv branch if you're interested" * 'xarray' of git://git.infradead.org/users/willy/linux-dax: (90 commits) radix tree: Remove multiorder support radix tree test: Convert multiorder tests to XArray radix tree tests: Convert item_delete_rcu to XArray radix tree tests: Convert item_kill_tree to XArray radix tree tests: Move item_insert_order radix tree test suite: Remove multiorder benchmarking radix tree test suite: Remove __item_insert memremap: Convert to XArray xarray: Add range store functionality xarray: Move multiorder_check to in-kernel tests xarray: Move multiorder_shrink to kernel tests xarray: Move multiorder account test in-kernel radix tree test suite: Convert iteration test to XArray radix tree test suite: Convert tag_tagged_items to XArray radix tree: Remove radix_tree_clear_tags radix tree: Remove radix_tree_maybe_preload_order radix tree: Remove split/join code radix tree: Remove radix_tree_update_node_t page cache: Finish XArray conversion dax: Convert page fault handlers to XArray ...
| * | | radix tree: Remove multiorder supportMatthew Wilcox2018-10-215-245/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | All users have now been converted to the XArray. Removing the support reduces code size and ensures new users will use the XArray instead. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | | radix tree test: Convert multiorder tests to XArrayMatthew Wilcox2018-10-211-56/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the last remaining user of the multiorder functionality of the radix tree. Test the XArray instead. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | | radix tree tests: Convert item_delete_rcu to XArrayMatthew Wilcox2018-10-212-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation for the removal of the multiorder radix tree code, convert item_delete_rcu() to use the XArray so it can still be called for XArrays containing multi-index entries. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | | radix tree tests: Convert item_kill_tree to XArrayMatthew Wilcox2018-10-211-21/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation for the removal of the multiorder radix tree code, convert item_kill_tree() to use the XArray so it can still be called for XArrays containing multi-index entries. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | | radix tree tests: Move item_insert_orderMatthew Wilcox2018-10-213-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The remaining tests are not suitable for moving in-kernel, so move item_insert_order() into multiorder.c, make it static and make it use the XArray. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | | radix tree test suite: Remove multiorder benchmarkingMatthew Wilcox2018-10-211-29/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The multiorder radix tree code is being removed, so remove the benchmarking of its performance. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | | radix tree test suite: Remove __item_insertMatthew Wilcox2018-10-212-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | Inline it into its one caller Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | | memremap: Convert to XArrayMatthew Wilcox2018-10-211-60/+16
| | | | | | | | | | | | | | | | | | | | | | | | Use the new xa_store_range function instead of the radix tree. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | | xarray: Add range store functionalityMatthew Wilcox2018-10-214-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>
| * | | xarray: Move multiorder_check to in-kernel testsMatthew Wilcox2018-10-212-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>
| * | | xarray: Move multiorder_shrink to kernel testsMatthew Wilcox2018-10-212-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>
| * | | xarray: Move multiorder account test in-kernelMatthew Wilcox2018-10-212-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>
| * | | radix tree test suite: Convert iteration test to XArrayMatthew Wilcox2018-10-213-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>
| * | | radix tree test suite: Convert tag_tagged_items to XArrayMatthew Wilcox2018-10-2110-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>
| * | | radix tree: Remove radix_tree_clear_tagsMatthew Wilcox2018-10-214-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>
| * | | radix tree: Remove radix_tree_maybe_preload_orderMatthew Wilcox2018-10-212-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>
| * | | radix tree: Remove split/join codeMatthew Wilcox2018-10-214-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>
| * | | radix tree: Remove radix_tree_update_node_tMatthew Wilcox2018-10-214-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>
| * | | page cache: Finish XArray conversionMatthew Wilcox2018-10-212-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>
| * | | dax: Convert page fault handlers to XArrayMatthew Wilcox2018-10-211-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>
| * | | dax: Convert dax_lock_mapping_entry to XArrayMatthew Wilcox2018-10-211-48/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of always retrying when we slept, only retry if the page has moved. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | | dax: Convert dax writeback to XArrayMatthew Wilcox2018-10-211-68/+62
| | | | | | | | | | | | | | | | | | | | | | | | Use XArray iteration instead of a pagevec. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | | dax: Convert __dax_invalidate_entry to XArrayMatthew Wilcox2018-10-211-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | Avoids walking the radix tree multiple times looking for tags. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | | dax: Convert dax_layout_busy_page to XArrayMatthew Wilcox2018-10-211-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>
| * | | dax: Convert dax_insert_pfn_mkwrite to XArrayMatthew Wilcox2018-10-211-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>
| * | | dax: Hash on XArray instead of mappingMatthew Wilcox2018-10-211-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>
| * | | dax: Rename some functionsMatthew Wilcox2018-10-211-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>
| * | | f2fs: Convert to XArrayMatthew Wilcox2018-10-215-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | This is a straightforward conversion. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | | nilfs2: Convert to XArrayMatthew Wilcox2018-10-212-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>
| * | | fs: Convert writeback to XArrayMatthew Wilcox2018-10-211-16/+9
| | | | | | | | | | | | | | | | | | | | | | | | A couple of short loops. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | | fs: Convert buffer to XArrayMatthew Wilcox2018-10-211-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | Mostly comment fixes, but one use of __xa_set_mark. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | | btrfs: Convert page cache to XArrayMatthew Wilcox2018-10-212-8/+4
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Matthew Wilcox <willy@infradead.org> Acked-by: David Sterba <dsterba@suse.com>
| * | | shmem: Comment fixupsMatthew Wilcox2018-10-211-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Remove the last mentions of radix tree from various comments. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | | memfd: Convert memfd_tag_pins to XArrayMatthew Wilcox2018-10-211-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>
| * | | memfd: Convert memfd_wait_for_pins to XArrayMatthew Wilcox2018-10-211-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>
| * | | shmem: Convert shmem_partial_swap_usage to XArrayMatthew Wilcox2018-10-211-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>
| * | | shmem: Convert shmem_free_swap to XArrayMatthew Wilcox2018-10-211-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>
| * | | shmem: Convert shmem_alloc_hugepage to XArrayMatthew Wilcox2018-10-213-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>