Re: [PATCH v2 3/8] zbd: introduce write_zone_remainder option

Damien Le Moal
2026-02-27T04:59:41Z

On 2/16/26 16:59, Shin'ichiro Kawasaki wrote:
> When the specified block size is not aligned with the zone size or the
> write pointer positions at workload start, write workloads create
> unwritten remainder areas at the ends of zones. These remainder areas
> leave zones in the open condition. This disrupts the intended write
> target zone selection.
>
> Previous commits e1a1b59b0b9b ("zbd: finish zones with remainder smaller
> than minimum write block size") and e2e29bf6f830 ("zbd: finish zone when
> all random write target zones have small remainder") attempted to solve
> this problem by issuing zone finish operation for zones with small
> remainders. However, this approach caused performance degradation due to
> two reasons. First, the zone finish operation requires substantial
> execution time. Second, zone finish operation requires to wait for in-
> flight writes from other jobs to complete, which is done by calling
> io_u_quiesce() before the zone finish operation.
>
> To avoid the performance degradation, introduce the new option named
> "write_zone_remainder". When the option is specified, issue writes to
> the remainder areas instead of issuing zone finish operation. The write
> operation makes the zones in the full condition in the same manner as
> the zone finish operation, freeing up the zone resource of the device
> and enabling writing to other zones. Also when the option is set, skip
> the io_u_quiesce() which was required before the zone finish operation.
> The performance benefit by eliminating the waits on in-flight writes are
> particularly significant in asynchronous I/O workloads, where the write
> operations to the remainder areas are managed as part of queued I/Os.
>
> The drawback of this approach is that writing these remainders requires
> write sizes smaller than the minimum block size. As a result, when using
> the write_zone_remainder option, the random map feature must be disabled
> using the norandommap=1 option, which is automatically done when the
> option is specified.

Looks OK to me.

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>

--
Damien Le Moal
Western Digital Research