Messages in this thread | | | From | Thomas Gleixner <> | Subject | Re: [PATCH] signal: Allow RT tasks to cache one sigqueue struct | Date | Thu, 11 Mar 2021 15:20:00 +0100 |
| |
On Thu, Mar 11 2021 at 13:45, Thomas Gleixner wrote:
> On Thu, Mar 11 2021 at 00:56, Thomas Gleixner wrote: >> Rant aside, there is no massive benefit of doing that caching in >> general, but there is not much of a downside either and for particular >> use cases it's useful even outside of PREEMPT_RT. >> >> IMO, having it there unconditionally is better than yet another special >> cased hackery. > > Just did some micro instrumentation to measure the time spent in > __sigqueue_alloc/free() with and without the caching. > > Unsurprisingly that results in a time reduction of ~67% saving about 3us > per alloc/free pair. Not hugely relevant for a kernel build but for > anything which is signal heavy it'll make an difference.
That's all fastpath allocations and nothing which hit the slow path, which would be way worse.
Thanks,
tglx
| |