Re: [dm-devel] [PATCHv5 00/14] dm-zoned: metadata version 2

2020-05-13 Thread Hannes Reinecke
On 5/14/20 2:55 AM, Damien Le Moal wrote: On 2020/05/14 9:22, Martin K. Petersen wrote: Damien, Any idea why the io_opt limit is not set to the physical block size when the drive does not report an optimal transfer length ? Would it be bad to set that value instead of leaving it to 0 ? The

[dm-devel] [PATCH] dm zoned: Avoid 64-bit division error in dmz_fixup_devices

2020-05-13 Thread Nathan Chancellor
When building arm32 allyesconfig: ld.lld: error: undefined symbol: __aeabi_uldivmod >>> referenced by dm-zoned-target.c >>> md/dm-zoned-target.o:(dmz_ctr) in archive drivers/built-in.a dmz_fixup_devices uses DIV_ROUND_UP with variables of type sector_t. As such, it should be using

Re: [dm-devel] [PATCHv5 00/14] dm-zoned: metadata version 2

2020-05-13 Thread Damien Le Moal
On 2020/05/14 11:20, Martin K. Petersen wrote: > > Damien, > >> Indeed. It is an NVMe M.2 consumer grade SSD. Nothing fancy. If you >> look at nvme/host/core.c nvme_update_disk_info(), you will see that >> io_opt is set to the block size... This is probably abusing this >> limit. So I guess the

Re: [dm-devel] [PATCHv5 00/14] dm-zoned: metadata version 2

2020-05-13 Thread Martin K. Petersen
Damien, > Indeed. It is an NVMe M.2 consumer grade SSD. Nothing fancy. If you > look at nvme/host/core.c nvme_update_disk_info(), you will see that > io_opt is set to the block size... This is probably abusing this > limit. So I guess the most elegant fix may be to have nvme stop doing > that ?

Re: [dm-devel] [PATCHv5 00/14] dm-zoned: metadata version 2

2020-05-13 Thread Damien Le Moal
On 2020/05/14 9:22, Martin K. Petersen wrote: > > Damien, > >> Any idea why the io_opt limit is not set to the physical block size >> when the drive does not report an optimal transfer length ? Would it >> be bad to set that value instead of leaving it to 0 ? > > The original intent was that

Re: [dm-devel] [PATCHv5 00/14] dm-zoned: metadata version 2

2020-05-13 Thread Martin K. Petersen
Damien, > Any idea why the io_opt limit is not set to the physical block size > when the drive does not report an optimal transfer length ? Would it > be bad to set that value instead of leaving it to 0 ? The original intent was that io_opt was a weak heuristic for something being a RAID

Re: [dm-devel] [PATCHv5 00/14] dm-zoned: metadata version 2

2020-05-13 Thread Damien Le Moal
Adding Martin. On 2020/05/11 22:23, Damien Le Moal wrote: > On 2020/05/11 20:46, Damien Le Moal wrote: >> On 2020/05/11 20:25, Hannes Reinecke wrote: >>> On 5/11/20 12:55 PM, Damien Le Moal wrote: On 2020/05/11 11:46, Damien Le Moal wrote: > Mike, > > I am still seeing the

Re: [dm-devel] device-mapper: use dynamic debug instead of compile-time config option

2020-05-13 Thread Hannes Reinecke
On 5/13/20 7:10 PM, Mike Snitzer wrote: On Wed, May 13 2020 at 1:01pm -0400, Hannes Reinecke wrote: On 5/13/20 6:25 PM, Mike Snitzer wrote: On Wed, May 13 2020 at 7:10am -0400, Hannes Reinecke wrote: On 5/13/20 11:41 AM, Damien Le Moal wrote: On 2020/05/13 16:10, Hannes Reinecke wrote:

Re: [dm-devel] device-mapper: use dynamic debug instead of compile-time config option

2020-05-13 Thread Mike Snitzer
On Wed, May 13 2020 at 1:01pm -0400, Hannes Reinecke wrote: > On 5/13/20 6:25 PM, Mike Snitzer wrote: > >On Wed, May 13 2020 at 7:10am -0400, > >Hannes Reinecke wrote: > > > >>On 5/13/20 11:41 AM, Damien Le Moal wrote: > >>>On 2020/05/13 16:10, Hannes Reinecke wrote: > Switch to use

