public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Nitesh Shetty <nj.shetty@samsung.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	Javier Gonzalez <javier.gonz@samsung.com>,
	Matthew Wilcox <willy@infradead.org>,
	Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@lst.de>,
	Keith Busch <kbusch@meta.com>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"io-uring@vger.kernel.org" <io-uring@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"joshi.k@samsung.com" <joshi.k@samsung.com>
Subject: Re: [PATCHv10 0/9] write hints with nvme fdp, scsi streams
Date: Wed, 11 Dec 2024 15:06:01 +0530	[thread overview]
Message-ID: <20241211093549.n6dvl6c6xp4blccd@ubuntu> (raw)
In-Reply-To: <7d06cc60-7640-4431-a1cb-043a959e2ff3@acm.org>

[-- Attachment #1: Type: text/plain, Size: 2454 bytes --]

On 10/12/24 11:41AM, Bart Van Assche wrote:
>On 12/9/24 6:20 PM, Martin K. Petersen wrote:
>>What would be the benefit of submitting these operations concurrently?
>
>I expect that submitting the two copy operations concurrently would 
>result in lower latency for NVMe devices because the REQ_OP_COPY_DST
>operation can be submitted without waiting for the REQ_OP_COPY_SRC
>result.
>
>>As I have explained, it adds substantial complexity and object lifetime
>>issues throughout the stack. To what end?
>
>I think the approach of embedding the ROD token in the bio payload would
>add complexity in the block layer. The token-based copy offload approach
>involves submitting at least the following commands to the SCSI device:
>* POPULATE TOKEN with a list identifier and source data ranges as
>  parameters to send the source data ranges to the device.
>* RECEIVE ROD TOKEN INFORMATION with a list identifier as parameter to
>  receive the ROD token.
>* WRITE USING TOKEN with the ROD token and the destination ranges as
>  parameters to tell the device to start the copy operation.
>
>If the block layer would have to manage the ROD token, how would the ROD
>token be provided to the block layer? Bidirectional commands have been
>removed from the Linux kernel a while ago so the REQ_OP_COPY_IN
>parameter data would have to be used to pass parameters to the SCSI
>driver and also to pass the ROD token back to the block layer. A
>possible approach is to let the SCSI core allocate memory for the ROD
>token with kmalloc and to pass that pointer back to the block layer
>by writing that pointer into the REQ_OP_COPY_IN parameter data. While
>this can be implemented, I'm not sure that we should integrate support
>in the block layer for managing ROD tokens since ROD tokens are a
>concept that is specific to the SCSI protocol.
>
Block layer can allocate a buffer and send this as part of copy
operation.
Driver can store token/custom info inside the buffer sent along with
REQ_OP_COPY_SRC and expect that block layer sends back this info/buffer
again in REQ_OP_COPY_DST ?
This will reduce the effort for block layer to manage the lifetime issues.
Is there any reason, why we cant store the info inside this buffer in
driver ?

This scheme will require sequential submission of SRC and DST
bio's. This might increase in latency, but allows to have simpler design.
Main use case for copy is GC, which is mostly a background operation.

--
Nitesh Shetty


[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2024-12-11 10:32 UTC|newest]

Thread overview: 106+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-29 15:19 [PATCHv10 0/9] write hints with nvme fdp, scsi streams Keith Busch
2024-10-29 15:19 ` [PATCHv10 1/9] block: use generic u16 for write hints Keith Busch
2024-10-29 17:21   ` Bart Van Assche
2024-10-29 15:19 ` [PATCHv10 2/9] block: introduce max_write_hints queue limit Keith Busch
2024-10-29 15:19 ` [PATCHv10 3/9] statx: add write hint information Keith Busch
2024-10-29 15:19 ` [PATCHv10 4/9] block: allow ability to limit partition write hints Keith Busch
2024-10-29 15:23   ` Christoph Hellwig
2024-10-29 17:25   ` Bart Van Assche
2024-10-30  4:46     ` Christoph Hellwig
2024-10-30 20:11       ` Keith Busch
2024-10-30 20:26         ` Bart Van Assche
2024-10-30 20:37           ` Keith Busch
2024-10-30 21:15             ` Bart Van Assche
2024-10-29 15:19 ` [PATCHv10 5/9] block, fs: add write hint to kiocb Keith Busch
2024-10-29 15:19 ` [PATCHv10 6/9] io_uring: enable per-io hinting capability Keith Busch
2024-11-07  2:09   ` Jens Axboe
2024-10-29 15:19 ` [PATCHv10 7/9] block: export placement hint feature Keith Busch
2024-10-29 15:19 ` [PATCHv10 8/9] nvme: enable FDP support Keith Busch
2024-10-30  0:24   ` Chaitanya Kulkarni
2024-10-29 15:19 ` [PATCHv10 9/9] scsi: set permanent stream count in block limits Keith Busch
2024-10-29 15:26   ` Christoph Hellwig
2024-10-29 15:34     ` Keith Busch
2024-10-29 15:37       ` Christoph Hellwig
2024-10-29 15:38         ` Keith Busch
2024-10-29 15:53           ` Christoph Hellwig
2024-10-29 16:22             ` Keith Busch
2024-10-30  4:55               ` Christoph Hellwig
2024-10-30 15:41                 ` Keith Busch
2024-10-30 15:45                   ` Christoph Hellwig
2024-10-30 15:48                     ` Keith Busch
2024-10-30 15:50                       ` Christoph Hellwig
2024-10-30 16:42                         ` Keith Busch
2024-10-30 16:57                           ` Christoph Hellwig
2024-10-30 17:05                             ` Keith Busch
2024-10-30 17:15                               ` Christoph Hellwig
2024-10-30 17:23                             ` Keith Busch
2024-10-30 22:32                             ` Keith Busch
2024-10-31  8:19                               ` Hans Holmberg
2024-10-31 13:02                                 ` Christoph Hellwig
2024-10-31 14:06                                 ` Keith Busch
2024-11-01  7:16                                   ` Hans Holmberg
2024-11-01  8:19                                     ` Javier González
2024-11-01 14:49                                     ` Keith Busch
2024-11-06 14:26                                       ` Hans Holmberg
2024-10-30 16:59                 ` Bart Van Assche
2024-10-30 17:14                   ` Christoph Hellwig
2024-10-30 17:44                     ` Bart Van Assche
2024-11-01  1:03                       ` Jaegeuk Kim
2024-10-29 17:18     ` Bart Van Assche
2024-10-30  5:42       ` Christoph Hellwig
2024-10-29 15:24 ` [PATCHv10 0/9] write hints with nvme fdp, scsi streams Christoph Hellwig
2024-11-05 15:50 ` Christoph Hellwig
2024-11-06 18:36   ` Keith Busch
2024-11-07 20:36   ` Keith Busch
2024-11-08 14:18     ` Christoph Hellwig
2024-11-08 15:51       ` Keith Busch
2024-11-08 16:54         ` Matthew Wilcox
2024-11-08 17:43           ` Javier Gonzalez
2024-11-08 18:51             ` Bart Van Assche
2024-11-11  9:31               ` Javier Gonzalez
2024-11-11 17:45                 ` Bart Van Assche
2024-11-12 13:52                   ` Nitesh Shetty
2024-11-19  2:03                     ` Martin K. Petersen
2024-11-25 23:21                       ` Bart Van Assche
2024-11-27  2:54                         ` Martin K. Petersen
2024-11-27 18:42                           ` Bart Van Assche
2024-11-27 20:14                             ` Martin K. Petersen
2024-11-27 21:06                               ` Bart Van Assche
2024-11-28  2:09                                 ` Martin K. Petersen
2024-11-28  8:51                                   ` Damien Le Moal
2024-11-29  6:19                                     ` Christoph Hellwig
2024-11-29  6:23                                       ` Damien Le Moal
2024-11-28  3:24                               ` Christoph Hellwig
2024-11-28 15:21                               ` Keith Busch
2024-11-28 16:40                                 ` Christoph Hellwig
     [not found]                               ` <CGME20241205081138epcas5p2a47090e70c3cf19e562f63cd9fc495d1@epcas5p2.samsung.com>
2024-12-05  8:03                                 ` Nitesh Shetty
2024-12-05 20:37                                   ` Martin K. Petersen
2024-12-10  0:58                                     ` Bart Van Assche
2024-12-10  2:20                                       ` Martin K. Petersen
2024-12-10  9:53                                         ` Nitesh Shetty
2024-12-10 21:58                                           ` Bart Van Assche
2024-12-10 19:41                                         ` Bart Van Assche
2024-12-11  9:36                                           ` Nitesh Shetty [this message]
2024-12-11 17:27                                             ` Bart Van Assche
2024-12-11 19:38                                           ` Martin K. Petersen
2024-12-10  7:12                                     ` Christoph Hellwig
2024-12-10  8:05                                       ` Johannes Thumshirn
2024-12-10 10:58                                         ` hch
2024-12-10 19:21                                           ` Bart Van Assche
2024-12-11  4:07                                             ` Damien Le Moal
2024-12-11 21:06                                               ` Bart Van Assche
2024-12-11 21:21                                                 ` Jaegeuk Kim
2024-12-11 19:41                                       ` Martin K. Petersen
2024-12-09 22:13                                   ` Bart Van Assche
2024-12-09 23:13                                     ` Damien Le Moal
2024-12-09 23:31                                     ` Matthew Wilcox
2024-12-10  0:22                                       ` Bart Van Assche
2024-11-11  6:51             ` Christoph Hellwig
2024-11-11  9:30               ` Javier Gonzalez
2024-11-11  9:37                 ` Johannes Thumshirn
2024-11-11  9:41                   ` Javier Gonzalez
2024-11-11  9:42                     ` hch
2024-11-11  9:43                     ` Johannes Thumshirn
2024-11-11 10:37                       ` Javier Gonzalez
2024-11-11  6:49           ` Christoph Hellwig
2024-11-11  6:48         ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241211093549.n6dvl6c6xp4blccd@ubuntu \
    --to=nj.shetty@samsung.com \
    --cc=bvanassche@acm.org \
    --cc=hch@lst.de \
    --cc=io-uring@vger.kernel.org \
    --cc=javier.gonz@samsung.com \
    --cc=joshi.k@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=kbusch@meta.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox