All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Benjamin Marzinski <bmarzins@redhat.com>
Cc: linux-block@vger.kernel.org, dm-devel@redhat.com,
	lsf-pc@lists.linux-foundation.org
Subject: Re: [LSF/MM ATTEND] multipath redesign and dm blk-mq issues
Date: Thu, 28 Jan 2016 21:48:19 -0500	[thread overview]
Message-ID: <20160129024819.GA8242@redhat.com> (raw)
In-Reply-To: <20160129021132.GZ24960@octiron.msp.redhat.com>

On Thu, Jan 28 2016 at  9:11pm -0500,
Benjamin Marzinski <bmarzins@redhat.com> wrote:

> On Thu, Jan 28, 2016 at 07:33:16PM -0600, Benjamin Marzinski wrote:
> > On Thu, Jan 28, 2016 at 05:37:33PM -0500, Mike Snitzer wrote:
> > > On Thu, Jan 28 2016 at  4:23pm -0500,
> > > Benjamin Marzinski <bmarzins@redhat.com> wrote:
> 
> > > blk-mq's .queue_rq hook is the logical place to do the mpath mapping, as
> > > it deals with getting a request from the underlying paths.
> > > 
> > > blk-mq's .map_queue is all about mapping sw to hw queues.  It is very
> > > blk-mq specific and isn't something DM has a roll in -- cannot yet see
> > > why it'd need to.
> > 
> > At the moment, we only have one hwqueue.  But we could have one hwqueue
> > per path. Then queue_rq would just be in charge of handing the requst
> > down to the underlying device.  In that setup, instead using a default
> > mapping of all swqueues to one hwqueue in .map_queue, we would be
> > mapping to the hardware queue for the path.  I'd have to look through
> > the blk-mq code more to know if one of these methods has an obvious
> > advantage, but it seems like this way, if different cpus were using
> > different paths (with the per-cpu load-balancing), you wouldn't
> > constantly be accessing the hwqueue from different cpus. Although I
> > suppose you may do better just by leaving multipath_map where it is now,
> > and just adjusting the number of hardware queues. Speaking of which,
> > have you tried fiddling around with that in your tests?
> > 
> 
> O.k. a quick look shows that map_queue get called so often that any sort
> of dynamic mapping there would be a pain.  But constantly having all the
> cpus accessing one hwqueue seems like it could be part of the
> performance issue. So, it would definitely be worth playing around with
> that.

Yeah, I have a patch that makes both hw_queues and queue_depth tunable:
http://git.kernel.org/cgit/linux/kernel/git/snitzer/linux.git/commit/?h=devel2&id=99ebcaf36d9d1fa3acec98492c36664d57ba8fbd

Increasing nr_hw_queues doesn't help (in fact it hurts, going from 1 to
2 results in a drop from ~970K to ~945K IOPs, to 4 I get ~930K).

Will need to revisit the blk-mq code in general to appreciate how the
sw -> hw mapping will scale, etc.

And verify assumptions like: the top-level dm-mpath rq->mq_ctx->cpu
matches the underlying path's clone->mq_ctx->cpu

  reply	other threads:[~2016-01-29  2:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-28 21:23 [LSF/MM ATTEND] multipath redesign and dm blk-mq issues Benjamin Marzinski
2016-01-28 22:37 ` Mike Snitzer
2016-01-29  1:33   ` Benjamin Marzinski
2016-01-29  2:11     ` Benjamin Marzinski
2016-01-29  2:48       ` Mike Snitzer [this message]
2016-01-29  6:59 ` Hannes Reinecke
2016-01-29 15:34   ` Benjamin Marzinski

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=20160129024819.GA8242@redhat.com \
    --to=snitzer@redhat.com \
    --cc=bmarzins@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=lsf-pc@lists.linux-foundation.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.