Re: [dm-devel] device-mapper: use dynamic debug instead of compile-time config option

2020-05-13 Thread Hannes Reinecke
On 5/13/20 6:25 PM, Mike Snitzer wrote: On Wed, May 13 2020 at 7:10am -0400, Hannes Reinecke wrote: On 5/13/20 11:41 AM, Damien Le Moal wrote: On 2020/05/13 16:10, Hannes Reinecke wrote: Switch to use dynamic debug to avoid having recompile the kernel just to enable debugging messages.

Re: [dm-devel] device-mapper: use dynamic debug instead of compile-time config option

2020-05-13 Thread Mike Snitzer
On Wed, May 13 2020 at 7:10am -0400, Hannes Reinecke wrote: > On 5/13/20 11:41 AM, Damien Le Moal wrote: > >On 2020/05/13 16:10, Hannes Reinecke wrote: > >>Switch to use dynamic debug to avoid having recompile the kernel > >>just to enable debugging messages. > >> > >>Signed-off-by: Hannes

Re: [dm-devel] [PATCH 2/2] dm-zoned: split off random and cache zones

2020-05-13 Thread Damien Le Moal
On 2020/05/13 16:07, Hannes Reinecke wrote: > Instead of emulating zones on the regular disk as random zones > this patch adds a new 'cache' zone type. > This allows us to use the random zones on the zoned disk as > data zones (if cache zones are present), and improves performance > as the zones

Re: [dm-devel] [PATCH 1/2] dm-zoned: invert zone check in dmz_reset_zone()

2020-05-13 Thread Damien Le Moal
On 2020/05/13 16:07, Hannes Reinecke wrote: > Instead of excluding invalid zones we should check if the zone > is sequential and exclude invalid states. That way we don't need > to touch the selection when new zone states or flags are added. > > Signed-off-by: Hannes Reinecke > --- >

Re: [dm-devel] [PATCH] device-mapper: use dynamic debug instead of compile-time config option

2020-05-13 Thread Hannes Reinecke
On 5/13/20 11:41 AM, Damien Le Moal wrote: On 2020/05/13 16:10, Hannes Reinecke wrote: Switch to use dynamic debug to avoid having recompile the kernel just to enable debugging messages. Signed-off-by: Hannes Reinecke --- include/linux/device-mapper.h | 7 +-- 1 file changed, 1

Re: [dm-devel] [PATCH 0/2] dm-zoned: improve cache performance

2020-05-13 Thread Damien Le Moal
On 2020/05/13 16:07, Hannes Reinecke wrote: > Hi all, > > here are two patches to improve performance when a regular device > is specified for dm-zoned. > Damien noted that we have a performance drop after the zones on the > regular device are used up, as then the random zones on the zoned >

Re: [dm-devel] [PATCH] device-mapper: use dynamic debug instead of compile-time config option

2020-05-13 Thread Damien Le Moal
On 2020/05/13 16:10, Hannes Reinecke wrote: > Switch to use dynamic debug to avoid having recompile the kernel > just to enable debugging messages. > > Signed-off-by: Hannes Reinecke > --- > include/linux/device-mapper.h | 7 +-- > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff

[dm-devel] [bug report] dm zoned: metadata version 2

2020-05-13 Thread Dan Carpenter
Hello Hannes Reinecke, The patch 70978208ec91: "dm zoned: metadata version 2" from May 11, 2020, leads to the following static checker warning: drivers/md/dm-zoned-target.c:1047 dmz_iterate_devices() warn: was expecting a 64 bit value instead of '~(zone_nr_sectors - 1)'

[dm-devel] [PATCH] device-mapper: use dynamic debug instead of compile-time config option

2020-05-13 Thread Hannes Reinecke
Switch to use dynamic debug to avoid having recompile the kernel just to enable debugging messages. Signed-off-by: Hannes Reinecke --- include/linux/device-mapper.h | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/include/linux/device-mapper.h

[dm-devel] [PATCH 2/2] dm-zoned: split off random and cache zones

2020-05-13 Thread Hannes Reinecke
Instead of emulating zones on the regular disk as random zones this patch adds a new 'cache' zone type. This allows us to use the random zones on the zoned disk as data zones (if cache zones are present), and improves performance as the zones on the (slower) zoned disk are then never used for