On 2020/11/11 14:16, Damien Le Moal wrote: > Jens, > > This series provides fixes and improvements for null_blk. > > The first two patches are bug fixes which likely should go into 5.10. > The first patch fixes a problem with zone initialization when the > device capacity is not a multiple of the zone size and the second > patch fixes zone append handling. > > The following patches are improvements and cleanups: > * Patch 3 makes sure that the device max_sectors limit is aligned to the > block size. > * Patch 4 improves zone locking overall, and especially the memory > backing disabled case by introducing a spinlock array to implement a > per zone lock in place of a global lock. With this patch, write > performance remains mostly unchanged, but read performance with a > multi-queue setup more than double from 1.3 MIOPS to 3.3 MIOPS (4K > random reads to zones with fio zonemode=zbd). > * Patch 5 improves implicit zone close > * Patch 6 and 7 cleanup discard handling code and use that code to free > the memory backing a zone that is being reset. > * Patch 8 adds the max_sectors configuration option to allow changing > the max_sectors/max_hw_sectors of the device. > * Finally, patch 9 moves nullblk into its own directory under > drivers/block/null_blk/ > > Comments are as always welcome. I forgot to add the changelog. Here it is: Changes from V1: * Added patch 2, 3 and 8. * Fix the last patch as suggested by Bart (file names under driver/block/null_blk/) * Reworded patch 1 commit message to more correctly describe the problem. Note that I also just sent a patch to improve blk_revalidate_disk_zones() to catch problems such as what patch 1 here fixes. C.f. "[PATCH] block: Improve blk_revalidate_disk_zones() checks". > > Damien Le Moal (9): > null_blk: Fix zone size initialization > null_blk: Fail zone append to conventional zones > null_blk: Align max_hw_sectors to blocksize > null_blk: improve zone locking > null_blk: Improve implicit zone close > null_blk: cleanup discard handling > null_blk: discard zones on reset > null_blk: Allow controlling max_hw_sectors limit > null_blk: Move driver into its own directory > > drivers/block/Kconfig | 8 +- > drivers/block/Makefile | 7 +- > drivers/block/null_blk/Kconfig | 12 + > drivers/block/null_blk/Makefile | 11 + > .../{null_blk_main.c => null_blk/main.c} | 65 +++-- > drivers/block/{ => null_blk}/null_blk.h | 9 +- > .../{null_blk_trace.c => null_blk/trace.c} | 2 +- > .../{null_blk_trace.h => null_blk/trace.h} | 2 +- > .../{null_blk_zoned.c => null_blk/zoned.c} | 245 ++++++++++++------ > 9 files changed, 239 insertions(+), 122 deletions(-) > create mode 100644 drivers/block/null_blk/Kconfig > create mode 100644 drivers/block/null_blk/Makefile > rename drivers/block/{null_blk_main.c => null_blk/main.c} (97%) > rename drivers/block/{ => null_blk}/null_blk.h (94%) > rename drivers/block/{null_blk_trace.c => null_blk/trace.c} (93%) > rename drivers/block/{null_blk_trace.h => null_blk/trace.h} (97%) > rename drivers/block/{null_blk_zoned.c => null_blk/zoned.c} (76%) > -- Damien Le Moal Western Digital Research