Re: [PATCH] block: use plug request list tail for one-shot backmerge attempt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/12/25 5:56 AM, Christoph Hellwig wrote:
> On Thu, Jun 12, 2025 at 05:49:16AM -0600, Jens Axboe wrote:
>>> 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.
> 
> But is that actually a concern here?  If you look at my patch we can
> now use the list_cut helper for the queue_rqs submission sorting,
> and for the actual submission we walk each request anyway (and might
> get along without removal entirely if we dare to leave the dangling
> pointers around).  The multi-queue dispatch could probably use the
> cut as well.  For the cached rqs and completion  we could st?ck to the
> singly linked list as they don't really mix up with the submission
> IFF that shows up as an issue there.

It's certainly going to make the cached handling more expensive, as the
doubly linked behavior there is just pointless. Generally LIFO behavior
there is preferable. I'd strongly suggest we use the doubly linked side
for dispatch, and retain singly linked for cached + completion. If not
I'm 100% sure we're going to be revisiting this again down the line, and
redo those parts yet again.

-- 
Jens Axboe




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux