From: Damien Le Moal <dlemoal@kernel.org>
To: Hannes Reinecke <hare@suse.de>, Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
linux-scsi@vger.kernel.org,
"Martin K . Petersen" <martin.petersen@oracle.com>
Subject: Re: [PATCH v11 08/13] zloop: add storage element emulation
Date: Tue, 24 Nov 2026 13:21:46 +0900 [thread overview]
Message-ID: <030447d1-7a63-4a9e-a439-36d56f64327c@kernel.org> (raw)
In-Reply-To: <a0740379-6e93-43eb-a81b-02302423a6f9@suse.de>
On 11/24/26 01:38, Hannes Reinecke wrote:
> On 11/19/26 1:57 PM, Damien Le Moal wrote:
>> On 11/18/26 23:24, Hannes Reinecke wrote:
>>> On 11/16/26 10:36 PM, Damien Le Moal wrote:
>>>> Emulate the storage element depopulation feature of SMR disks in the
>>>> zloop driver. This emulation is controlled using the new stor_elements
>>>> option. This option can take several values:
>>>> - ZLOOP_STOR_ELEMENTS_NONE (0): no emulation (default)
>>>> - ZLOOP_STOR_ELEMENTS_RDWR (1): emulate all access storage elements
>>>> (e.g. read+write heads)
>>>> - ZLOOP_STOR_ELEMENTS_PAIRS (2): emulate fractional access storage
>>>> elements (e.g. pairs of read and write heads)
>>>>
>>>> If enabled with the value 1 or 2, the number of storage elements, or of
>>>> pairs of fractional access storage elements, is automatically calculated
>>>> based on the number of zones of the device so that we have at least 2 and
>>>> at most 32 storage elements or pairs of fractional access storage
>>>> elements.
>>>>
>>>> The mapping of zones to storage elements is defined simply as the modulo
>>>> of a zone number with the number of storage elements for the all access
>>>> storage elements emulation and with the number of storage element pairs
>>>> for the fractional access storage element emulation case. E.g, removing
>>>> a storage element from a set of 4 all access storage elements will
>>>> offline 1 zone every 4 zones.
>>>>
>>>> The storage element management operations are specified with the
>>>> structure zloop_se_ops (struct blk_se_ops).
>>>>
>>>> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
>>>> ---
>>>> .../admin-guide/blockdev/zoned_loop.rst | 11 +-
>>>> drivers/block/zloop.c | 710 +++++++++++++++++-
>>>> 2 files changed, 694 insertions(+), 27 deletions(-)
>>>>
>>> [ .. ]
>>>> diff --git a/drivers/block/zloop.c b/drivers/block/zloop.c
>>>> index 6bb68022ab30..1731e4ad5c98 100644
>>>> --- a/drivers/block/zloop.c
>>>> +++ b/drivers/block/zloop.c
>>>> @@ -18,6 +18,7 @@
>>>> #include <linux/parser.h>
>>>> #include <linux/seq_file.h>
>>>> #include <linux/xattr.h>
>>>> +#include <linux/delay.h>
>>>> /*
>>>> * Options for adding (and removing) a device.
>>>
>>> [ .. ]
>>>
>>>> @@ -1149,6 +1699,74 @@ static int zloop_init_zone(struct zloop_device *zlo,
>>>> struct zloop_options *opts,
>>>> return ret;
>>>> }
>>>> +#define ZLOOP_MIN_STOR_ELEMENTS 2
>>>> +#define ZLOOP_MAX_STOR_ELEMENTS 32
>>
>> This one is indeed a limit, so that we do not go crazy on the number of storage
>> elements, resulting in an emulation that is representative of a real disk. Note
>> that for a real disk, this would mean that we have 16-disks (1 head per surface,
>> 2 heads per disk) and no disk today on the market have that many. So this is
>> already "large".
>>
> Well, typically an emulation (on this level) also serves to evaluate
> scaling limitations, where HW limitations are less interesting.
>
>>>> +#define ZLOOP_MIN_ZONES_PER_STOR_ELEMENTS 32
>>
>> This one is not a limit, but rather what we aim for when the number of zones is
>> low so that we have a reasonable number of zones per element. Basically, to
>> avoid the rather silly case on one zone per element for small devices.
>>
> Oh, yeah, I get why you set these limits.
> My intention was more to use zloop to precisely evaluate these daft corner cases.
Well, a daft corner case would be a seriously broken HDD FW since the number of
heads is very limited and will be for a long time, until we can invite an
infinitely thin head-arm assembly to go in between an infinite number of very
thin platters :)
> Reviewed-by: Hannes Reinecke <hare@kernel.org>
Thanks.
>
> Cheers,
>
> Hannes
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2026-11-24 4:21 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 21:36 [PATCH v11 00/13] Add support for storage element depopulation Damien Le Moal
2026-11-16 21:36 ` [PATCH v11 01/13] block: introduce disk_zone_is_offline() Damien Le Moal
2026-11-16 21:36 ` [PATCH v11 02/13] block: refactor blk_revalidate_disk_zones() Damien Le Moal
2026-11-16 21:36 ` [PATCH v11 03/13] block: allow dropping all zone write plugs on revalidation Damien Le Moal
2026-11-16 21:36 ` [PATCH v11 04/13] block: introduce storage element management Damien Le Moal
2026-11-16 21:36 ` [PATCH v11 05/13] block: add storage element management ioctls Damien Le Moal
2026-11-16 21:36 ` [PATCH v11 06/13] zloop: fix ordered zone append handling Damien Le Moal
2026-11-19 7:19 ` Hannes Reinecke
2026-11-20 15:20 ` Christoph Hellwig
2026-11-16 21:36 ` [PATCH v11 07/13] zloop: fix zone reporting consistency Damien Le Moal
2026-11-16 21:36 ` [PATCH v11 08/13] zloop: add storage element emulation Damien Le Moal
2026-11-19 7:24 ` Hannes Reinecke
2026-11-19 12:57 ` Damien Le Moal
2026-11-23 16:38 ` Hannes Reinecke
2026-11-24 4:21 ` Damien Le Moal [this message]
2026-11-20 15:20 ` Christoph Hellwig
2026-11-20 17:27 ` Damien Le Moal
2026-11-20 17:36 ` Christoph Hellwig
2026-11-20 17:51 ` Damien Le Moal
2026-11-20 18:05 ` Christoph Hellwig
2026-11-16 21:36 ` [PATCH v11 09/13] zloop: add degrade_element control command Damien Le Moal
2026-11-16 21:36 ` [PATCH v11 10/13] scsi: scsi_proto: refine the definition of storage element health Damien Le Moal
2026-11-16 21:37 ` [PATCH v11 11/13] scsi: sd_zbc: always revalidate zones for disks supporting head depopulation Damien Le Moal
2026-11-16 21:37 ` [PATCH v11 12/13] scsi: sd_zbc: define storage element management operations Damien Le Moal
2026-11-19 7:24 ` Hannes Reinecke
2026-11-20 15:21 ` Christoph Hellwig
2026-11-16 21:37 ` [PATCH v11 13/13] scsi: sd: fail read commands to offline zones early 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=030447d1-7a63-4a9e-a439-36d56f64327c@kernel.org \
--to=dlemoal@kernel.org \
--cc=axboe@kernel.dk \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=linux-block@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