From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: Damien Le Moal <dlemoal@kernel.org>, Jens Axboe <axboe@kernel.dk>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
Keith Busch <keith.busch@wdc.com>, Christoph Hellwig <hch@lst.de>,
"dm-devel@lists.linux.dev" <dm-devel@lists.linux.dev>,
Mike Snitzer <snitzer@kernel.org>,
Mikulas Patocka <mpatocka@redhat.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-xfs@vger.kernel.org" <linux-xfs@vger.kernel.org>,
Carlos Maiolino <cem@kernel.org>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
David Sterba <dsterba@suse.com>
Subject: Re: [PATCH v3 06/15] block: use zone condition to determine conventional zones
Date: Tue, 4 Nov 2025 04:05:57 +0000 [thread overview]
Message-ID: <7bcfce9c-a2bf-4b8b-8a56-e0f518d87170@nvidia.com> (raw)
In-Reply-To: <20251104013147.913802-7-dlemoal@kernel.org>
On 11/3/25 17:31, Damien Le Moal wrote:
> The conv_zones_bitmap field of struct gendisk is used to define a bitmap
> to identify the conventional zones of a zoned block device. The bit for
> a zone is set in this bitmap if the zone is a conventional one, that is,
> if the zone type is BLK_ZONE_TYPE_CONVENTIONAL. For such zone, this
> always corresponds to the zone condition BLK_ZONE_COND_NOT_WP.
> In other words, conv_zones_bitmap tracks a single condition of the
> zones of a zoned block device.
>
> In preparation for tracking more zone conditions, change
> conv_zones_bitmap into an array of zone conditions, using 1 byte per
> zone. This increases the memory usage from 1 bit per zone to 1 byte per
> zone, that is, from 16 KiB to about 100 KiB for a 30 TB SMR HDD with 256
> MiB zones. This is a trade-off to allow fast cached report zones later
> on top of this change.
>
> Rename the conv_zones_bitmap field of struct gendisk to zones_cond. Add
> a blk_revalidate_zone_cond() function to initialize the zones_cond array
> of a disk during device scan and to update it on device revalidation.
> Move the allocation of the zones_cond array to
> disk_revalidate_zone_resources(), making sure that this array is always
> allocated, even for devices that do not need zone write plugs (zone
> resources), to ensure that bdev_zone_is_seq() can be re-implemented to
> use the zone condition array in place of the conv zones bitmap.
>
> Finally, the function bdev_zone_is_seq() is rewritten to use a test on
> the condition of the target zone.
>
> Signed-off-by: Damien Le Moal<dlemoal@kernel.org>
> Reviewed-by: Christoph Hellwig<hch@lst.de>
> Reviewed-by: Johannes Thumshirn<johannes.thumshirn@wdc.com>
Looks good.
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
-ck
next prev parent reply other threads:[~2025-11-04 4:06 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-04 1:31 [PATCH v3 00/15] Introduce cached report zones Damien Le Moal
2025-11-04 1:31 ` [PATCH v3 01/15] block: handle zone management operations completions Damien Le Moal
2025-11-04 4:04 ` Chaitanya Kulkarni
2025-11-04 17:53 ` Hannes Reinecke
2025-11-04 1:31 ` [PATCH v3 02/15] block: freeze queue when updating zone resources Damien Le Moal
2025-11-04 4:04 ` Chaitanya Kulkarni
2025-11-04 17:56 ` Hannes Reinecke
2025-11-04 1:31 ` [PATCH v3 03/15] block: cleanup blkdev_report_zones() Damien Le Moal
2025-11-04 4:04 ` Chaitanya Kulkarni
2025-11-04 1:31 ` [PATCH v3 04/15] block: introduce disk_report_zone() Damien Le Moal
2025-11-04 4:05 ` Chaitanya Kulkarni
2025-11-04 19:39 ` Hannes Reinecke
2025-11-04 1:31 ` [PATCH v3 05/15] block: reorganize struct blk_zone_wplug Damien Le Moal
2025-11-04 4:05 ` Chaitanya Kulkarni
2025-11-05 7:02 ` Hannes Reinecke
2025-11-04 1:31 ` [PATCH v3 06/15] block: use zone condition to determine conventional zones Damien Le Moal
2025-11-04 4:05 ` Chaitanya Kulkarni [this message]
2025-11-05 7:04 ` Hannes Reinecke
2025-11-04 1:31 ` [PATCH v3 07/15] block: track zone conditions Damien Le Moal
2025-11-04 4:08 ` Chaitanya Kulkarni
2025-11-05 7:06 ` Hannes Reinecke
2025-11-04 1:31 ` [PATCH v3 08/15] block: refactor blkdev_report_zones() code Damien Le Moal
2025-11-04 4:09 ` Chaitanya Kulkarni
2025-11-05 7:07 ` Hannes Reinecke
2025-11-04 1:31 ` [PATCH v3 09/15] block: introduce blkdev_get_zone_info() Damien Le Moal
2025-11-04 4:10 ` Chaitanya Kulkarni
2025-11-05 7:09 ` Hannes Reinecke
2025-11-04 1:31 ` [PATCH v3 10/15] block: introduce blkdev_report_zones_cached() Damien Le Moal
2025-11-04 4:11 ` Chaitanya Kulkarni
2025-11-05 7:10 ` Hannes Reinecke
2025-11-04 1:31 ` [PATCH v3 11/15] block: introduce BLKREPORTZONESV2 ioctl Damien Le Moal
2025-11-04 4:12 ` Chaitanya Kulkarni
2025-11-04 19:00 ` Bart Van Assche
2025-11-04 20:13 ` Damien Le Moal
2025-11-04 20:36 ` Bart Van Assche
2025-11-05 7:11 ` Hannes Reinecke
2025-11-04 1:31 ` [PATCH v3 12/15] block: improve zone_wplugs debugfs attribute output Damien Le Moal
2025-11-04 4:13 ` Chaitanya Kulkarni
2025-11-05 7:11 ` Hannes Reinecke
2025-11-04 1:31 ` [PATCH v3 13/15] block: add zone write plug condition to debugfs zone_wplugs Damien Le Moal
2025-11-04 4:15 ` Chaitanya Kulkarni
2025-11-04 7:37 ` Johannes Thumshirn
2025-11-05 7:12 ` Hannes Reinecke
2025-11-04 1:31 ` [PATCH v3 14/15] btrfs: use blkdev_report_zones_cached() Damien Le Moal
2025-11-05 7:13 ` Hannes Reinecke
2025-11-04 1:31 ` [PATCH v3 15/15] xfs: " Damien Le Moal
2025-11-04 4:15 ` Chaitanya Kulkarni
2025-11-05 7:14 ` Hannes Reinecke
2025-11-04 14:41 ` [PATCH v3 00/15] Introduce cached report zones Christoph Hellwig
2025-11-04 20:59 ` Damien Le Moal
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=7bcfce9c-a2bf-4b8b-8a56-e0f518d87170@nvidia.com \
--to=chaitanyak@nvidia.com \
--cc=axboe@kernel.dk \
--cc=cem@kernel.org \
--cc=dlemoal@kernel.org \
--cc=dm-devel@lists.linux.dev \
--cc=dsterba@suse.com \
--cc=hch@lst.de \
--cc=keith.busch@wdc.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mpatocka@redhat.com \
--cc=snitzer@kernel.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