Re: [dm-devel] [PATCH v3 02/11] blk: Introduce ->corrupted_range() for block device

2021-03-04 Thread Christoph Hellwig
On Thu, Mar 04, 2021 at 02:42:50PM -0800, Darrick J. Wong wrote: > My vision here, however, is to establish upcalls for /both/ types of > stroage. I already have patches for doing these kinds of callbacks properly for the block layer. They will be posted shortly. -- dm-devel mailing list

Re: [dm-devel] [PATCH v3 02/11] blk: Introduce ->corrupted_range() for block device

2021-03-04 Thread Darrick J. Wong
On Wed, Feb 10, 2021 at 02:21:39PM +0100, Christoph Hellwig wrote: > On Mon, Feb 08, 2021 at 06:55:21PM +0800, Shiyang Ruan wrote: > > In fsdax mode, the memory failure happens on block device. So, it is > > needed to introduce an interface for block devices. Each kind of block > > device can

[dm-devel] [PATCH 0/1] device filter

2021-03-04 Thread Sergei Shtepa
Hi all. I would like to discuss the idea of further extending the functionality of device mapper and suggest the concept of device filters (DF). The DM creates new block devices based on existing ones. DF will not create new devices. Using blk_interposer, DF will intercept bio requests, perform

[dm-devel] [PATCH 1/1] dm: adds an IOCTL to work with device-filters

2021-03-04 Thread Sergei Shtepa
The four simplest IOCTL's allow to create new filters, remove them and pass control commands specific to each target. Signed-off-by: Sergei Shtepa --- drivers/md/Makefile | 2 +- drivers/md/dm-ioctl.c | 22 ++ drivers/md/flt-ctl.c | 25

Re: [dm-devel] [PATCH 4/4] dm: support I/O polling

2021-03-04 Thread Mikulas Patocka
On Thu, 4 Mar 2021, Jeff Moyer wrote: > Hi, Mikulas, > > Mikulas Patocka writes: > > > On Wed, 3 Mar 2021, JeffleXu wrote: > > > >> > >> > >> On 3/3/21 3:05 AM, Mikulas Patocka wrote: > >> > >> > Support I/O polling if submit_bio_noacct_mq_direct returned non-empty > >> > cookie. > >> >

Re: [dm-devel] [PATCH 4/4] dm: support I/O polling

2021-03-04 Thread Mike Snitzer
On Thu, Mar 04 2021 at 10:01am -0500, Jeff Moyer wrote: > Hi, Mikulas, > > Mikulas Patocka writes: > > > On Wed, 3 Mar 2021, JeffleXu wrote: > > > >> > >> > >> On 3/3/21 3:05 AM, Mikulas Patocka wrote: > >> > >> > Support I/O polling if submit_bio_noacct_mq_direct returned non-empty > >> >

Re: [dm-devel] [PATCH 4/4] dm: support I/O polling

2021-03-04 Thread Jeff Moyer
Hi, Mikulas, Mikulas Patocka writes: > On Wed, 3 Mar 2021, JeffleXu wrote: > >> >> >> On 3/3/21 3:05 AM, Mikulas Patocka wrote: >> >> > Support I/O polling if submit_bio_noacct_mq_direct returned non-empty >> > cookie. >> > >> > Signed-off-by: Mikulas Patocka >> > >> > --- >> >

[dm-devel] [PATCH v5 06/12] blk-mq: add iterator for polling hw queues

2021-03-04 Thread Jeffle Xu
Add one helper function for iterating all hardware queues in polling mode. Signed-off-by: Jeffle Xu --- include/linux/blk-mq.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index b406cab347d6..d22269b3dbe9 100644 ---

[dm-devel] [PATCH v5 08/12] dm: always return BLK_QC_T_NONE for bio-based device

2021-03-04 Thread Jeffle Xu
Currently the returned cookie of bio-based device is not used at all. Cookie of bio-based device will be refactored in the following patch. Signed-off-by: Jeffle Xu Reviewed-by: Mike Snitzer --- drivers/md/dm.c | 26 ++ 1 file changed, 10 insertions(+), 16 deletions(-)

[dm-devel] [PATCH v5 12/12] dm: support IO polling for bio-based dm device

2021-03-04 Thread Jeffle Xu
IO polling is enabled when all underlying target devices are capable of IO polling. The sanity check supports the stacked device model, in which one dm device may be build upon another dm device. In this case, the mapped device will check if the underlying dm target device supports IO polling.

Re: [dm-devel] [PATCH 4/4] dm: support I/O polling

2021-03-04 Thread JeffleXu
On 3/3/21 6:09 PM, Mikulas Patocka wrote: > > > On Wed, 3 Mar 2021, JeffleXu wrote: > >> >> >> On 3/3/21 3:05 AM, Mikulas Patocka wrote: >> >>> Support I/O polling if submit_bio_noacct_mq_direct returned non-empty >>> cookie. >>> >>> Signed-off-by: Mikulas Patocka >>> >>> --- >>>

[dm-devel] [PATCH v5 04/12] block: add poll_capable method to support bio-based IO polling

