Re: [RFC PATCH 0/4] Optimize rss_stat initialization/teardown for single-threaded tasks
From: Mathieu Desnoyers
Date: Fri Nov 28 2025 - 15:12:31 EST
On 2025-11-28 15:10, Jan Kara wrote:
On Fri 28-11-25 08:30:08, Mathieu Desnoyers wrote:[...]
I suspect that by doing just that we'd get most of the
performance benefits provided by the single-threaded special-case
proposed here.
I don't think so. Because in the profiles I have been doing for these
loads the biggest cost wasn't actually the per-cpu allocation itself but
the cost of zeroing the allocated counter for many CPUs (and then the
counter summarization on exit) and you're not going to get rid of that with
just reshuffling per-cpu fields and adding slab allocator in front.
That's a good point ! So skipping the zeroing of per-cpu fields would
indeed justify special-casing the single-threaded case.
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com