* Re: [PATCH V2 1/1] pmem: set QUEUE_FLAG_NOWAIT
[not found] ` <0a2d86d6-34a1-0c8d-389c-1dc2f886f108@nvidia.com>
@ 2023-08-02 12:30 ` Christoph Hellwig
2023-08-02 15:27 ` Jeff Moyer
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Christoph Hellwig @ 2023-08-02 12:30 UTC (permalink / raw)
To: Chaitanya Kulkarni
Cc: Jeff Moyer, Christoph Hellwig, dan.j.williams@intel.com,
vishal.l.verma@intel.com, dave.jiang@intel.com,
ira.weiny@intel.com, nvdimm@lists.linux.dev, axboe, linux-block
Given that pmem simply loops over an arbitrarily large bio I think
we also need a threshold for which to allow nowait I/O. While it
won't block for giant I/Os, doing all of them in the submitter
context isn't exactly the idea behind the nowait I/O.
I'm not really sure what a good theshold would be, though.
Btw, please also always add linux-block to the Cc list for block
driver patches that are even the slightest bit about the block
layer interface.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH V2 1/1] pmem: set QUEUE_FLAG_NOWAIT
2023-08-02 12:30 ` [PATCH V2 1/1] pmem: set QUEUE_FLAG_NOWAIT Christoph Hellwig
@ 2023-08-02 15:27 ` Jeff Moyer
2023-08-03 3:24 ` Chaitanya Kulkarni
2023-08-02 15:36 ` Jens Axboe
2023-08-03 3:17 ` Chaitanya Kulkarni
2 siblings, 1 reply; 8+ messages in thread
From: Jeff Moyer @ 2023-08-02 15:27 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Chaitanya Kulkarni, dan.j.williams@intel.com,
vishal.l.verma@intel.com, dave.jiang@intel.com,
ira.weiny@intel.com, nvdimm@lists.linux.dev, axboe, linux-block
Christoph Hellwig <hch@lst.de> writes:
> Given that pmem simply loops over an arbitrarily large bio I think
> we also need a threshold for which to allow nowait I/O. While it
> won't block for giant I/Os, doing all of them in the submitter
> context isn't exactly the idea behind the nowait I/O.
>
> I'm not really sure what a good theshold would be, though.
There's no mention of the latency of the submission side in the
documentation for RWF_NOWAIT. The man page says "Do not wait for data
which is not immediately available." Data in pmem *is* immediately
available. If we wanted to enforce a latency threshold for submission,
it would have to be configurable and, ideally, a part of the API. I
don't think it's something we should even try to guarantee, though,
unless application writers are asking for it.
So, I think with the change to return -EAGAIN for writes to poisoned
memory, this patch is probably ok.
Chaitanya, could you send a v2?
Thanks,
Jeff
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH V2 1/1] pmem: set QUEUE_FLAG_NOWAIT
2023-08-02 12:30 ` [PATCH V2 1/1] pmem: set QUEUE_FLAG_NOWAIT Christoph Hellwig
2023-08-02 15:27 ` Jeff Moyer
@ 2023-08-02 15:36 ` Jens Axboe
2023-08-02 16:25 ` Christoph Hellwig
2023-08-03 3:21 ` Chaitanya Kulkarni
2023-08-03 3:17 ` Chaitanya Kulkarni
2 siblings, 2 replies; 8+ messages in thread
From: Jens Axboe @ 2023-08-02 15:36 UTC (permalink / raw)
To: Christoph Hellwig, Chaitanya Kulkarni
Cc: Jeff Moyer, dan.j.williams@intel.com, vishal.l.verma@intel.com,
dave.jiang@intel.com, ira.weiny@intel.com, nvdimm@lists.linux.dev,
linux-block
On 8/2/23 6:30?AM, Christoph Hellwig wrote:
> Given that pmem simply loops over an arbitrarily large bio I think
> we also need a threshold for which to allow nowait I/O. While it
> won't block for giant I/Os, doing all of them in the submitter
> context isn't exactly the idea behind the nowait I/O.
You can do a LOT of looping over a giant bio and still come out way
ahead compared to needing to punt to a different thread. So I do think
it's the right choice. But I'm making assumptions here on what it looks
like, as I haven't seen the patch...
> Btw, please also always add linux-block to the Cc list for block
> driver patches that are even the slightest bit about the block
> layer interface.
Indeed. Particularly for these nowait changes, as some of them have been
pretty broken in the past.
--
Jens Axboe
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH V2 1/1] pmem: set QUEUE_FLAG_NOWAIT
2023-08-02 15:36 ` Jens Axboe
@ 2023-08-02 16:25 ` Christoph Hellwig
2023-08-03 3:21 ` Chaitanya Kulkarni
1 sibling, 0 replies; 8+ messages in thread
From: Christoph Hellwig @ 2023-08-02 16:25 UTC (permalink / raw)
To: Jens Axboe
Cc: Christoph Hellwig, Chaitanya Kulkarni, Jeff Moyer,
dan.j.williams@intel.com, vishal.l.verma@intel.com,
dave.jiang@intel.com, ira.weiny@intel.com, nvdimm@lists.linux.dev,
linux-block
On Wed, Aug 02, 2023 at 09:36:32AM -0600, Jens Axboe wrote:
> You can do a LOT of looping over a giant bio and still come out way
> ahead compared to needing to punt to a different thread. So I do think
> it's the right choice. But I'm making assumptions here on what it looks
> like, as I haven't seen the patch...
"a LOT" is relative. A GB or two will block the submission thread for
quite a while.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH V2 1/1] pmem: set QUEUE_FLAG_NOWAIT
2023-08-02 12:30 ` [PATCH V2 1/1] pmem: set QUEUE_FLAG_NOWAIT Christoph Hellwig
2023-08-02 15:27 ` Jeff Moyer
2023-08-02 15:36 ` Jens Axboe
@ 2023-08-03 3:17 ` Chaitanya Kulkarni
2 siblings, 0 replies; 8+ messages in thread
From: Chaitanya Kulkarni @ 2023-08-03 3:17 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Jeff Moyer, dan.j.williams@intel.com, vishal.l.verma@intel.com,
dave.jiang@intel.com, ira.weiny@intel.com, nvdimm@lists.linux.dev,
axboe@kernel.dk, linux-block@vger.kernel.org
On 8/2/23 05:30, Christoph Hellwig wrote:
> Given that pmem simply loops over an arbitrarily large bio I think
> we also need a threshold for which to allow nowait I/O. While it
> won't block for giant I/Os, doing all of them in the submitter
> context isn't exactly the idea behind the nowait I/O.
>
> I'm not really sure what a good theshold would be, though.
>
> Btw, please also always add linux-block to the Cc list for block
> driver patches that are even the slightest bit about the block
> layer interface.
will do ..
-ck
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH V2 1/1] pmem: set QUEUE_FLAG_NOWAIT
2023-08-02 15:36 ` Jens Axboe
2023-08-02 16:25 ` Christoph Hellwig
@ 2023-08-03 3:21 ` Chaitanya Kulkarni
1 sibling, 0 replies; 8+ messages in thread
From: Chaitanya Kulkarni @ 2023-08-03 3:21 UTC (permalink / raw)
To: Jens Axboe
Cc: Jeff Moyer, dan.j.williams@intel.com, vishal.l.verma@intel.com,
dave.jiang@intel.com, ira.weiny@intel.com, nvdimm@lists.linux.dev,
linux-block@vger.kernel.org, Christoph Hellwig
On 8/2/23 08:36, Jens Axboe wrote:
> On 8/2/23 6:30?AM, Christoph Hellwig wrote:
>> Given that pmem simply loops over an arbitrarily large bio I think
>> we also need a threshold for which to allow nowait I/O. While it
>> won't block for giant I/Os, doing all of them in the submitter
>> context isn't exactly the idea behind the nowait I/O.
> You can do a LOT of looping over a giant bio and still come out way
> ahead compared to needing to punt to a different thread. So I do think
> it's the right choice. But I'm making assumptions here on what it looks
> like, as I haven't seen the patch...
>
will send out the V3 soon and CC you and linux-block ...
>> Btw, please also always add linux-block to the Cc list for block
>> driver patches that are even the slightest bit about the block
>> layer interface.
> Indeed. Particularly for these nowait changes, as some of them have been
> pretty broken in the past.
>
yes, didn't forgot, lately dealing with bunch of stupidity, I'll send
zram and null_blk nowait changes soon with your comments fixed ..
-ck
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH V2 1/1] pmem: set QUEUE_FLAG_NOWAIT
2023-08-02 15:27 ` Jeff Moyer
@ 2023-08-03 3:24 ` Chaitanya Kulkarni
2023-08-03 13:11 ` Jeff Moyer
0 siblings, 1 reply; 8+ messages in thread
From: Chaitanya Kulkarni @ 2023-08-03 3:24 UTC (permalink / raw)
To: Jeff Moyer, Christoph Hellwig
Cc: dan.j.williams@intel.com, vishal.l.verma@intel.com,
dave.jiang@intel.com, ira.weiny@intel.com, nvdimm@lists.linux.dev,
axboe@kernel.dk, linux-block@vger.kernel.org
On 8/2/23 08:27, Jeff Moyer wrote:
> Christoph Hellwig <hch@lst.de> writes:
>
>> Given that pmem simply loops over an arbitrarily large bio I think
>> we also need a threshold for which to allow nowait I/O. While it
>> won't block for giant I/Os, doing all of them in the submitter
>> context isn't exactly the idea behind the nowait I/O.
>>
>> I'm not really sure what a good theshold would be, though.
> There's no mention of the latency of the submission side in the
> documentation for RWF_NOWAIT. The man page says "Do not wait for data
> which is not immediately available." Data in pmem *is* immediately
> available. If we wanted to enforce a latency threshold for submission,
> it would have to be configurable and, ideally, a part of the API. I
> don't think it's something we should even try to guarantee, though,
> unless application writers are asking for it.
I need to see the usecase from application writter who cannot come
with a solution so kernel have to provide this interface, I'll be happy
to do that ..
> So, I think with the change to return -EAGAIN for writes to poisoned
> memory, this patch is probably ok.
I believe you mean the same one I've provided earlier incremental ..
> Chaitanya, could you send a v2?
sure ...
-ck
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH V2 1/1] pmem: set QUEUE_FLAG_NOWAIT
2023-08-03 3:24 ` Chaitanya Kulkarni
@ 2023-08-03 13:11 ` Jeff Moyer
0 siblings, 0 replies; 8+ messages in thread
From: Jeff Moyer @ 2023-08-03 13:11 UTC (permalink / raw)
To: Chaitanya Kulkarni
Cc: Christoph Hellwig, dan.j.williams@intel.com,
vishal.l.verma@intel.com, dave.jiang@intel.com,
ira.weiny@intel.com, nvdimm@lists.linux.dev, axboe@kernel.dk,
linux-block@vger.kernel.org
Chaitanya Kulkarni <chaitanyak@nvidia.com> writes:
> On 8/2/23 08:27, Jeff Moyer wrote:
>> So, I think with the change to return -EAGAIN for writes to poisoned
>> memory, this patch is probably ok.
>
> I believe you mean the same one I've provided earlier incremental ..
Yes, sorry if that wasn't clear.
>> Chaitanya, could you send a v2?
>
> sure ...
and I guess I should have said v3. ;-)
Cheers,
Jeff
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-08-03 13:09 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230731224617.8665-1-kch@nvidia.com>
[not found] ` <20230731224617.8665-2-kch@nvidia.com>
[not found] ` <x491qgmwzuv.fsf@segfault.boston.devel.redhat.com>
[not found] ` <20230801155943.GA13111@lst.de>
[not found] ` <x49wmyevej2.fsf@segfault.boston.devel.redhat.com>
[not found] ` <0a2d86d6-34a1-0c8d-389c-1dc2f886f108@nvidia.com>
2023-08-02 12:30 ` [PATCH V2 1/1] pmem: set QUEUE_FLAG_NOWAIT Christoph Hellwig
2023-08-02 15:27 ` Jeff Moyer
2023-08-03 3:24 ` Chaitanya Kulkarni
2023-08-03 13:11 ` Jeff Moyer
2023-08-02 15:36 ` Jens Axboe
2023-08-02 16:25 ` Christoph Hellwig
2023-08-03 3:21 ` Chaitanya Kulkarni
2023-08-03 3:17 ` Chaitanya Kulkarni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).