Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH 2/4] NVMe: Decouple nvmeq hctx from ns request queue
Date: Tue, 19 May 2015 15:35:19 +0000 (UTC)	[thread overview]
Message-ID: <alpine.LNX.2.00.1505191519450.15930@localhost.lm.intel.com> (raw)
In-Reply-To: <20150519074645.GA21597@infradead.org>

On Tue, 19 May 2015, Christoph Hellwig wrote:
> On Mon, May 18, 2015@01:30:21PM -0600, Keith Busch wrote:
>> Preparing for namespaces to dynamically attach/detach, we can't tie
>> the nvmeq's hctx to a namespace request queue: they may be removed at
>> any time. This patch has the driver create an io request queue that
>> unaffiliated to any namespace so we always have a valid hctx for the
>> io queues.
>
> I don't think this is correct.  The better fix is to stop storing
> the (or rather a hctx) in the nvmeq.  The current code only works by
> chance as is just deferenences the tags pointer in the hctx.  So
> just add a helper to find the right struct blk_mq_tags for a queue index
> and change the driver to use that.

Agreed this isn't the ideal fix. I'm just trying to get this working
in the short term and the hctx is the most convienient thing to use
for couple reasons: it has the cpumask required for the irq affinity
hints, and the blk-mq layer takes an hctx to iterate through busy tags,
and I clearly don't want h/w IO queue tied to a dynamic namespace's
request_queue's hctx.

I'm actually not sure why every request queue has their own hardware
context. Shouldn't it be an artifact of the tagset rather than the
request queue? I thought I might have a chance of intercepting a late
4.1 rc if I didn't mess with the block layer, though.

  reply	other threads:[~2015-05-19 15:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-18 19:30 [PATCH 0/4] Namespace handling updates and fixes Keith Busch
2015-05-18 19:30 ` [PATCH 1/4] blk: Define blk_set_queue_dying in header Keith Busch
2015-05-18 19:30 ` [PATCH 2/4] NVMe: Decouple nvmeq hctx from ns request queue Keith Busch
2015-05-19  7:46   ` Christoph Hellwig
2015-05-19 15:35     ` Keith Busch [this message]
2015-05-19 15:51       ` Keith Busch
2015-05-19 16:15         ` Christoph Hellwig
2015-05-19 16:14       ` Christoph Hellwig
2015-05-18 19:30 ` [PATCH 3/4] NVMe: Automatic namespace rescan Keith Busch
2015-05-18 19:30 ` [PATCH 4/4] NVMe: Remove disks before shutdown Keith Busch

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=alpine.LNX.2.00.1505191519450.15930@localhost.lm.intel.com \
    --to=keith.busch@intel.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