Re: [PATCH 6/9] nvme: add support for batched completion of polled IO
From: Christoph Hellwig <hch@infradead.org>
Date: 2021-10-13 15:18:05
From: Christoph Hellwig <hch@infradead.org>
Date: 2021-10-13 15:18:05
On Wed, Oct 13, 2021 at 09:10:01AM -0600, Jens Axboe wrote:
quoted
Also - can you look into turning this logic into an inline function with a callback for the driver? I think in general gcc will avoid the indirect call for function pointers passed directly. That way we can keep a nice code structure but also avoid the indirections. Same for nvme_pci_complete_batch.Not sure I follow. It's hard to do a generic callback for this, as the batch can live outside the block layer through the plug. That's why it's passed the way it is in terms of completion hooks.
Basically turn nvme_pci_complete_batch into a core nvme helper (inline) with nvme_pci_unmap_rq passed as a function pointer that gets inlined.