maple_tree-add-format-option-to-mt_dump.patch removed from -mm tree
The quilt patch titled
Subject: maple_tree: add format option to mt_dump()
has been removed from the -mm tree. Its filename was
maple_tree-add-format-option-to-mt_dump.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: "Liam R. Howlett" <[email protected]>
Subject: maple_tree: add format option to mt_dump()
Date: Thu, 18 May 2023 10:55:14 -0400
Allow different formatting strings to be used when dumping the tree. Currently supports hex and decimal.
Signed-off-by Liam R. Howlett <[email protected]>
Cc David Binderman <[email protected]>
Cc Peng Zhang <[email protected]>
Cc Sergey Senozhatsky <[email protected]>
Cc Vernon Yang <[email protected]>
Cc Wei Yang <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
include/linux/maple_tree.h | 9 ++- lib/maple_tree.c | 87 +++++++++++++++++++---------- lib/test_maple_tree.c | 10 +-- mm/internal.h | 4 - mm/mmap.c | 8 +- tools/testing/radix-tree/maple.c | 12 ++-- 6 files changed, 82 insertions(+), 48 deletions(-)
include/linux/maple_tree.h renamed from include/linux/maple_tree.h~maple_tree-add-format-option-to-mt_dump +7 -2
@@ -670,10 +670,15 @@ void *mt_next(struct maple_tree *mt, uns#ifdef CONFIG_DEBUG_MAPLE_TREE +enum mt_dump_format { + mt_dump_dec, + mt_dump_hex, +}; +extern atomic_t maple_tree_tests_run;extern atomic_t maple_tree_tests_passed; -void mt_dump (const struct maple_tree *mt); +void mt_dump (const struct maple_tree *mt,enum mt_dump_format format);void mt_validate (struct maple_tree *mt);void mt_cache_shrink (void );#define MT_BUG_ON (__tree, __x) do { \
@@ -681,7 +686,7 @@ void mt_cache_shrink(void);if (__x) { \pr_info ("BUG at %s:%d (%u)\n" , \ __func__, __LINE__, __x); \ -mt_dump (__tree); \ +mt_dump (__tree, mt_dump_hex); \pr_info ("Pass: %u Run:%u\n" , \atomic_read (&maple_tree_tests_passed), \atomic_read (&maple_tree_tests_run)); \
lib/maple_tree.c renamed from lib/maple_tree.c~maple_tree-add-format-option-to-mt_dump +58 -29
194 lines not on this page · raw message
lib/test_maple_tree.c renamed from lib/test_maple_tree.c~maple_tree-add-format-option-to-mt_dump +5 -5
@@ -219,7 +219,7 @@ static noinline void check_rev_seq(struc#ifndef __KERNEL__if (verbose) {rcu_barrier (); -mt_dump (mt); +mt_dump (mt, mt_dump_dec);pr_info (" %s test of 0-%lu %luK in %d active (%d total)\n" , __func__, max,mt_get_alloc_size ()/1024 ,mt_nr_allocated (),mt_nr_tallocated ());
@@ -248,7 +248,7 @@ static noinline void check_seq(struct ma#ifndef __KERNEL__if (verbose) {rcu_barrier (); -mt_dump (mt); +mt_dump (mt, mt_dump_dec);pr_info (" seq test of 0-%lu %luK in %d active (%d total)\n" , max,mt_get_alloc_size ()/1024 ,mt_nr_allocated (),mt_nr_tallocated ());
@@ -893,7 +893,7 @@ static noinline void check_alloc_range(s#if DEBUG_ALLOC_RANGE pr_debug ("\tInsert %lu-%lu\n" , range[i] >>12 , (range[i +1 ] >>12 ) -1 ); -mt_dump (mt); +mt_dump (mt, mt_dump_hex);#endif check_insert_range (mt, range[i] >>12 , (range[i +1 ] >>12 ) -1 ,xa_mk_value (range[i] >>12 ),0 );
@@ -934,7 +934,7 @@ static noinline void check_alloc_range(s xa_mk_value(req_range[i] >> 12)); /* pointer */mt_validate (mt);#if DEBUG_ALLOC_RANGE -mt_dump (mt); +mt_dump (mt, mt_dump_hex);#endif }
@@ -1572,7 +1572,7 @@ static noinline void check_node_overwritmtree_test_store_range (mt, i*100 , i*100 +50 ,xa_mk_value (i*100 ));mtree_test_store_range (mt,319951 ,367950 ,NULL ); -/*mt_dump(mt); */ +/*mt_dump(mt, mt_dump_dec); */ mt_validate (mt); }
mm/internal.h renamed from mm/internal.h~maple_tree-add-format-option-to-mt_dump +2 -2
@@ -1064,13 +1064,13 @@ static inline void vma_iter_store(structprintk ("%lu > %lu\n" , vmi->mas.index, vma->vm_start);printk ("store of vma %lu-%lu" , vma->vm_start, vma->vm_end);printk ("into slot %lu-%lu" , vmi->mas.index, vmi->mas.last); - mt_dump(vmi->mas.tree); + mt_dump(vmi->mas.tree, mt_dump_hex); }if (WARN_ON (vmi->mas.node !=MAS_START && vmi->mas.last < vma->vm_start)) {printk ("%lu < %lu\n" , vmi->mas.last, vma->vm_start);printk ("store of vma %lu-%lu" , vma->vm_start, vma->vm_end);printk ("into slot %lu-%lu" , vmi->mas.index, vmi->mas.last); -mt_dump (vmi->mas.tree); +mt_dump (vmi->mas.tree, mt_dump_hex); }#endif
mm/mmap.c renamed from mm/mmap.c~maple_tree-add-format-option-to-mt_dump +4 -4
@@ -301,7 +301,7 @@ out:#if defined(CONFIG_DEBUG_VM_MAPLE_TREE )extern void mt_validate (struct maple_tree *mt); -extern void mt_dump (const struct maple_tree *mt); +extern void mt_dump (const struct maple_tree *mt,enum mt_dump_format fmt);/* Validate the maple tree */ static void validate_mm_mt (struct mm_struct *mm)
@@ -323,18 +323,18 @@ static void validate_mm_mt(struct mm_strpr_emerg ("mt vma: %p %lu - %lu\n" , vma_mt, vma_mt->vm_start, vma_mt->vm_end); -mt_dump (mas.tree); +mt_dump (mas.tree, mt_dump_hex);if (vma_mt->vm_end != mas.last +1 ) {pr_err ("vma: %p vma_mt %lu-%lu\tmt %lu-%lu\n" , mm, vma_mt->vm_start, vma_mt->vm_end, mas.index, mas.last); -mt_dump (mas.tree); +mt_dump (mas.tree, mt_dump_hex); }VM_BUG_ON_MM (vma_mt->vm_end != mas.last +1 , mm);if (vma_mt->vm_start != mas.index) {pr_err ("vma: %p vma_mt %p %lu - %lu doesn't match\n" , mm, vma_mt, vma_mt->vm_start, vma_mt->vm_end); -mt_dump (mas.tree); +mt_dump (mas.tree, mt_dump_hex); }VM_BUG_ON_MM (vma_mt->vm_start != mas.index, mm); }
tools/testing/radix-tree/maple.c renamed from tools/testing/radix-tree/maple.c~maple_tree-add-format-option-to-mt_dump +6 -6
@@ -1054,7 +1054,7 @@ static noinline void check_erase2_testseif (entry_count)MT_BUG_ON (mt, !mt_height (mt));#if check_erase2_debug >1 -mt_dump (mt); +mt_dump (mt, mt_dump_hex);#endif #if check_erase2_debugpr_err ("Done\n" );
@@ -1085,7 +1085,7 @@ static noinline void check_erase2_testsemas_for_each (&mas, foo,ULONG_MAX ) {if (xa_is_zero (foo)) {if (addr == mas.index) { -mt_dump (mas.tree); +mt_dump (mas.tree, mt_dump_hex);pr_err ("retry failed %lu - %lu\n" , mas.index, mas.last);MT_BUG_ON (mt,1 );
@@ -34513,7 +34513,7 @@ static void *rcu_reader_rev(void *ptr)if (mas.index != r_start) { alt =xa_mk_value (index + i *2 +1 +RCU_RANGE_COUNT ); -mt_dump (test->mt); +mt_dump (test->mt, mt_dump_dec); printk("Error: %lu-%lu %p != %lu-%lu %p %p line %d i %d\n", mas.index, mas.last, entry, r_start, r_end, expected, alt,
@@ -35784,10 +35784,10 @@ void farmer_tests(void)struct maple_node *node;DEFINE_MTREE (tree); -mt_dump (&tree); +mt_dump (&tree, mt_dump_dec); tree.ma_root =xa_mk_value (0 ); -mt_dump (&tree); +mt_dump (&tree, mt_dump_dec); node =mt_alloc_one (GFP_KERNEL ); node->parent = (void *)((unsigned long )(&tree) |1 );
@@ -35797,7 +35797,7 @@ void farmer_tests(void) node->mr64.pivot[1 ] =1 ; node->mr64.pivot[2 ] =0 ; tree.ma_root =mt_mk_node (node, maple_leaf_64); -mt_dump (&tree); +mt_dump (&tree, mt_dump_dec); node->parent =ma_parent_ptr (node);ma_free_rcu (node);
_
Patches currently in -mm which might be from [email protected] are