aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_vmalloc.c
diff options
context:
space:
mode:
authorUladzislau Rezki (Sony) <[email protected]>2021-09-02 21:57:16 +0000
committerLinus Torvalds <[email protected]>2021-09-03 16:58:14 +0000
commit343ab8178f318b6006d54865972ff9c433b29e10 (patch)
tree79777182053073e5c580bfc5293da7f22a32e49f /lib/test_vmalloc.c
parentmm/sparse: clarify pgdat_to_phys (diff)
downloadkernel-343ab8178f318b6006d54865972ff9c433b29e10.tar.gz
kernel-343ab8178f318b6006d54865972ff9c433b29e10.zip
mm/vmalloc: use batched page requests in bulk-allocator
In case of simultaneous vmalloc allocations, for example it is 1GB and 12 CPUs my system is able to hit "BUG: soft lockup" for !CONFIG_PREEMPT kernel. RIP: 0010:__alloc_pages_bulk+0xa9f/0xbb0 Call Trace: __vmalloc_node_range+0x11c/0x2d0 __vmalloc_node+0x4b/0x70 fix_size_alloc_test+0x44/0x60 [test_vmalloc] test_func+0xe7/0x1f0 [test_vmalloc] kthread+0x11a/0x140 ret_from_fork+0x22/0x30 To address this issue invoke a bulk-allocator many times until all pages are obtained, i.e. do batched page requests adding cond_resched() meanwhile to reschedule. Batched value is hard-coded and is 100 pages per call. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Uladzislau Rezki (Sony) <[email protected]> Acked-by: Michal Hocko <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Hillf Danton <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Nicholas Piggin <[email protected]> Cc: Oleksiy Avramchenko <[email protected]> Cc: Steven Rostedt <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/test_vmalloc.c')
0 files changed, 0 insertions, 0 deletions