Re: [dm-devel] [RFC PATCH V2 1/3] block: add helper of blk_queue_poll

2021-06-21 Thread Christoph Hellwig
On Thu, Jun 17, 2021 at 06:35:47PM +0800, Ming Lei wrote: > There has been 3 users, and will be more, so add one such helper. > > Reviewed-by: Chaitanya Kulkarni > Reviewed-by: Jeffle Xu > Reviewed-by: Hannes Reinecke > Signed-off-by: Ming Lei I still don't like hiding a simple flag test

Re: [dm-devel] [PATCH v9 0/4] block device interposer

2021-06-21 Thread Sergei Shtepa
Hi Mike, This is a follow up message. Did you have a chance to take a look at the latest patchset from April? Thanks! I can update the patch to be compatible with kernel 5.14. I would like to know if you still have interest in blk_interposer. -- Sergei Shtepa Veeam Software developer. --

Re: [dm-devel] [RFC PATCH V2 3/3] dm: support bio polling

2021-06-21 Thread Ming Lei
On Mon, Jun 21, 2021 at 07:33:34PM +0800, JeffleXu wrote: > > > On 6/18/21 10:39 PM, Ming Lei wrote: > > From 47e523b9ee988317369eaadb96826323cd86819e Mon Sep 17 00:00:00 2001 > > From: Ming Lei > > Date: Wed, 16 Jun 2021 16:13:46 +0800 > > Subject: [RFC PATCH V3 3/3] dm: support bio polling >

[dm-devel] [PATCH 0/1] dm writecache: commit just one block, not a full page

2021-06-21 Thread Mikulas Patocka
Hi Mike I suggest to remove the patch 991bd8d7bc78966b4dc427b53a144f276bffcd52 ("dm writecache: commit just one block, not a full page") from your repository and replace it with this patch. Sub-4k writes have poor performance with most SSDs, so we should make sure that we write at least 4k.

[dm-devel] [PATCH 1/1] dm writecache: commit just one block, not a full page

2021-06-21 Thread Mikulas Patocka
Some architectures have pages larger than 4k and committing a full page causes needless overhead. Fix this by writing a single block when committing the superblock. Writes smaller than 4k are slow on most SSDs (because the SSD performs read-modify-write internally), so make sure that we write at

[dm-devel] [PATCH] dm-writecache: write at least 4k when committing

2021-06-21 Thread Mikulas Patocka
SSDs perform badly with sub-4k writes (because they perfrorm read-modify-write internally), so make sure that we write at least 4k when committing. Signed-off-by: Mikulas Patocka Fixes: 991bd8d7bc78 ("dm writecache: commit just one block, not a full page") Index:

Re: [dm-devel] [RFC PATCH V2 3/3] dm: support bio polling

2021-06-21 Thread Ming Lei
On Tue, Jun 22, 2021 at 10:26:15AM +0800, JeffleXu wrote: > > > On 6/21/21 10:04 PM, Ming Lei wrote: > > On Mon, Jun 21, 2021 at 07:33:34PM +0800, JeffleXu wrote: > >> > >> > >> On 6/18/21 10:39 PM, Ming Lei wrote: > >>> From 47e523b9ee988317369eaadb96826323cd86819e Mon Sep 17 00:00:00 2001 >

Re: [dm-devel] [RFC PATCH V2 3/3] dm: support bio polling

2021-06-21 Thread Ming Lei
On Mon, Jun 21, 2021 at 09:36:56AM +0200, Christoph Hellwig wrote: > On Thu, Jun 17, 2021 at 06:35:49PM +0800, Ming Lei wrote: > > + /* > > +* Only support bio polling for normal IO, and the target io is > > +* exactly inside the dm io instance > > +*/ > > +

[dm-devel] [PATCH] dm-writecache: add a "metadata_only" parameter

2021-06-21 Thread Mikulas Patocka
This patch adds a "metadata_only" parameter. When it is present, only metadata are promoted to the cache. It improves performance in the "git checkout" benchmark from 341s to 312s. Signed-off-by: Mikulas Patocka Index: linux/drivers/md/dm-writecache.c

Re: [dm-devel] [RFC PATCH V2 3/3] dm: support bio polling

2021-06-21 Thread Christoph Hellwig
On Thu, Jun 17, 2021 at 06:35:49PM +0800, Ming Lei wrote: > + /* > + * Only support bio polling for normal IO, and the target io is > + * exactly inside the dm io instance > + */ > + ci->io->submit_as_polled = !!(ci->bio->bi_opf & REQ_POLLED); Nit: the !! is not needed. >

Re: [dm-devel] [RFC PATCH V2 2/3] block: add ->poll_bio to block_device_operations

2021-06-21 Thread Christoph Hellwig
> + struct gendisk *disk = bio->bi_bdev->bd_disk; > + struct request_queue *q = disk->queue; > blk_qc_t cookie = READ_ONCE(bio->bi_cookie); > int ret; > > - if (cookie == BLK_QC_T_NONE || !blk_queue_poll(q)) > + if ((queue_is_mq(q) && cookie == BLK_QC_T_NONE) || > +

Re: [dm-devel] [RFC PATCH V2 1/3] block: add helper of blk_queue_poll

2021-06-21 Thread Ming Lei
On Mon, Jun 21, 2021 at 09:20:36AM +0200, Christoph Hellwig wrote: > On Thu, Jun 17, 2021 at 06:35:47PM +0800, Ming Lei wrote: > > There has been 3 users, and will be more, so add one such helper. > > > > Reviewed-by: Chaitanya Kulkarni > > Reviewed-by: Jeffle Xu > > Reviewed-by: Hannes

Re: [dm-devel] [RFC PATCH V2 2/3] block: add ->poll_bio to block_device_operations

2021-06-21 Thread Ming Lei
On Mon, Jun 21, 2021 at 09:25:02AM +0200, Christoph Hellwig wrote: > > + struct gendisk *disk = bio->bi_bdev->bd_disk; > > + struct request_queue *q = disk->queue; > > blk_qc_t cookie = READ_ONCE(bio->bi_cookie); > > int ret; > > > > - if (cookie == BLK_QC_T_NONE ||