public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Christoph Hellwig <hch@infradead.org>
Cc: "Mohamed Abuelfotoh, Hazem" <abuehaze@amazon.com>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: [PATCH] block: use plug request list tail for one-shot backmerge attempt
Date: Thu, 12 Jun 2025 05:49:16 -0600	[thread overview]
Message-ID: <045d300e-9b52-4ead-8664-2cea6354f5bf@kernel.dk> (raw)
In-Reply-To: <aEpkIxvuTWgY5BnO@infradead.org>

On 6/11/25 11:22 PM, Christoph Hellwig wrote:
> On Wed, Jun 11, 2025 at 11:53:07AM -0600, Jens Axboe wrote:
>> Yes we can't revert it, and honestly I would not want to even if that
>> was an option. If the multi-queue case is particularly important, you
>> could just do something ala the below - keep scanning until you a merge
>> _could_ have happened but didn't. Ideally we'd want to iterate the plug
>> list backwards and then we could keep the same single shot logic, where
>> you only attempt one request that has a matching queue. And obviously we
>> could just doubly link the requests, there's space in the request
>> linkage code to do that. But that'd add overhead in general, I think
>> it's better to shove a bit of that overhead to the multi-queue case.
> 
> Maybe byte the bullet and just make the request lists doubly linked?
> Unlike the bio memory usage for request should not be quite as
> critical.  Right now in my config the las cacheline in struct request
> only has a single 8 byte field anyway, so in practive we won't even
> bloat it.

The space isn't a concern, as you found as well. It's the fact that
doubly linked lists suck in terms of needing to touch both prev
and next for removal.

-- 
Jens Axboe


  parent reply	other threads:[~2025-06-12 11:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-11 14:53 [PATCH] block: use plug request list tail for one-shot backmerge attempt Jens Axboe
2025-06-11 16:55 ` Mohamed Abuelfotoh, Hazem
2025-06-11 17:53   ` Jens Axboe
2025-06-12  5:22     ` Christoph Hellwig
2025-06-12  5:23       ` Christoph Hellwig
2025-06-12 11:49       ` Jens Axboe [this message]
2025-06-12 11:56         ` Christoph Hellwig
2025-06-12 12:21           ` Jens Axboe
2025-06-12 12:23             ` Christoph Hellwig
2025-06-12 12:28               ` Jens Axboe
2025-06-16 13:11                 ` Christoph Hellwig
2025-06-16 16:01                   ` Caleb Sander Mateos
2025-06-17  2:36                     ` Ming Lei
2025-06-17  4:39                       ` Christoph Hellwig
2025-06-18  6:04                   ` Hannes Reinecke
2025-06-12 12:27     ` Mohamed Abuelfotoh, Hazem
2025-06-24 10:45     ` Mohamed Abuelfotoh, Hazem

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=045d300e-9b52-4ead-8664-2cea6354f5bf@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=abuehaze@amazon.com \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox