aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorrulinhuang <[email protected]>2024-03-06 21:14:40 -0500
committerAndrew Morton <[email protected]>2024-04-25 20:56:06 -0700
commitaaab830ad887629156ef17097c2ad24ce6fb8177 (patch)
treeaf6b0264c804864adae65cd0f33f1279b442e616 /tools/perf/scripts/python
parentc8d36bc2df89dbb7f27cc560a0c5252a6dd16c10 (diff)
mm/vmalloc: eliminated the lock contention from twice to once
When allocating a new memory area where the mapping address range is known, it is observed that the vmap_node->busy.lock is acquired twice. The first acquisition occurs in the alloc_vmap_area() function when inserting the vm area into the vm mapping red-black tree. The second acquisition occurs in the setup_vmalloc_vm() function when updating the properties of the vm, such as flags and address, etc. Combine these two operations together in alloc_vmap_area(), which improves scalability when the vmap_node->busy.lock is contended. By doing so, the need to acquire the lock twice can also be eliminated to once. With the above change, tested on intel sapphire rapids platform(224 vcpu), a 4% performance improvement is gained on stress-ng/pthread(https://github.com/ColinIanKing/stress-ng), which is the stress test of thread creations. Link: https://lkml.kernel.org/r/[email protected] Co-developed-by: "Chen, Tim C" <[email protected]> Signed-off-by: "Chen, Tim C" <[email protected]> Co-developed-by: "King, Colin" <[email protected]> Signed-off-by: "King, Colin" <[email protected]> Signed-off-by: rulinhuang <[email protected]> Reviewed-by: Baoquan He <[email protected]> Reviewed-by: Uladzislau Rezki (Sony) <[email protected]> Cc: Tim Chen <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Lorenzo Stoakes <[email protected]> Cc: Wangyang Guo <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions