Re: [PATCH] MIPS: loongson64: add IRQ work based on self-IPI
From: Sebastian Andrzej Siewior
Date: Wed Jun 24 2026 - 02:19:06 EST
On 2026-06-24 01:27:21 [+0800], Xi Ruoyao wrote:
> Since the commit 91840be8f710 ("irq_work: Fix use-after-free in
> irq_work_single() on PREEMPT_RT"), we observed the performance of
> execve() is significantly impacted on MIPS.
>
> While we are unsure how that commit caused the impact or how to improve
> it (or even if it can be improved at all), implementing IRQ work with
> self-IPI seems able to mitigate the impaction.
I suspect mm_struct::mm_cid.irq_work.
That IPI ensures that after irq_work_sync() returns the enqueued
irq_work can be freed.
> Perhaps this can/should be implemented for other MIPS architecture
> processors as well, but we don't have the enough knowledge of them, nor
> access to the hardware. So only implement it for loongson64 here.
I have half done bits for cavium and need to finish it…
> Link: https://lore.kernel.org/6be1cdd5f91dd7418a32ff372a6f3ae259b19195.camel@xxxxxxxxxxx/
> Signed-off-by: Xi Ruoyao <xry111@xxxxxxxxxxx>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
Sebastian