From: Damien Le Moal <damien.lemoal@wdc.com>
To: linux-scsi@vger.kernel.org,
"Martin K . Petersen" <martin.petersen@oracle.com>,
linux-block@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Cc: Christoph Hellwig <hch@lst.de>, Bart Van Assche <bvanassche@acm.org>
Subject: [PATCH V4 0/3] Fix zone revalidation memory allocation failures
Date: Thu, 27 Jun 2019 11:49:07 +0900 [thread overview]
Message-ID: <20190627024910.23987-1-damien.lemoal@wdc.com> (raw)
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() or kmalloc().
With these changes, tests do not show any zone revalidation failures
while not impacting the time taken for a disk zone inspection during
device scan and revalidation.
Changes from v3:
* Reworked use of flush_kernel_vmap_range() and
invalidate_kernel_vmap_range() to contain the calls within bio.c,
transparently to the user of bio_map_kern().
* Add similar support to bio_copy_kern().
Changes from v2:
* Move invalidate_kernel_vmap_range() of vmalloc-ed buffer to sd_zbc.c
in patch 2, after completion of scsi_execute_req().
* In patch 2, add flush_kernel_vmap_range() before scsi_execute_req().
Changes from V1:
* Added call to invalidate_kernel_vmap_range() for vmalloc-ed buffers
in patch 1.
* Fixed patch 2 compilation error with Sparc64 (kbuild robot)
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 | 43 +++++++++++++++++++++-
block/blk-zoned.c | 29 +++++++--------
drivers/scsi/sd_zbc.c | 83 +++++++++++++++++++++++++++++++-----------
include/linux/blkdev.h | 5 +++
4 files changed, 122 insertions(+), 38 deletions(-)
--
2.21.0
next reply other threads:[~2019-06-27 2:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-27 2:49 Damien Le Moal [this message]
2019-06-27 2:49 ` [PATCH V4 1/3] block: Allow mapping of vmalloc-ed buffers Damien Le Moal
2019-06-27 7:28 ` Christoph Hellwig
2019-06-27 8:14 ` Damien Le Moal
2019-06-27 8:25 ` Christoph Hellwig
2019-06-27 8:37 ` Damien Le Moal
2019-06-27 7:47 ` Ming Lei
2019-06-27 8:17 ` Damien Le Moal
2019-06-27 8:25 ` Christoph Hellwig
2019-06-27 8:36 ` Damien Le Moal
2019-06-27 2:49 ` [PATCH V4 2/3] sd_zbc: Fix report zones buffer allocation Damien Le Moal
2019-06-27 2:49 ` [PATCH V4 3/3] block: Limit zone array allocation size Damien Le Moal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190627024910.23987-1-damien.lemoal@wdc.com \
--to=damien.lemoal@wdc.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox