linux-stable/tools
Liam R. Howlett 0c387104c2 maple_tree: remove GFP_ZERO from kmem_cache_alloc() and kmem_cache_alloc_bulk()
commit 541e06b772 upstream.

Preallocations are common in the VMA code to avoid allocating under
certain locking conditions.  The preallocations must also cover the
worst-case scenario.  Removing the GFP_ZERO flag from the
kmem_cache_alloc() (and bulk variant) calls will reduce the amount of time
spent zeroing memory that may not be used.  Only zero out the necessary
area to keep track of the allocations in the maple state.  Zero the entire
node prior to using it in the tree.

This required internal changes to node counting on allocation, so the test
code is also updated.

This restores some micro-benchmark performance: up to +9% in mmtests mmap1
by my testing +10% to +20% in mmap, mmapaddr, mmapmany tests reported by
Red Hat

Link: https://bugzilla.redhat.com/show_bug.cgi?id=2149636
Link: https://lkml.kernel.org/r/20230105160427.2988454-1-Liam.Howlett@oracle.com
Cc: stable@vger.kernel.org
Fixes: 54a611b605 ("Maple Tree: add new data structure")
Signed-off-by: Liam Howlett <Liam.Howlett@oracle.com>
Reported-by: Jirka Hladky <jhladky@redhat.com>
Suggested-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-13 17:02:57 +02:00
..
accounting tools/accounting/procacct: remove some unused variables 2022-11-18 13:55:09 -08:00
arch tools headers arm64: Sync arm64's cputype.h with the kernel sources 2023-01-18 10:07:42 -03:00
bootconfig bootconfig: Fix testcase to increase max node 2023-03-30 12:50:57 +02:00
bpf bpftool: Always disable stack protection for BPF objects 2023-03-10 09:29:08 +01:00
build
certs
cgroup
counter
debugging
edid
firewire
firmware
gpio tools: gpio: fix -c option of gpio-event-mon 2023-01-27 14:05:46 +01:00
hv
iio tools/iio/iio_utils:fix memory leak 2023-03-11 13:50:40 +01:00
include tools headers: Syncronize linux/build_bug.h with the kernel sources 2023-01-18 10:31:11 -03:00
io_uring
kvm/kvm_stat tools/kvm_stat: update exit reasons for vmx/svm/aarch64/userspace 2022-11-09 12:26:52 -05:00
laptop
leds
lib libbpf: Fix btf_dump's packed struct determination 2023-04-06 12:12:48 +02:00
memory-model
objtool objtool: Fix memory leak in create_static_call_sections() 2023-03-11 13:50:21 +01:00
pci
pcmcia
perf perf stat: Fix counting when initial delay configured 2023-03-17 08:57:53 +01:00
power tools/power turbostat: fix decoding of HWP_STATUS 2023-04-06 12:12:30 +02:00
rcu
scripts
spi
testing maple_tree: remove GFP_ZERO from kmem_cache_alloc() and kmem_cache_alloc_bulk() 2023-04-13 17:02:57 +02:00
thermal
time
tracing tools/tracing/rtla: osnoise_hist: use total duration for average calculation 2023-03-10 09:28:43 +01:00
usb tools: usb: ffs-aio-example: Fix build error with aarch64-*-gnu-gcc toolchain(s) 2022-11-09 12:37:56 +01:00
verification Tracing fix for 6.2: 2022-12-21 19:03:42 -08:00
virtio tools/virtio: fix the vringh test for virtio ring changes 2023-01-27 06:18:41 -05:00
vm MM patches for 6.2-rc1. 2022-12-13 19:29:45 -08:00
wmi
Makefile