linux-imx/tools/testing/radix-tree
Sidhartha Kumar 2c30b8b105 maple_tree: do not preallocate nodes for slot stores
commit 4249f13c11 upstream.

mas_preallocate() defaults to requesting 1 node for preallocation and then
,depending on the type of store, will update the request variable.  There
isn't a check for a slot store type, so slot stores are preallocating the
default 1 node.  Slot stores do not require any additional nodes, so add a
check for the slot store case that will bypass node_count_gfp().  Update
the tests to reflect that slot stores do not require allocations.

User visible effects of this bug include increased memory usage from the
unneeded node that was allocated.

Link: https://lkml.kernel.org/r/20231213205058.386589-1-sidhartha.kumar@oracle.com
Fixes: 0b8bb544b1 ("maple_tree: update mas_preallocate() testing")
Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Cc: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Peng Zhang <zhangpeng.00@bytedance.com>
Cc: <stable@vger.kernel.org>	[6.6+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-05 15:19:43 +01:00
..
generated
linux maple_tree: add __init and __exit to test module 2023-06-09 16:25:31 -07:00
trace/events
.gitignore
benchmark.c
bitmap.c
idr-test.c
iteration_check_2.c
iteration_check.c
linux.c
main.c
Makefile radix-tree: move declarations to header 2023-06-12 11:31:50 -07:00
maple.c maple_tree: do not preallocate nodes for slot stores 2024-01-05 15:19:43 +01:00
multiorder.c XArray: Do not return sibling entries from xa_load() 2023-07-28 15:37:45 -04:00
regression.h
regression1.c radix tree test suite: fix incorrect allocation size for pthreads 2023-08-04 13:03:40 -07:00
regression2.c
regression3.c
regression4.c
tag_check.c
test.c
test.h
xarray.c