linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Damien Le Moal <damien.lemoal@wdc.com>,
	linux-block@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
	linux-scsi@vger.kernel.org,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	dm-devel@redhat.com, Mike Snitzer <snitzer@redhat.com>,
	linux-f2fs-devel@lists.sourceforge.net,
	Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <yuchao0@huawei.com>
Subject: Re: [PATCH 1/9] block: Enhance blk_revalidate_disk_zones()
Date: Fri, 8 Nov 2019 08:10:55 +0100	[thread overview]
Message-ID: <bc7bb317-28ec-dea7-a317-9936bda801b2@suse.de> (raw)
In-Reply-To: <20191108015702.233102-2-damien.lemoal@wdc.com>

On 11/8/19 2:56 AM, Damien Le Moal wrote:
> For ZBC and ZAC zoned devices, the scsi driver revalidation processing
> implemented by sd_revalidate_disk() includes a call to
> sd_zbc_read_zones() which executes a full disk zone report used to
> check that all zones of the disk are the same size. This processing is
> followed by a call to blk_revalidate_disk_zones(), used to initialize
> the device request queue zone bitmaps (zone type and zone write lock
> bitmaps). To do so, blk_revalidate_disk_zones() also executes a full
> device zone report to obtain zone types. As a result, the entire
> zoned block device revalidation process includes two full device zone
> report.
> 
> By moving the zone size checks into blk_revalidate_disk_zones(), this
> process can be optimized to a single full device zone report, leading to
> shorter device scan and revalidation times. This patch implements this
> optimization, reducing the original full device zone report implemented
> in sd_zbc_check_zones() to a single, small, report zones command
> execution to obtain the size of the first zone of the device. Checks
> whether all zones of the device are the same size as the first zone
> size are moved to the generic blk_check_zone() function called from
> blk_revalidate_disk_zones().
> 
> This optimization also has the following benefits:
> 1) fewer memory allocations in the scsi layer during disk revalidation
>    as the potentailly large buffer for zone report execution is not
>    needed.
> 2) Implement zone checks in a generic manner, reducing the burden on
>    device driver which only need to obtain the zone size and check that
>    this size is a power of 2 number of LBAs. Any new type of zoned
>    block device will benefit from this.
> 
> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
> ---
>  block/blk-zoned.c     |  62 +++++++++++++++++++++++-
>  drivers/scsi/sd_zbc.c | 107 ++++++++----------------------------------
>  2 files changed, 80 insertions(+), 89 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      Teamlead Storage & Networking
hare@suse.de			                  +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 247165 (AG München), GF: Felix Imendörffer

  parent reply	other threads:[~2019-11-08  7:11 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-08  1:56 [PATCH 0/9] Zoned block device enhancements and zone report rework Damien Le Moal
2019-11-08  1:56 ` [PATCH 1/9] block: Enhance blk_revalidate_disk_zones() Damien Le Moal
2019-11-08  6:28   ` [dm-devel] " Christoph Hellwig
2019-11-08  7:10   ` Hannes Reinecke [this message]
2019-11-08  1:56 ` [PATCH 2/9] block: cleanup the !zoned case in blk_revalidate_disk_zones Damien Le Moal
2019-11-08  7:11   ` Hannes Reinecke
2019-11-08 18:50   ` Chaitanya Kulkarni
2019-11-08  1:56 ` [PATCH 3/9] block: Simplify report zones execution Damien Le Moal
2019-11-08  7:12   ` Hannes Reinecke
2019-11-08  1:56 ` [PATCH 4/9] block: Remove partition support for zoned block devices Damien Le Moal
2019-11-08  6:30   ` [dm-devel] " Christoph Hellwig
2019-11-08  7:17   ` Hannes Reinecke
2019-11-08  7:28     ` Damien Le Moal
2019-11-08  1:56 ` [PATCH 5/9] null_blk: clean up the block device operations Damien Le Moal
2019-11-08  7:17   ` Hannes Reinecke
2019-11-08 18:47   ` Chaitanya Kulkarni
2019-11-08  1:56 ` [PATCH 6/9] null_blk: clean up report zones Damien Le Moal
2019-11-08  7:18   ` Hannes Reinecke
2019-11-08 18:47   ` Chaitanya Kulkarni
2019-11-08  1:57 ` [PATCH 7/9] null_blk: Add zone_nr_conv to features Damien Le Moal
2019-11-08  7:18   ` Hannes Reinecke
2019-11-08 18:48   ` Chaitanya Kulkarni
2019-11-08  1:57 ` [PATCH 8/9] scsi: sd_zbc: Cleanup sd_zbc_alloc_report_buffer() Damien Le Moal
2019-11-08  6:31   ` [dm-devel] " Christoph Hellwig
2019-11-08  7:20   ` Hannes Reinecke
2019-11-08 19:06   ` [dm-devel] " Bart Van Assche
2019-11-09  2:54     ` Damien Le Moal
2019-11-09  3:02       ` Bart Van Assche
2019-11-08  1:57 ` [PATCH 9/9] block: rework zone reporting Damien Le Moal
2019-11-08  7:23   ` Hannes Reinecke
2019-11-08 15:16   ` Mike Snitzer

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=bc7bb317-28ec-dea7-a317-9936bda801b2@suse.de \
    --to=hare@suse.de \
    --cc=axboe@kernel.dk \
    --cc=damien.lemoal@wdc.com \
    --cc=dm-devel@redhat.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=snitzer@redhat.com \
    --cc=yuchao0@huawei.com \
    /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;
as well as URLs for NNTP newsgroup(s).