2021-03-04 Thread Jeffle Xu
This method can be used to check if bio-based device supports IO polling or not. For mq devices, checking for hw queue in polling mode is adequate, while the sanity check shall be implementation specific for bio-based devices. For example, dm device needs to check if all underlying devices are

[dm-devel] [PATCH v5 11/12] block: sub-fastpath for bio-based polling

2021-03-04 Thread Jeffle Xu
Offer one sub-fastpath for bio-based polling when bio submitted to dm device gets split and enqueued into multiple hw queues, while the IO submission process has not been migrated to another CPU. In this case, the IO submission routine will return the CPU number on which the IO submission

[dm-devel] [PATCH v5 07/12] blk-mq: add one helper function getting hw queue

2021-03-04 Thread Jeffle Xu
Add one helper function getting hw queue mapping to specific CPU, and of specific type. Signed-off-by: Jeffle Xu --- block/blk-mq.c | 10 ++ include/linux/blk-mq.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/block/blk-mq.c b/block/blk-mq.c index

[dm-devel] [PATCH v5 10/12] block: fastpath for bio-based polling

2021-03-04 Thread Jeffle Xu
Offer one fastpath for bio-based polling when bio submitted to dm device is not split. In this case, there will be only one bio submitted to only one polling hw queue of one underlying mq device, and thus we don't need to track all split bios or iterate through all polling hw queues. The pointer

[dm-devel] [PATCH v5 02/12] block: add queue_to_disk() to get gendisk from request_queue

2021-03-04 Thread Jeffle Xu
Sometimes we need to get the corresponding gendisk from request_queue. It is preferred that block drivers store private data in gendisk->private_data rather than request_queue->queuedata, e.g. see: commit c4a59c4e5db3 ("dm: stop using ->queuedata"). So if only request_queue is given, we need to

[dm-devel] [PATCH v5 03/12] block: add poll method to support bio-based IO polling

2021-03-04 Thread Jeffle Xu
->poll_fn was introduced in commit ea435e1b9392 ("block: add a poll_fn callback to struct request_queue") to support bio-based queues such as nvme multipath, but was later removed in commit 529262d56dbe ("block: remove ->poll_fn"). Given commit c62b37d96b6e ("block: move ->make_request_fn to

[dm-devel] [PATCH v5 09/12] nvme/pci: don't wait for locked polling queue

2021-03-04 Thread Jeffle Xu
There's no sense waiting for the hw queue when it currently has been locked by another polling instance. The polling instance currently occupying the hw queue will help reap the completion events. It shall be safe to surrender the hw queue, as long as we could reapply for polling later. For

[dm-devel] [PATCH v5 00/12] dm: support polling

2021-03-04 Thread Jeffle Xu
[Changes since v4] - rebased to 5.12 - refactor patch 10 (fastpath) to fix the issue proposed by Mikulas Patocka in [1]. When bio doesn't get split and is submitted to *one* underlying device, then the o=polling routine will go into the fastpath. The refactored design is to return the dev_t of

[dm-devel] [PATCH v5 05/12] blk-mq: extract one helper function polling hw queue

2021-03-04 Thread Jeffle Xu
Extract the logic of polling one hw queue and related statistics handling out as the helper function. Signed-off-by: Jeffle Xu --- block/blk-mq.c | 5 + include/linux/blk-mq.h | 13 + 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/block/blk-mq.c

[dm-devel] [PATCH v5 01/12] block: move definition of blk_qc_t to types.h

2021-03-04 Thread Jeffle Xu
So that kiocb.ki_cookie can be defined as blk_qc_t, which will enforce the encapsulation. Signed-off-by: Jeffle Xu Reviewed-by: Christoph Hellwig Reviewed-by: Mike Snitzer --- include/linux/blk_types.h | 2 +- include/linux/fs.h| 2 +- include/linux/types.h | 3 +++ 3 files

Re: [dm-devel] [PATCH] multipath-tools: add DellEMC/PowerStore to hardware table

2021-03-04 Thread Martin Wilck
On Thu, 2021-03-04 at 00:28 +0100, Xose Vazquez Perez wrote: > Info from: > https://www.delltechnologies.com/en-us/collaterals/unauth/technical-guides-support-information/products/storage-2/docu5128.pdf > > Cc: Martin Wilck > Cc: Benjamin Marzinski > Cc: Christophe Varoqui > Cc: DM-DEVEL ML

Re: [dm-devel] [PATCH 1/4] block: introduce a function submit_bio_noacct_mq_direct

2021-03-04 Thread Mikulas Patocka
On Wed, 3 Mar 2021, Jens Axboe wrote: > On 3/2/21 12:05 PM, Mikulas Patocka wrote: > > There seems to be something wrong with how this series is being sent > out. I have 1/4 and 3/4, but both are just attachments. > > -- > Jens Axboe I used quilt to send it. I don't know what's wrong with

Re: [dm-devel] [PATCH 4/4] dm: support I/O polling

2021-03-04 Thread Mikulas Patocka
On Thu, 4 Mar 2021, JeffleXu wrote: > > __split_and_process_non_flush records the poll cookie in ci.poll_cookie. > > When we processed all the bios, we poll for the last cookie here: > > > > if (ci.poll_cookie != BLK_QC_T_NONE) { > > while (atomic_read(>io_count) > 1