On 2025-08-23 12:39, Thomas Gleixner wrote:
> There is no need to update these values unconditionally if there is no
> event pending.
I agree with this change.
On a related note, I wonder if arch/powerpc/mm/numa.c:
find_and_update_cpu_nid() should set the rseq_event pending bool to true
for each thread in the system ?
Thanks,
Mathieu
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> ---
> kernel/rseq.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> --- a/kernel/rseq.c
> +++ b/kernel/rseq.c
> @@ -464,11 +464,12 @@ void __rseq_handle_notify_resume(struct
> t->rseq_event_pending = false;
> }
>
> - if (IS_ENABLED(CONFIG_DEBUG_RSEQ) || event) {
> - ret = rseq_ip_fixup(regs, event);
> - if (unlikely(ret < 0))
> - goto error;
> - }
> + if (!IS_ENABLED(CONFIG_DEBUG_RSEQ) && !event)
> + return;
> +
> + ret = rseq_ip_fixup(regs, event);
> + if (unlikely(ret < 0))
> + goto error;
>
> if (unlikely(rseq_update_cpu_node_id(t)))
> goto error;
>
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com