On 2/5/24 14:50, Christoph Hellwig wrote:
> On Mon, Feb 05, 2024 at 02:37:41PM +0900, Damien Le Moal wrote:
>> OK. So I think that Hannes'idea to get/put the queue usage counter reference
>> based on a zone BIO plug becoming not empty (get ref) and becoming empty (put
>> ref) may be simpler then.
On Mon, Feb 05, 2024 at 02:37:41PM +0900, Damien Le Moal wrote:
> OK. So I think that Hannes'idea to get/put the queue usage counter reference
> based on a zone BIO plug becoming not empty (get ref) and becoming empty (put
> ref) may be simpler then. And that would also work in the same way for
On 2/4/24 02:58, Mike Snitzer wrote:
> Love the overall improvement to the DM core code and the broader block
> layer by switching to this bio-based ZWP approach.
>
> Reviewed-by: Mike Snitzer
Thanks Mike !
> But one incremental suggestion inlined below.
I made this change, but in a lightly
On 2/5/24 14:11, Christoph Hellwig wrote:
> On Mon, Feb 05, 2024 at 11:41:04AM +0900, Damien Le Moal wrote:
>>> I think only queue re-configuration(blk_revalidate_zone) requires the
>>> queue usage counter. Otherwise, bdev open()/close() should work just
>>> fine.
>>
>> I want to check FS case
On Mon, Feb 05, 2024 at 11:41:04AM +0900, Damien Le Moal wrote:
> > I think only queue re-configuration(blk_revalidate_zone) requires the
> > queue usage counter. Otherwise, bdev open()/close() should work just
> > fine.
>
> I want to check FS case though. No clear if mounting FS that supports
On Mon, Feb 05, 2024 at 11:41:04AM +0900, Damien Le Moal wrote:
> On 2/5/24 11:19, Ming Lei wrote:
> +static inline void blk_zone_wplug_add_bio(struct blk_zone_wplug *zwplug,
> + struct bio *bio, unsigned int
> nr_segs)
> +{
> +
On 2/5/24 11:19, Ming Lei wrote:
+static inline void blk_zone_wplug_add_bio(struct blk_zone_wplug *zwplug,
+struct bio *bio, unsigned int nr_segs)
+{
+ /*
+ * Keep a reference on the BIO request queue usage. This reference will
+
On Mon, Feb 05, 2024 at 08:57:00AM +0900, Damien Le Moal wrote:
> On 2/4/24 12:56, Ming Lei wrote:
> > On Fri, Feb 02, 2024 at 04:30:44PM +0900, Damien Le Moal wrote:
> >> +/*
> >> + * Zone write plug flags bits:
> >> + * - BLK_ZONE_WPLUG_CONV: Indicate that the zone is a conventional one.
> >>
On 2/4/24 21:24, Hannes Reinecke wrote:
> On 2/2/24 15:30, Damien Le Moal wrote:
>> +/*
>> + * Set a zone write plug write pointer offset to either 0 (zone reset case)
>> + * or to the zone size (zone finish case). This aborts all plugged BIOs,
>> which
>> + * is fine to do as doing a zone reset
On 2/4/24 12:56, Ming Lei wrote:
> On Fri, Feb 02, 2024 at 04:30:44PM +0900, Damien Le Moal wrote:
>> +/*
>> + * Zone write plug flags bits:
>> + * - BLK_ZONE_WPLUG_CONV: Indicate that the zone is a conventional one.
>> Writes
>> + *to these zones are never plugged.
>> + * -
On Mon, Jan 29, 2024 at 11:11:47PM -1000, Tejun Heo wrote:
> 0001-workqueue-Update-lock-debugging-code.patch
> 0002-workqueue-Factor-out-init_cpu_worker_pool.patch
> 0003-workqueue-Implement-BH-workqueues-to-eventually-repl.patch
> 0004-backtracetest-Convert-from-tasklet-to-BH-workqueue.patch
>From 4cb1ef64609f9b0254184b2947824f4b46ccab22 Mon Sep 17 00:00:00 2001
From: Tejun Heo
Date: Sun, 4 Feb 2024 11:28:06 -1000
The only generic interface to execute asynchronously in the BH context is
tasklet; however, it's marked deprecated and has some design flaws such as
the execution code
On 2/2/24 15:31, Damien Le Moal wrote:
Add the zone_active_wplugs debugfs entry to list the zone number and
write pointer offset of zones that have an active zone write plug.
This helps ensure that struct blk_zone_active_wplug are reclaimed as
zones become empty or full and allows observing
On 2/2/24 15:31, Damien Le Moal wrote:
With zone write plugging, each zone of a zoned block device has a
64B struct blk_zone_wplug. While this is not a problem for small
capacity drives with few zones, this structure size result in large
memory usage per device for large capacity block devices.
On 2/2/24 15:31, Damien Le Moal wrote:
With the block layer zone write plugging being automatically done for
any write operation to a zone of a zoned block device, a regular request
plugging handled through current->plug can only ever see at most a
single write request per zone. In such case,
On 2/2/24 15:31, Damien Le Moal wrote:
Zone write locking is now unused and replaced with zone write plugging.
Remove all code that was implementing zone write locking, that is, the
various helper functions controlling request zone write locking and
the gendisk attached zone bitmaps.
The
On 2/2/24 15:31, Damien Le Moal wrote:
block/blk-mq-debugfs-zone.c contains a single debugfs attribute
function. Defining this outside of block/blk-zoned.c does not really
help in any way, so move this zone related debugfs attribute to
block/blk-zoned.c and delete block/blk-mq-debugfs-zone.c.
On 2/2/24 15:30, Damien Le Moal wrote:
Zone append operations are only allowed to target sequential write
required zones. blk_check_zone_append() uses bio_zone_is_seq() to check
this. However, this check is not necessary because:
1) For NVMe ZNS namespace devices, only sequential write required
On 2/2/24 15:30, Damien Le Moal wrote:
The only elevator feature ever implemented is ELEVATOR_F_ZBD_SEQ_WRITE
for signaling that a scheduler implements zone write locking to tightly
control the dispatching order of write operations to zoned block
devices. With the removal of zone write locking
On 2/2/24 15:30, Damien Le Moal wrote:
With the block layer generic plugging of write operations for zoned
block devices, mq-deadline, or any other scheduler, can only ever
see at most one write operation per zone at any time. There is thus no
sequentiality requirements for these writes and thus
On 2/2/24 15:30, Damien Le Moal wrote:
The only user of blk_revalidate_disk_zones() second argument was the
SCSI disk driver (sd). Now that this driver does not require this
update_driver_data argument, remove it to simplify the interface of
blk_revalidate_disk_zones(). Also update the function
On 2/2/24 15:30, Damien Le Moal wrote:
The zone append emulation of the scsi disk driver was the only driver
using BLK_STS_ZONE_RESOURCE. With this code removed,
BLK_STS_ZONE_RESOURCE is now unused. Remove this macro definition and
simplify blk_mq_dispatch_rq_list() where this status code was
On 2/2/24 15:30, Damien Le Moal wrote:
The gendisk conventional zone bitmap is going away. So to check for the
presence of conventional zones on a zoned target device, always use
report zones.
Signed-off-by: Damien Le Moal
---
drivers/nvme/target/zns.c | 10 +++---
1 file changed, 3
On 2/2/24 15:30, Damien Le Moal wrote:
Add the fua configfs attribute and module parameter to allow
configuring if the device supports FUA or not. Using this attribute
has an effect on the null_blk device only if memory backing is enabled
together with a write cache (cache_size option).
This
On 2/2/24 15:30, Damien Le Moal wrote:
Add the zone_append_max_sectors configfs attribute and module parameter
to allow configuring the maximum number of 512B sectors of zone append
operations. This attribute is meaningful only for zoned null block
devices.
If not specified, the default is
On 2/2/24 15:30, Damien Le Moal wrote:
With zone write plugging enabled at the block layer level, any zone
device can only ever see at most a single write operation per zone.
There is thus no need to request a block scheduler with strick per-zone
sequential write ordering control through the
On 2/2/24 15:30, Damien Le Moal wrote:
With zone write plugging enabled at the block layer level, any zone
device can only ever see at most a single write operation per zone.
There is thus no need to request a block scheduler with strick per-zone
sequential write ordering control through the
On 2/2/24 15:30, Damien Le Moal wrote:
For targets requiring zone append operation emulation with regular
writes (e.g. dm-crypt), we can use the block layer emulation provided by
zone write plugging. Remove DM implemented zone append emulation and
enable the block layer one.
This is done by
On 2/2/24 15:30, Damien Le Moal wrote:
Set the request queue of a TYPE_ZBC device as needing zone append
emulation by setting the device queue max_zone_append_sectors limit to
0. This enables the block layer generic implementation provided by zone
write plugging. With this, the sd driver will
On 2/2/24 15:30, Damien Le Moal wrote:
Remove the check in blk_revalidate_disk_zones() restricting the use of
this function to mq request-based drivers to allow also BIO-based
drivers to use it. This is safe to do as long as the BIO-based block
device queue is already setup and usable, as it
On 2/2/24 15:30, Damien Le Moal wrote:
Given that zone write plugging manages all writes to zones of a zoned
block device, we can track the write pointer position of all zones in
order to implement zone append emulation using regular write operations.
This is needed for devices that do not
On 2/2/24 15:30, Damien Le Moal wrote:
In preparation for adding a generic zone append emulation using zone
write plugging, allow device drivers supporting zoned block device to
set a the max_zone_append_sectors queue limit of a device to 0 to
indicate the lack of native support for zone append
On 2/2/24 15:30, Damien Le Moal wrote:
Zone write plugging implements a per-zone "plug" for write operations to
tightly control the submission and execution order of writes to
sequential write required zones of a zoned block device. Per-zone
plugging of writes guarantees that at any time at most
On 2/2/24 15:30, Damien Le Moal wrote:
Remove the static definition of bio_attempt_back_merge() to allow using
this function internally from other block layer files. Add the
definition of enum bio_merge_status and the declaration of
bio_attempt_back_merge() to block/blk.h.
Signed-off-by: Damien
On 2/2/24 15:30, Damien Le Moal wrote:
On completion of a zone append request, the request sector indicates the
location of the written data. This value must be returned to the user
through the BIO iter sector. This is done in 2 places: in
blk_complete_request() and in req_bio_endio(). Introduce
On 2/2/24 15:30, Damien Le Moal wrote:
Implement the inline helper functions bio_straddle_zones() and
bio_offset_from_zone_start() to respectively test if a BIO crosses a
zone boundary (the start sector and last sector belong to different
zones) and to obtain the oofset from a zone starting
On 2/2/24 15:30, Damien Le Moal wrote:
Moving req_bio_endio() code into its only caller, blk_update_request(),
allows reducing accesses to and tests of bio and request fields. Also,
given that partial completions of zone append operations is not
possible and that zone append operations cannot be
On 2/2/24 15:30, Damien Le Moal wrote:
On completion of a flush sequence, blk_flush_restore_request() restores
the bio of a request to the original submitted BIO. However, the last
use of the request in the flush sequence may have been for a POSTFLUSH
which does not have a sector. So make sure
38 matches
Mail list logo