linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Export max open zones and max active zones to sysfs
@ 2020-07-02 18:19 Niklas Cassel
  2020-07-02 18:19 ` [PATCH v2 1/2] block: add max_open_zones to blk-sysfs Niklas Cassel
  2020-07-02 18:19 ` [PATCH v2 2/2] block: add max_active_zones " Niklas Cassel
  0 siblings, 2 replies; 10+ messages in thread
From: Niklas Cassel @ 2020-07-02 18:19 UTC (permalink / raw)
  To: Jonathan Corbet, Jens Axboe, Keith Busch, Christoph Hellwig,
	Sagi Grimberg, James E.J. Bottomley, Martin K. Petersen
  Cc: Niklas Cassel, linux-doc, linux-kernel, linux-block, linux-nvme,
	linux-scsi

Export max open zones and max active zones to sysfs.

Since this patch series depends on the Zoned Namespace Command Set series
that has been picked up in the nvme-5.9 branch in the nvme git tree,
I have based this series upon nvme-5.9.

Jens, Christoph, I don't know how you usually sync stuff,
perhaps the nvme-5.9 branch could be merged into
linux-block/for-next, once now, and once later (like usual),
to ease with integration patches like this, that changes
code belonging to the block layer, but depending on commits
in the nvme tree. I have a feeling that this series will not
be the one series depending on the ZNS patches for this coming
merge window.



All zoned block devices in the kernel utilize the "zoned block device
support" (CONFIG_BLK_DEV_ZONED).

The Zoned Namespace Command Set Specification defines two different
resource limits: Max Open Resources and Max Active Resources.

The ZAC and ZBC standards define a MAXIMUM NUMBER OF OPEN SEQUENTIAL WRITE
REQUIRED ZONES field.


Since the ZNS Max Open Resources field has the same purpose as the ZAC/ZBC
field, (the ZNS field is 0's based, the ZAC/ZBC field isn't), create a
common "max_open_zones" definition in the sysfs documentation, and export
both the ZNS field and the ZAC/ZBC field according to this new common
definition.

The ZNS Max Active Resources field does not have an equivalent field in
ZAC/ZBC, however, since both ZAC/ZBC and ZNS utilize the "zoned block
device support" in the kernel, create a "max_active_zones" definition in
the sysfs documentation, similar to "max_open_zones", and export it
according to this new definition. For ZAC/ZBC devices, this field will be
exported as 0, meaning "no limit".

Changes since v1:
-Picked up Javier's Reviewed-by tags.
-Reworded commit message (Damien).
-Dropped unused stubs for setting MAR/MOR when building without
 CONFIG_BLK_DEV_ZONED (Damien).

Niklas Cassel (2):
  block: add max_open_zones to blk-sysfs
  block: add max_active_zones to blk-sysfs

 Documentation/block/queue-sysfs.rst | 14 +++++++++++++
 block/blk-sysfs.c                   | 27 ++++++++++++++++++++++++
 drivers/nvme/host/zns.c             |  2 ++
 drivers/scsi/sd_zbc.c               |  5 +++++
 include/linux/blkdev.h              | 32 +++++++++++++++++++++++++++++
 5 files changed, 80 insertions(+)

-- 
2.26.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-07-03 14:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-02 18:19 [PATCH v2 0/2] Export max open zones and max active zones to sysfs Niklas Cassel
2020-07-02 18:19 ` [PATCH v2 1/2] block: add max_open_zones to blk-sysfs Niklas Cassel
2020-07-03  5:03   ` Damien Le Moal
2020-07-03  8:22   ` Johannes Thumshirn
2020-07-03  9:23     ` Niklas Cassel
2020-07-03 12:09       ` Johannes Thumshirn
2020-07-03 13:41         ` Johannes Thumshirn
2020-07-02 18:19 ` [PATCH v2 2/2] block: add max_active_zones " Niklas Cassel
2020-07-03  5:04   ` Damien Le Moal
2020-07-03 14:15   ` Greg KH

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).