Re: [PATCH v2 08/28] block: Use a mempool to allocate zone write plugs

Hannes Reinecke
2024-03-27T07:27:52Z

On 3/25/24 05:44, Damien Le Moal wrote:
> Allocating zone write plugs using a struct kmem_cache does not guarantee
> that enough write plugs can be allocated to simultaneously write up to
> the maximum number of active zones of a zoned block device.
>
> Avoid any issue with memory allocation by using a mempool with a size
> equal to the disk maximum number of open zones or maximum number of
> active zones, whichever is larger. For zoned devices that do not have
> open or active zone limits, the default 128 is used as the mempool size.
> If a change to the zone limits is detected, the mempool is resized in
> blk_revalidate_disk_zones().
>
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
> ---
> block/blk-zoned.c | 62 ++++++++++++++++++++++++++++++------------
> include/linux/blkdev.h | 3 ++
> 2 files changed, 47 insertions(+), 18 deletions(-)
>
Why isn't this part of the previous patch?
But that shouldn't hold off the patchset, 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, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich