All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix zone revalidation memory allocation failures
@ 2019-06-25  2:46 Damien Le Moal
  2019-06-25  2:46 ` [PATCH 1/3] block: Allow mapping of vmalloc-ed buffers Damien Le Moal
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Damien Le Moal @ 2019-06-25  2:46 UTC (permalink / raw)
  To: linux-scsi, Martin K . Petersen, linux-block, Jens Axboe
  Cc: Christoph Hellwig, Bart Van Assche

This series addresses a reccuring problem with zone revalidation
failures observed during extensive testing with memory constrained
system and device hot-plugging.

The problem source is failure to allocate large memory areas with
alloc_pages() or kmalloc() in blk_revalidate_disk_zones() to store the
disk array of zones (struct blk_zone) or in sd_zbc_report_zones() for
the report zones command reply buffer.

The solution proposed here is to:
1) limit the number of zones to be reported with a single report zones
command execution, and
2) Use vmalloc to allocate large-ish arrays and buffers in place of
alloc_pages() and kmalloc().

With these changes, tests do not show any zone revalidation failures
while not impacting the time taken for a disk initial zone inspection
during device scan.

Damien Le Moal (3):
  block: Allow mapping of vmalloc-ed buffers
  sd_zbc: Fix report zones buffer allocation
  block: Limit zone array allocation size

 block/bio.c            |  8 ++++-
 block/blk-zoned.c      | 29 +++++++---------
 drivers/scsi/sd_zbc.c  | 79 +++++++++++++++++++++++++++++++-----------
 include/linux/blkdev.h |  5 +++
 4 files changed, 84 insertions(+), 37 deletions(-)

-- 
2.21.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-06-26  4:19 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-25  2:46 [PATCH 0/3] Fix zone revalidation memory allocation failures Damien Le Moal
2019-06-25  2:46 ` [PATCH 1/3] block: Allow mapping of vmalloc-ed buffers Damien Le Moal
2019-06-25  3:24   ` Chaitanya Kulkarni
2019-06-25 15:59     ` Bart Van Assche
2019-06-25 16:06       ` Chaitanya Kulkarni
2019-06-26  1:38         ` Damien Le Moal
2019-06-26  4:19           ` Chaitanya Kulkarni
2019-06-25 15:59   ` Bart Van Assche
2019-06-25 16:22   ` Christoph Hellwig
2019-06-25  2:46 ` [PATCH 2/3] sd_zbc: Fix report zones buffer allocation Damien Le Moal
2019-06-25 10:37   ` kbuild test robot
2019-06-25 16:07   ` Bart Van Assche
2019-06-25  2:46 ` [PATCH 3/3] block: Limit zone array allocation size Damien Le Moal
2019-06-25 16:10   ` Bart Van Assche

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.