Re: [PATCH v2] block/mq-deadline: Remove redundant hctx pointer dereferencing operation
From: Tao pilgrim
Date: Tue Nov 18 2025 - 02:34:05 EST
On Tue, Nov 18, 2025 at 2:08 PM Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
>
> On Tue, Nov 18, 2025 at 09:25:39AM +0800, chengkaitao wrote:
> > From: Chengkaitao <chengkaitao@xxxxxxxxxx>
> >
> > The value of 'hctx->queue' is already stored in '*q' within
> > dd_insert_requests, we can directly reuse the result instead of
> > dereferencing hctx again in the dd_insert_request function. This
> > patch removes the redundant operation and modifies the function's
> > parameters accordingly. We can eliminate an LDR instruction.
>
> But you pass additional parameters on the stack. Aka you're causing
> churn here with bogus arguments.
This patch replaces "struct blk_mq_hw_ctx *hctx" with "struct request_queue *q"
without introducing additional parameters. The total number of parameters for
the dd_insert_request function remains unchanged.
--
Yours,
Chengkaitao