From: Hannes Reinecke <hare@suse.de>
To: Damien Le Moal <damien.lemoal@wdc.com>,
Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, linux-ide@vger.kernel.org,
"Martin K . Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH v7 1/5] block: Add independent access ranges support
Date: Mon, 6 Sep 2021 10:14:10 +0200 [thread overview]
Message-ID: <1be72e8b-e63f-f723-92a8-973571faf6e3@suse.de> (raw)
In-Reply-To: <20210906015810.732799-2-damien.lemoal@wdc.com>
On 9/6/21 3:58 AM, Damien Le Moal wrote:
> The Concurrent Positioning Ranges VPD page (for SCSI) and data log page
> (for ATA) contain parameters describing the set of contiguous LBAs that
> can be served independently by a single LUN multi-actuator hard-disk.
> Similarly, a logically defined block device composed of multiple disks
> can in some cases execute requests directed at different sector ranges
> in parallel. A dm-linear device aggregating 2 block devices together is
> an example.
>
> This patch implements support for exposing a block device independent
> access ranges to the user through sysfs to allow optimizing device
> accesses to increase performance.
>
> To describe the set of independent sector ranges of a device (actuators
> of a multi-actuator HDDs or table entries of a dm-linear device),
> The type struct blk_independent_access_ranges is introduced. This
> structure describes the sector ranges using an array of
> struct blk_independent_access_range structures. This range structure
> defines the start sector and number of sectors of the access range.
> The ranges in the array cannot overlap and must contain all sectors
> within the device capacity.
>
> The function disk_set_iaranges() allows a device driver to signal to
> the block layer that a device has multiple independent access ranges.
> In this case, a struct blk_independent_access_ranges is attached to
> the device request queue by the function disk_set_iaranges(). The
> function disk_alloc_iaranges() is provided for drivers to allocate this
> structure.
>
> struct blk_independent_access_ranges contains kobjects (struct kobject)
> to expose to the user through sysfs the set of independent access ranges
> supported by a device. When the device is initialized, sysfs
> registration of the ranges information is done from blk_register_queue()
> using the block layer internal function disk_register_iaranges(). If a
> driver calls disk_set_iaranges() for a registered queue, e.g. when a
> device is revalidated, disk_set_iaranges() will execute
> disk_register_iaranges() to update the sysfs attribute files.
>
> The sysfs file structure created starts from the
> independent_access_ranges sub-directory and contains the start sector
> and number of sectors of each range, with the information for each
> range grouped in numbered sub-directories.
>
> E.g. for a dual actuator HDD, the user sees:
>
> $ tree /sys/block/sdk/queue/independent_access_ranges/
> /sys/block/sdk/queue/independent_access_ranges/
> |-- 0
> | |-- nr_sectors
> | `-- sector
> `-- 1
> |-- nr_sectors
> `-- sector
>
> For a regular device with a single access range, the
> independent_access_ranges sysfs directory does not exist.
>
> Device revalidation may lead to changes to this structure and to the
> attribute values. When manipulated, the queue sysfs_lock and
> sysfs_dir_lock mutexes are held for atomicity, similarly to how the
> blk-mq and elevator sysfs queue sub-directories are protected.
>
> The code related to the management of independent access ranges is
> added in the new file block/blk-iaranges.c.
>
> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
> ---
> block/Makefile | 2 +-
> block/blk-iaranges.c | 345 +++++++++++++++++++++++++++++++++++++++++
> block/blk-sysfs.c | 26 +++-
> block/blk.h | 4 +
> include/linux/blkdev.h | 39 +++++
> 5 files changed, 407 insertions(+), 9 deletions(-)
> create mode 100644 block/blk-iaranges.c
>
One feels a bit in a HP Lovecraft tale with these names, but I'll guess
that's fine :-)
So:
Reviewed-by: Hannes Reinecke <hare@suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
next prev parent reply other threads:[~2021-09-06 8:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-06 1:58 [PATCH v7 0/5] Initial support for multi-actuator HDDs Damien Le Moal
2021-09-06 1:58 ` [PATCH v7 1/5] block: Add independent access ranges support Damien Le Moal
2021-09-06 8:14 ` Hannes Reinecke [this message]
2021-09-06 17:38 ` Jens Axboe
2021-09-06 22:31 ` Damien Le Moal
2021-09-06 1:58 ` [PATCH v7 2/5] scsi: sd: add concurrent positioning " Damien Le Moal
2021-09-06 8:35 ` Hannes Reinecke
2021-09-06 1:58 ` [PATCH v7 3/5] libata: support concurrent positioning ranges log Damien Le Moal
2021-09-06 1:58 ` [PATCH v7 4/5] doc: document sysfs queue/independent_access_ranges attributes Damien Le Moal
2021-09-06 8:37 ` Hannes Reinecke
2021-09-06 1:58 ` [PATCH v7 5/5] doc: Fix typo in request queue sysfs documentation Damien Le Moal
2021-09-06 8:37 ` Hannes Reinecke
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=1be72e8b-e63f-f723-92a8-973571faf6e3@suse.de \
--to=hare@suse.de \
--cc=axboe@kernel.dk \
--cc=damien.lemoal@wdc.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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).