Re: [RFC PATCH 1/1] smp: Change function signatures to use call_single_data_t

From: Leonardo Bras Soares Passos
Date: Wed Sep 06 2023 - 12:16:30 EST


On Wed, Sep 6, 2023 at 11:10 AM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> On Thu, Aug 31, 2023 at 03:31:28AM -0300, Leonardo Bras wrote:
> > call_single_data_t is a size-aligned typedef of struct __call_single_data.
> >
> > This alignment is desirable in order to have smp_call_function*() avoid
> > bouncing an extra cacheline in case of an unaligned csd, given this
> > would hurt performance.
> >
> > Since the removal of struct request->csd in commit 660e802c76c8
> > ("blk-mq: use percpu csd to remote complete instead of per-rq csd") there
> > are no current users of smp_call_function*() with unaligned csd.
> >
> > Change every 'struct __call_single_data' function parameter to
> > 'call_single_data_t', so we have warnings if any new code tries to
> > introduce an smp_call_function*() call with unaligned csd.
> >
> > Signed-off-by: Leonardo Bras <leobras@xxxxxxxxxx>
>
> Fair enough, I'll go queue it somewhere.
>

Thanks Peter!