diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2024-10-07 19:50:17 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-10-15 18:30:33 +0300 |
commit | f57ebb92ba3e09a7e1082f147d6e1456d702d4b2 (patch) | |
tree | 955c40bbc20e1a9801fb82933f8d12b77c3137b5 /tools/perf/scripts/python/syscall-counts.py | |
parent | aebbfe0779b271c099cc80c5e2995c2087b28dcf (diff) | |
download | linux-f57ebb92ba3e09a7e1082f147d6e1456d702d4b2.tar.xz |
debugobjects: Implement batch processing
Adding and removing single objects in a loop is bad in terms of lock
contention and cache line accesses.
To implement batching, record the last object in a batch in the object
itself. This is trivialy possible as hlists are strictly stacks. At a batch
boundary, when the first object is added to the list the object stores a
pointer to itself in debug_obj::batch_last. When the next object is added
to the list then the batch_last pointer is retrieved from the first object
in the list and stored in the to be added one.
That means for batch processing the first object always has a pointer to
the last object in a batch, which allows to move batches in a cache line
efficient way and reduces the lock held time.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Zhen Lei <thunder.leizhen@huawei.com>
Link: https://lore.kernel.org/all/20241007164914.258995000@linutronix.de
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions