From: Mike Snitzer <snitzer@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@fb.com>,
linux-block@vger.kernel.org, linux-scsi@vger.kernel.org,
dm-devel@redhat.com
Subject: Re: [PATCH 05/16] dm: always defer request allocation to the owner of the request_queue
Date: Tue, 24 Jan 2017 05:05:39 -0500 [thread overview]
Message-ID: <20170124100538.GA6991@redhat.com> (raw)
In-Reply-To: <1485185361-29786-6-git-send-email-hch@lst.de>
On Mon, Jan 23 2017 at 10:29am -0500,
Christoph Hellwig <hch@lst.de> wrote:
> DM already calls blk_mq_alloc_request on the request_queue of the
> underlying device if it is a blk-mq device. But now that we allow drivers
> to allocate additional data and initialize it ahead of time we need to do
> the same for all drivers. Doing so and using the new cmd_size
> infrastructure in the block layer greatly simplifies the dm-rq and mpath
> code, and should also make arbitrary combinations of SQ and MQ devices
> with SQ or MQ device mapper tables easily possible as a further step.
Thanks for working (and suffering) through all of this request-based DM
code. Nice to have someone else be painfully aware of the complexity in
request-based DM's old request_fn support.
The queue->cmd_size (per request data) definitely makes this more
possible and is welcomed cleanup. The only concern I have is that using
get_request() for the old request_fn request_queue eliminates the
guaranteed availability of requests to allow for forward progress (on
path failure or for the purposes of swap over mpath, etc). This isn't a
concern for blk-mq because as you know we have a fixed set of tags (and
associated preallocated requests).
So I'm left unconvinced old request_fn request-based DM multipath isn't
regressing in how request resubmission can be assured a request will be
available when needed on retry in the face of path failure.
dm_mod's 'reserved_rq_based_ios' module_param governs the minimum number
of requests in the md->rq_pool (and defaults to 256 requests per
request-based DM request_queue). Whereas blk_init_rl()'s
mempool_create_node() uses BLKDEV_MIN_RQ (4) yet q->nr_requests =
BLKDEV_MAX_RQ (128). Also, this patch eliminates the utility of
'reserved_rq_based_ios' module_param without actually removing it.
Anyway, should blk-core evolve to allow drivers to specify a custom
min_nr of requests in the old request_fn request_queue's mempool? Or is
my concern overblown?
Seems we're very close to making this request-based DM cleanup doable.
Just would like some extra eyes and care/thought/guidance from yourself
and likely Jens.
Thanks,
Mike
p.s. dm.c:dm_alloc_md_mempools() could be cleaned up a bit more since
only bio-based DM will have a pools->io_pool moving forward; but I can
circle back to that cleanup after.
next prev parent reply other threads:[~2017-01-24 10:05 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-23 15:29 split scsi passthrough fields out of struct request Christoph Hellwig
2017-01-23 15:29 ` [PATCH 01/16] block: fix elevator init check Christoph Hellwig
2017-01-24 7:02 ` Hannes Reinecke
2017-01-24 7:02 ` Hannes Reinecke
2017-01-24 15:06 ` Jens Axboe
2017-01-24 15:06 ` Jens Axboe
2017-01-24 15:10 ` Christoph Hellwig
2017-01-23 15:29 ` [PATCH 02/16] block: simplify blk_init_allocated_queue Christoph Hellwig
2017-01-24 7:37 ` Hannes Reinecke
2017-01-24 7:37 ` Hannes Reinecke
2017-01-23 15:29 ` [PATCH 03/16] block: allow specifying size for extra command data Christoph Hellwig
2017-01-24 8:10 ` Hannes Reinecke
2017-01-24 8:10 ` Hannes Reinecke
2017-01-23 15:29 ` [PATCH 04/16] dm: remove incomple BLOCK_PC support Christoph Hellwig
2017-01-24 8:22 ` Hannes Reinecke
2017-01-24 8:22 ` Hannes Reinecke
2017-01-23 15:29 ` [PATCH 05/16] dm: always defer request allocation to the owner of the request_queue Christoph Hellwig
2017-01-24 8:29 ` Hannes Reinecke
2017-01-24 8:29 ` Hannes Reinecke
2017-01-24 10:05 ` Mike Snitzer [this message]
2017-01-24 14:20 ` Christoph Hellwig
2017-01-24 16:39 ` Mike Snitzer
2017-01-24 19:52 ` Christoph Hellwig
2017-01-26 4:23 ` Junichi Nomura
2017-01-26 4:23 ` Junichi Nomura
2017-01-23 15:29 ` [PATCH 06/16] scsi_dh_rdac: switch to scsi_execute_req_flags() Christoph Hellwig
2017-01-23 15:29 ` [PATCH 07/16] scsi_dh_emc: " Christoph Hellwig
2017-01-23 15:29 ` [PATCH 08/16] scsi_dh_hp_sw: " Christoph Hellwig
2017-01-23 15:29 ` [PATCH 09/16] scsi: remove gfp_flags member in scsi_host_cmd_pool Christoph Hellwig
2017-01-24 8:31 ` Hannes Reinecke
2017-01-24 12:08 ` Johannes Thumshirn
2017-01-24 12:08 ` Johannes Thumshirn
2017-01-23 15:29 ` [PATCH 10/16] scsi: respect unchecked_isa_dma for blk-mq Christoph Hellwig
2017-01-24 11:06 ` Hannes Reinecke
2017-01-24 11:06 ` Hannes Reinecke
2017-01-23 15:29 ` [PATCH 11/16] scsi: remove scsi_cmd_dma_pool Christoph Hellwig
2017-01-24 11:07 ` Hannes Reinecke
2017-01-24 11:07 ` Hannes Reinecke
2017-01-23 15:29 ` [PATCH 12/16] scsi: remove __scsi_alloc_queue Christoph Hellwig
2017-01-24 11:08 ` Hannes Reinecke
2017-01-24 11:08 ` Hannes Reinecke
2017-01-24 11:24 ` Johannes Thumshirn
2017-01-24 11:24 ` Johannes Thumshirn
2017-01-23 15:29 ` [PATCH 13/16] scsi: allocate scsi_cmnd structures as part of struct request Christoph Hellwig
2017-01-24 12:57 ` Hannes Reinecke
2017-01-23 15:29 ` [PATCH 14/16] block/bsg: move queue creation into bsg_setup_queue Christoph Hellwig
2017-01-23 15:29 ` [PATCH 15/16] block: split scsi_request out of struct request Christoph Hellwig
2017-01-24 0:33 ` Bart Van Assche
2017-01-24 0:33 ` Bart Van Assche
2017-01-24 8:09 ` hch
2017-01-24 16:31 ` Bart Van Assche
2017-01-24 16:31 ` Bart Van Assche
2017-01-24 13:21 ` Hannes Reinecke
2017-01-24 13:21 ` Hannes Reinecke
2017-01-26 19:12 ` Bart Van Assche
2017-01-26 19:12 ` Bart Van Assche
2017-01-26 19:37 ` Christoph Hellwig
2017-01-26 19:37 ` Christoph Hellwig
2017-01-26 19:42 ` Jens Axboe
2017-01-26 19:42 ` Jens Axboe
2017-01-23 15:29 ` [PATCH 16/16] block: don't assign cmd_flags in __blk_rq_prep_clone Christoph Hellwig
2017-01-24 13:22 ` Hannes Reinecke
2017-01-24 13:22 ` Hannes Reinecke
2017-01-23 15:39 ` split scsi passthrough fields out of struct request Jens Axboe
2017-01-23 15:46 ` Christoph Hellwig
2017-01-24 0:30 ` Bart Van Assche
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=20170124100538.GA6991@redhat.com \
--to=snitzer@redhat.com \
--cc=axboe@fb.com \
--cc=dm-devel@redhat.com \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/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 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.