[dm-devel] [PATCH] dm-zoned: remove leftover hunk for switching to sequential zones

2020-05-22 Thread Hannes Reinecke
Remove a leftover hunk to switch from sequential zones to random zones when selecting a reclaim zone; the logic has moved into the caller and this patch is now pointless. Fixes: 34f5affd04c4 ("dm zoned: separate random and cache zones") Signed-off-by: Hannes Reinecke unmap_rnd_list) { -

Re: [dm-devel] [PATCH] dm-zoned: remove leftover hunk for switching to sequential zones

2020-05-22 Thread Damien Le Moal
On 2020/05/22 16:32, Hannes Reinecke wrote: > Remove a leftover hunk to switch from sequential zones to random ...from random zones to sequential zones... > zones when selecting a reclaim zone; the logic has moved into the > caller and this patch is now pointless. s/this patch/this hunk/ ? >

[dm-devel] [PATCHv2] dm-zoned: remove leftover hunk for switching to sequential zones

2020-05-22 Thread Hannes Reinecke
Remove a leftover hunk to switch from random zones to sequential zones when selecting a reclaim zone; the logic has moved into the caller and this hunk is now pointless. Fixes: 34f5affd04c4 ("dm zoned: separate random and cache zones") Signed-off-by: Hannes Reinecke Reviewed-by: Damien Le Moal

Re: [dm-devel] [PATCH] block: Improve io_opt limit stacking

2020-05-22 Thread Damien Le Moal
On 2020/05/14 15:58, Damien Le Moal wrote: > When devices with different physical sector sizes are stacked, the > largest value is used as the stacked device physical sector size. For > the optimal IO size, the lowest common multiple (lcm) of the underlying > devices is used for the stacked

Re: [dm-devel] [PATCH] block: Improve io_opt limit stacking

2020-05-22 Thread Martin K. Petersen
>>> + if (t->io_opt & (t->physical_block_size - 1)) >>> + t->io_opt = lcm(t->io_opt, t->physical_block_size); > >> Any comment on this patch ? Note: the patch the patch "nvme: Fix >> io_opt limit setting" is already queued for 5.8. > > Setting io_opt to the physical block size is

[dm-devel] [PATCH 12/12] dm-zoned: per-device reclaim

2020-05-22 Thread Hannes Reinecke
Instead of having one reclaim workqueue for the entire set we should be allocating a reclaim workqueue per device; that will reduce contention and should boost performance for a multi-device setup. Signed-off-by: Hannes Reinecke --- drivers/md/dm-zoned-reclaim.c | 70

[dm-devel] [PATCH 08/12] dm-zoned: move random and sequential zones into struct dmz_dev

2020-05-22 Thread Hannes Reinecke
Random and sequential zones should be part of the respective device structure to make arbitration between devices possible. Signed-off-by: Hannes Reinecke --- drivers/md/dm-zoned-metadata.c | 143 + drivers/md/dm-zoned.h | 10 +++ 2 files

[dm-devel] [PATCH 10/12] dm-zoned: support arbitrary number of devices

2020-05-22 Thread Hannes Reinecke
Remove the hard-coded limit of two devices and support an unlimited number of additional zoned devices. With that we need to increase the device-mapper version number to 3.0.0 as we've modified the interface. Signed-off-by: Hannes Reinecke --- drivers/md/dm-zoned-metadata.c | 68

[dm-devel] [PATCH 04/12] dm-zoned: secondary superblock must reside on the same devices than primary superblock

2020-05-22 Thread Hannes Reinecke
The secondary superblock must reside on the same device than the primary superblock, so there's no need to re-calculate the device. Signed-off-by: Hannes Reinecke --- drivers/md/dm-zoned-metadata.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

[dm-devel] [PATCH 03/12] dm-zoned: use on-stack superblock for tertiary devices

2020-05-22 Thread Hannes Reinecke
Checking the teriary superblock just consists of validating UUIDs, crcs, and the generation number; it doesn't have contents which would be required during the actual operation. So we should use an on-stack superblock and avoid having to store it together with the 'real' superblocks.

[dm-devel] [PATCH 11/12] dm-zoned: round-robin load balancer for reclaiming zones

2020-05-22 Thread Hannes Reinecke
When reclaiming zones we should arbitrate between the zoned devices to get a better throughput. So implement a simple round-robin load balancer between the zoned devices. Signed-off-by: Hannes Reinecke --- drivers/md/dm-zoned-metadata.c | 8 +++- 1 file changed, 7 insertions(+), 1

[dm-devel] [PATCH 02/12] dm-zoned: convert to xarray

2020-05-22 Thread Hannes Reinecke
The zones array is getting really large, and large arrays tend to wreak havoc with the caches. So convert it to xarray to become more cache friendly. Signed-off-by: Hannes Reinecke --- drivers/md/dm-zoned-metadata.c | 98 +++--- 1 file changed, 73

[dm-devel] [PATCH 05/12] dm-zoned: add device pointer to struct dm_zone

2020-05-22 Thread Hannes Reinecke
Add a pointer to the containing device to struct dm_zone and kill dmz_zone_to_dev(). Signed-off-by: Hannes Reinecke --- drivers/md/dm-zoned-metadata.c | 47 -- drivers/md/dm-zoned-reclaim.c | 18 +++- drivers/md/dm-zoned-target.c | 7

[dm-devel] [PATCH 07/12] dm-zoned: add a 'reserved' zone flag

2020-05-22 Thread Hannes Reinecke
Instead of counting the number of reserved zones in dmz_free_zone() we should mark the zone as 'reserved' during allocation and simplify dmz_free_zone(). Signed-off-by: Hannes Reinecke --- drivers/md/dm-zoned-metadata.c | 4 ++-- drivers/md/dm-zoned.h | 2 ++ 2 files changed, 4

[dm-devel] [PATCH 09/12] dm-zoned: improve logging messages for reclaim

2020-05-22 Thread Hannes Reinecke
Instead of just reporting the errno this patch adds some more verbose debugging message in the reclaim path. Signed-off-by: Hannes Reinecke --- drivers/md/dm-zoned-reclaim.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/md/dm-zoned-reclaim.c

[dm-devel] [PATCH 01/12] dm-zoned: add debugging message for reading superblocks

2020-05-22 Thread Hannes Reinecke
Signed-off-by: Hannes Reinecke --- drivers/md/dm-zoned-metadata.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c index 4a2e351365c5..b0d3ed4ac56a 100644 --- a/drivers/md/dm-zoned-metadata.c +++

[dm-devel] [PATCH RFC 00/12] dm-zoned: multi-device support

2020-05-22 Thread Hannes Reinecke
Hi all, on the risk of boring you to death, here's yet another RFC to update dm-zoned. As it has seen only light testing and has some areas which need to be improved I'd consider it RFC material. I'm just putting it out now to get some feedback and get it ready for the next merge window. So,

[dm-devel] [PATCH 06/12] dm-zoned: add metadata pointer to struct dmz_dev

2020-05-22 Thread Hannes Reinecke
Add a metadata pointer to struct dmz_dev and use it as argument for blkdev_report_zones() instead of the metadata itself. Signed-off-by: Hannes Reinecke --- drivers/md/dm-zoned-metadata.c | 14 +- drivers/md/dm-zoned.h | 7 --- 2 files changed, 13 insertions(+), 8

Re: [dm-devel] [PATCH] block: Improve io_opt limit stacking

2020-05-22 Thread Martin K. Petersen
Damien, >> +if (t->io_opt & (t->physical_block_size - 1)) >> +t->io_opt = lcm(t->io_opt, t->physical_block_size); > Any comment on this patch ? Note: the patch the patch "nvme: Fix > io_opt limit setting" is already queued for 5.8. Setting io_opt to the physical block size is