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