linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 00/35] Maple tree mas_{next,prev}_range() and cleanup
@ 2023-05-18 14:55 Liam R. Howlett
  2023-05-18 14:55 ` [PATCH v4 01/35] maple_tree: Fix static analyser cppcheck issue Liam R. Howlett
                   ` (34 more replies)
  0 siblings, 35 replies; 41+ messages in thread
From: Liam R. Howlett @ 2023-05-18 14:55 UTC (permalink / raw)
  To: Andrew Morton; +Cc: maple-tree, linux-mm, linux-kernel, Liam R. Howlett

This patch set contains a number of clean ups to the code to make it
more usable (next/prev range), the addition of debug output formatting,
the addition of printing the maple state information in the
WARN_ON/BUG_ON code.

There is also work done here to keep nodes active during iterations to
reduce the necessity of re-walking the tree.

Finally, there is a new interface added to move to the next or previous
range in the tree, even if it is empty.

The organisation of the patches is as follows:

0001-0004 - Small clean ups
0005-0018 - Additional debug options and WARN_ON/BUG_ON changes
0019      - Test module __init and __exit addition
0020-0021 - More functional clean ups
0022-0026 - Changes to keep nodes active
0027-0034 - Add new mas_{prev,next}_range()
0035      - Use new mas_{prev,next}_range() in mmap_region()

Changes since v3:
 - Fixed whitespace issue in mas_find() - Thanks build bot
 - Dropped mas_contiguous() until a user is implemented and it will be
   renamed - Thanks Andrew Morton
 - Added missing comment to patch 34 "Add vma_iter_{next,prev}_range()"

v1: https://lore.kernel.org/linux-mm/20230425140955.3834476-1-Liam.Howlett@oracle.com/ 
v2: https://lore.kernel.org/linux-mm/20230505174204.2665599-1-Liam.Howlett@oracle.com/
v3: https://lore.kernel.org/linux-mm/20230512182036.359030-1-Liam.Howlett@oracle.com/

Liam R. Howlett (35):
  maple_tree: Fix static analyser cppcheck issue
  maple_tree: Clean up mas_parent_enum() and rename to mas_parent_type()
  maple_tree: Avoid unnecessary ascending
  maple_tree: Clean up mas_dfs_postorder()
  maple_tree: Add format option to mt_dump()
  maple_tree: Add debug BUG_ON and WARN_ON variants
  maple_tree: Convert BUG_ON() to MT_BUG_ON()
  maple_tree: Change RCU checks to WARN_ON() instead of BUG_ON()
  maple_tree: Convert debug code to use MT_WARN_ON() and MAS_WARN_ON()
  maple_tree: Use MAS_BUG_ON() when setting a leaf node as a parent
  maple_tree: Use MAS_BUG_ON() in mas_set_height()
  maple_tree: Use MAS_BUG_ON() from mas_topiary_range()
  maple_tree: Use MAS_WR_BUG_ON() in mas_store_prealloc()
  maple_tree: Use MAS_BUG_ON() prior to calling mas_meta_gap()
  maple_tree: Return error on mte_pivots() out of range
  maple_tree: Make test code work without debug enabled
  mm: Update validate_mm() to use vma iterator
  mm: Update vma_iter_store() to use MAS_WARN_ON()
  maple_tree: Add __init and __exit to test module
  maple_tree: Remove unnecessary check from mas_destroy()
  maple_tree: mas_start() reset depth on dead node
  mm/mmap: Change do_vmi_align_munmap() for maple tree iterator changes
  maple_tree: Try harder to keep active node after mas_next()
  maple_tree: Try harder to keep active node with mas_prev()
  maple_tree: Revise limit checks in mas_empty_area{_rev}()
  maple_tree: Fix testing mas_empty_area()
  maple_tree: Introduce mas_next_slot() interface
  maple_tree: Add mas_next_range() and mas_find_range() interfaces
  maple_tree: Relocate mas_rewalk() and mas_rewalk_if_dead()
  maple_tree: Introduce mas_prev_slot() interface
  maple_tree: Add mas_prev_range() and mas_find_range_rev interface
  maple_tree: Clear up index and last setting in single entry tree
  maple_tree: Update testing code for mas_{next,prev,walk}
  mm: Add vma_iter_{next,prev}_range() to vma iterator
  mm: Avoid rewalk in mmap_region

 include/linux/maple_tree.h            |  118 ++-
 include/linux/mm.h                    |   13 +
 include/linux/mmdebug.h               |   14 +
 lib/Kconfig.debug                     |   10 +-
 lib/maple_tree.c                      | 1181 ++++++++++++++-----------
 lib/test_maple_tree.c                 |  863 +++++++++++++++---
 mm/debug.c                            |    9 +
 mm/internal.h                         |   20 +-
 mm/mmap.c                             |  111 ++-
 tools/testing/radix-tree/linux/init.h |    1 +
 tools/testing/radix-tree/maple.c      |  164 ++--
 11 files changed, 1748 insertions(+), 756 deletions(-)

-- 
2.39.2



^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2023-07-10 15:06 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-18 14:55 [PATCH v4 00/35] Maple tree mas_{next,prev}_range() and cleanup Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 01/35] maple_tree: Fix static analyser cppcheck issue Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 02/35] maple_tree: Clean up mas_parent_enum() and rename to mas_parent_type() Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 03/35] maple_tree: Avoid unnecessary ascending Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 04/35] maple_tree: Clean up mas_dfs_postorder() Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 05/35] maple_tree: Add format option to mt_dump() Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 06/35] maple_tree: Add debug BUG_ON and WARN_ON variants Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 07/35] maple_tree: Convert BUG_ON() to MT_BUG_ON() Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 08/35] maple_tree: Change RCU checks to WARN_ON() instead of BUG_ON() Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 09/35] maple_tree: Convert debug code to use MT_WARN_ON() and MAS_WARN_ON() Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 10/35] maple_tree: Use MAS_BUG_ON() when setting a leaf node as a parent Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 11/35] maple_tree: Use MAS_BUG_ON() in mas_set_height() Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 12/35] maple_tree: Use MAS_BUG_ON() from mas_topiary_range() Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 13/35] maple_tree: Use MAS_WR_BUG_ON() in mas_store_prealloc() Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 14/35] maple_tree: Use MAS_BUG_ON() prior to calling mas_meta_gap() Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 15/35] maple_tree: Return error on mte_pivots() out of range Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 16/35] maple_tree: Make test code work without debug enabled Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 17/35] mm: Update validate_mm() to use vma iterator Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 18/35] mm: Update vma_iter_store() to use MAS_WARN_ON() Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 19/35] maple_tree: Add __init and __exit to test module Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 20/35] maple_tree: Remove unnecessary check from mas_destroy() Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 21/35] maple_tree: mas_start() reset depth on dead node Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 22/35] mm/mmap: Change do_vmi_align_munmap() for maple tree iterator changes Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 23/35] maple_tree: Try harder to keep active node after mas_next() Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 24/35] maple_tree: Try harder to keep active node with mas_prev() Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 25/35] maple_tree: Revise limit checks in mas_empty_area{_rev}() Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 26/35] maple_tree: Fix testing mas_empty_area() Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 27/35] maple_tree: Introduce mas_next_slot() interface Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 28/35] maple_tree: Add mas_next_range() and mas_find_range() interfaces Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 29/35] maple_tree: Relocate mas_rewalk() and mas_rewalk_if_dead() Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 30/35] maple_tree: Introduce mas_prev_slot() interface Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 31/35] maple_tree: Add mas_prev_range() and mas_find_range_rev interface Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 32/35] maple_tree: Clear up index and last setting in single entry tree Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 33/35] maple_tree: Update testing code for mas_{next,prev,walk} Liam R. Howlett
2023-07-02 18:20   ` Geert Uytterhoeven
2023-07-04 15:11     ` Peng Zhang
2023-07-04 15:22       ` Liam R. Howlett
2023-07-07 19:28         ` Liam R. Howlett
2023-07-10 15:03           ` Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 34/35] mm: Add vma_iter_{next,prev}_range() to vma iterator Liam R. Howlett
2023-05-18 14:55 ` [PATCH v4 35/35] mm: Avoid rewalk in mmap_region Liam R. Howlett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox