Re: [PATCH v3 3/4] swap: apply new queue_percpu_work_on() interface
From: Frederic Weisbecker
Date: Wed Apr 01 2026 - 11:29:40 EST
Le Mon, Mar 23, 2026 at 02:55:47PM -0300, Marcelo Tosatti a écrit :
> Make use of the new qpw_{un,}lock*() and queue_percpu_work_on()
> interface to improve performance & latency.
>
> For functions that may be scheduled in a different cpu, replace
> local_{un,}lock*() by qpw_{un,}lock*(), and replace schedule_work_on() by
> queue_percpu_work_on(). The same happens for flush_work() and
> flush_percpu_work().
>
> The change requires allocation of qpw_structs instead of a work_structs,
> and changing parameters of a few functions to include the cpu parameter.
>
> This should bring no relevant performance impact on non-QPW kernels:
> For functions that may be scheduled in a different cpu, the local_*lock's
> this_cpu_ptr() becomes a per_cpu_ptr(smp_processor_id()).
>
> Signed-off-by: Leonardo Bras <leobras.c@xxxxxxxxx>
> Signed-off-by: Marcelo Tosatti <mtosatti@xxxxxxxxxx>
I can't review that thoroughly because it's not my area of expertise.
But I'm fine the approach. Just please consolidate that qpw_* prefix based
namespace.
Acked-by: Frederic Weisbecker <frederic@xxxxxxxxxx>
--
Frederic Weisbecker
SUSE Labs