public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v20 03/12] block: add copy offload support
@ 2024-06-06  5:56 Christoph Hellwig
  0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2024-06-06  5:56 UTC (permalink / raw)
  To: Nitesh Shetty
  Cc: Christoph Hellwig, Jens Axboe, Jonathan Corbet, Alasdair Kergon,
	Mike Snitzer, Mikulas Patocka, Keith Busch, Sagi Grimberg,
	Chaitanya Kulkarni, Alexander Viro, Christian Brauner, Jan Kara,
	martin.petersen, bvanassche, david, hare, damien.lemoal, anuj20.g,
	joshi.k, nitheshshetty, gost.dev, linux-block, linux-kernel,
	linux-doc, dm-devel, linux-nvme, linux-fsdevel

On Tue, Jun 04, 2024 at 10:50:26AM +0000, Nitesh Shetty wrote:
>>> +	if (!cio)
>>> +		return -ENOMEM;
>>> +	atomic_set(&cio->refcount, 1);
>>> +	cio->waiter = current;
>>> +	cio->endio = endio;
>>> +	cio->private = private;
>>
>> For the main use this could be allocated on-stack.  Is there any good
>> reason to not let callers that really want an async version to implement
>> the async behavior themselves using suitable helpers?
>>
> We cannot do on-stack allocation of cio as we use it in endio handler.
> cio will be used to track partial IO completion as well.
> Callers requiring async implementation would need to manage all this
> bookkeeping themselves, leading to duplication of code. We felt it is
> better to do it here onetime.
> Do you see it any differently ?

We don't really to these async variants for other in-kernel I/O,
so unless we have a really good reason I'd not do here.  The usual
approach is to just have a submission helper for async in-kernel
special bios types, and the let the caller handle the rest.


^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <CGME20240520102853epcas5p42d635d6712b8876ea22a45d730cb1378@epcas5p4.samsung.com>]

end of thread, other threads:[~2024-06-06  5:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-06  5:56 [PATCH v20 03/12] block: add copy offload support Christoph Hellwig
     [not found] <CGME20240520102853epcas5p42d635d6712b8876ea22a45d730cb1378@epcas5p4.samsung.com>
2024-05-20 10:20 ` [PATCH v20 00/12] Implement " Nitesh Shetty
2024-05-20 10:20   ` [PATCH v20 03/12] block: add " Nitesh Shetty
2024-06-01  6:16     ` Christoph Hellwig
2024-06-04 10:50       ` Nitesh Shetty

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox