All of lore.kernel.org
 help / color / mirror / Atom feed
From: axboe@kernel.dk (Jens Axboe)
Subject: [PATCH 0/3] blk-mq & nvme: introduce .map_changed
Date: Tue, 29 Sep 2015 08:47:06 -0600	[thread overview]
Message-ID: <560AA46A.9060205@kernel.dk> (raw)
In-Reply-To: <alpine.LNX.2.00.1509291418270.23840@localhost.lm.intel.com>

On 09/29/2015 08:26 AM, Keith Busch wrote:
> On Mon, 28 Sep 2015, Ming Lei wrote:
>> This patchset introduces .map_changed callback into 'struct blk_mq_ops',
>> and use this callback to get NVMe notified about the mapping changed
>> event,
>> then NVMe can update the irq affinity hint for its queues.
>
> I think this is going the wrong direction. Shouldn't we provide blk-mq
> the vectors in the tag set so that layer can manage the irq hints?
>
> This could lead to more cpu-queue assignment optimizations from using
> that information. For example, two h/w contexts sharing the same vector
> shouldn't be assigned to cpus on different NUMA nodes.

I agree, this is moving in the wrong direction. Currently the sw <->hw 
queue mappings are in blk-mq, and this is the exact same information 
base we need for IRQ affinity handling. We need to move in the direction 
of having blk-mq helpers handle that part too, not pass notifications to 
the lower level driver to update its IRQ mappings.

>> Also the 'cpumask' in 'struct blk_mq_tags' isn't needed any more, so
>> remove
>> that and related kernel interface.
>
> It was added to the tags because the cpu mask is an artifact of the
> tags rather that duplicating it across all the h/w contexts sharing the
> same set. It also doesn't let a h/w context from one namespace overwrite
> another's cpu affinity mask when they share the same vector.

So having the mask in the tags is really odd, it should be in some 
per-device type data instead.

-- 
Jens Axboe

WARNING: multiple messages have this Message-ID (diff)
From: Jens Axboe <axboe@kernel.dk>
To: Keith Busch <keith.busch@intel.com>, Ming Lei <tom.leiming@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	Matthew Wilcox <willy@linux.intel.com>,
	linux-nvme@lists.infradead.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH 0/3] blk-mq & nvme: introduce .map_changed
Date: Tue, 29 Sep 2015 08:47:06 -0600	[thread overview]
Message-ID: <560AA46A.9060205@kernel.dk> (raw)
In-Reply-To: <alpine.LNX.2.00.1509291418270.23840@localhost.lm.intel.com>

On 09/29/2015 08:26 AM, Keith Busch wrote:
> On Mon, 28 Sep 2015, Ming Lei wrote:
>> This patchset introduces .map_changed callback into 'struct blk_mq_ops',
>> and use this callback to get NVMe notified about the mapping changed
>> event,
>> then NVMe can update the irq affinity hint for its queues.
>
> I think this is going the wrong direction. Shouldn't we provide blk-mq
> the vectors in the tag set so that layer can manage the irq hints?
>
> This could lead to more cpu-queue assignment optimizations from using
> that information. For example, two h/w contexts sharing the same vector
> shouldn't be assigned to cpus on different NUMA nodes.

I agree, this is moving in the wrong direction. Currently the sw <->hw 
queue mappings are in blk-mq, and this is the exact same information 
base we need for IRQ affinity handling. We need to move in the direction 
of having blk-mq helpers handle that part too, not pass notifications to 
the lower level driver to update its IRQ mappings.

>> Also the 'cpumask' in 'struct blk_mq_tags' isn't needed any more, so
>> remove
>> that and related kernel interface.
>
> It was added to the tags because the cpu mask is an artifact of the
> tags rather that duplicating it across all the h/w contexts sharing the
> same set. It also doesn't let a h/w context from one namespace overwrite
> another's cpu affinity mask when they share the same vector.

So having the mask in the tags is really odd, it should be in some 
per-device type data instead.

-- 
Jens Axboe


  reply	other threads:[~2015-09-29 14:47 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-29  3:20 [PATCH 0/3] blk-mq & nvme: introduce .map_changed Ming Lei
2015-09-29  3:20 ` Ming Lei
2015-09-29  3:20 ` [PATCH 1/3] blk-mq: introduce .map_changed to blk_mq_ops Ming Lei
2015-09-29  3:20   ` Ming Lei
2015-09-29  3:20 ` [PATCH 2/3] block: nvme: use map_changed to set irq affinity hint Ming Lei
2015-09-29  3:20   ` Ming Lei
2015-09-29  3:20 ` [PATCH 3/3] blk-mq: remove cpumask from 'struct blk_mq_tags' Ming Lei
2015-09-29  3:20   ` Ming Lei
2015-09-29  7:07 ` [PATCH 0/3] blk-mq & nvme: introduce .map_changed Christoph Hellwig
2015-09-29  7:07   ` Christoph Hellwig
2015-09-29 21:59   ` Ming Lei
2015-09-29 21:59     ` Ming Lei
2015-09-29 14:26 ` Keith Busch
2015-09-29 14:26   ` Keith Busch
2015-09-29 14:47   ` Jens Axboe [this message]
2015-09-29 14:47     ` Jens Axboe
2015-09-29 22:16     ` Ming Lei
2015-09-29 22:16       ` Ming Lei
2015-09-29 22:45       ` Keith Busch
2015-09-29 22:45         ` Keith Busch
2015-09-30  0:08         ` Ming Lei
2015-09-30  0:08           ` Ming Lei

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=560AA46A.9060205@kernel.dk \
    --to=axboe@kernel.dk \
    /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.