lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAWJmAZDt4yiqNr0246Pu3WQZBG11Wnhkk1VB9fxTQLg0+qwvg@mail.gmail.com>
Date: Fri, 17 Oct 2025 14:54:53 +0800
From: Tao pilgrim <pilgrimtao@...il.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: axboe@...nel.dk, dlemoal@...nel.org, yukuai3@...wei.com, 
	linux-block@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Chengkaitao <chengkaitao@...inos.cn>
Subject: Re: [PATCH] block: Remove redundant hctx pointer dereferencing operation

On Fri, Oct 17, 2025 at 2:27 PM Christoph Hellwig <hch@...radead.org> wrote:
>
> On Thu, Oct 16, 2025 at 09:16:51PM +0800, chengkaitao wrote:
> > From: Chengkaitao <chengkaitao@...inos.cn>
> >
> > The {*q = hctx->queue} statement in the dd_insert_requestfunction is
> > redundant. This patch removes the operation and modifies the function's
> > formal parameters accordingly.
>
> What formal parameters?
>
> Basically you're passing a pointless extra argument instead of deriving
> it locally.  Why would you do that?

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. We can eliminate an LDR instruction.
-- 
Yours,
Kaitao Cheng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