From: Keith Busch <keith.busch@linux.intel.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Keith Busch <keith.busch@intel.com>, Jens Axboe <axboe@kernel.dk>,
Sagi Grimberg <sagi@grimberg.me>,
Ming Lei <tom.leiming@gmail.com>,
linux-nvme@lists.infradead.org, linux-block@vger.kernel.org,
Bart Van Assche <bart.vanassche@wdc.com>
Subject: Re: [RFC PATCH] blk-mq: User defined HCTX CPU mapping
Date: Wed, 20 Jun 2018 08:49:11 -0600 [thread overview]
Message-ID: <20180620144911.GA24104@localhost.localdomain> (raw)
In-Reply-To: <20180620090805.GA4205@lst.de>
On Wed, Jun 20, 2018 at 11:08:05AM +0200, Christoph Hellwig wrote:
> On Mon, Jun 18, 2018 at 11:32:06AM -0600, Keith Busch wrote:
> > The default mapping of a cpu to a hardware context is often generally
> > applicable, however a user may know of a more appropriate mapping for
> > their specific access usage.
> >
> > This patch allows a user to define their own policy by making the mq hctx
> > cpu_list writable. The usage allows a user to append a comma separated
> > and/or range list of CPUs to a given hctx's tag set mapping to reassign
> > what hctx a cpu may map.
> >
> > While the writable attribute exists under a specific request_queue, the
> > settings will affect all request queues sharing the same tagset.
> >
> > The user defined setting is lost if the block device is removed and
> > re-added, or if the driver re-runs the queue mapping.
>
> We can't do this without driver opt-in. Managed interrupt rely on
> the fact that we can't generate more interrupts once all cpus mapped
> to the interrupt line have been offlined.
>
> So what exactly is the use case? What drivers do you care about?
This patch came at a customer request for NVMe. The controllers have 1:1
queues to CPUs, so currently a submission on CPU A will interrupt CPU A.
The user really wants their application to run in CPU A and have the
interrupt run in CPU B. We can't change the IRQ affinity, so I thought
changing the submission affinity would be less intrusive.
I think you're saying this will break if CPU B is offlined. I hadn't
considered that, so it doesn't sound like this will work.
WARNING: multiple messages have this Message-ID (diff)
From: keith.busch@linux.intel.com (Keith Busch)
Subject: [RFC PATCH] blk-mq: User defined HCTX CPU mapping
Date: Wed, 20 Jun 2018 08:49:11 -0600 [thread overview]
Message-ID: <20180620144911.GA24104@localhost.localdomain> (raw)
In-Reply-To: <20180620090805.GA4205@lst.de>
On Wed, Jun 20, 2018@11:08:05AM +0200, Christoph Hellwig wrote:
> On Mon, Jun 18, 2018@11:32:06AM -0600, Keith Busch wrote:
> > The default mapping of a cpu to a hardware context is often generally
> > applicable, however a user may know of a more appropriate mapping for
> > their specific access usage.
> >
> > This patch allows a user to define their own policy by making the mq hctx
> > cpu_list writable. The usage allows a user to append a comma separated
> > and/or range list of CPUs to a given hctx's tag set mapping to reassign
> > what hctx a cpu may map.
> >
> > While the writable attribute exists under a specific request_queue, the
> > settings will affect all request queues sharing the same tagset.
> >
> > The user defined setting is lost if the block device is removed and
> > re-added, or if the driver re-runs the queue mapping.
>
> We can't do this without driver opt-in. Managed interrupt rely on
> the fact that we can't generate more interrupts once all cpus mapped
> to the interrupt line have been offlined.
>
> So what exactly is the use case? What drivers do you care about?
This patch came at a customer request for NVMe. The controllers have 1:1
queues to CPUs, so currently a submission on CPU A will interrupt CPU A.
The user really wants their application to run in CPU A and have the
interrupt run in CPU B. We can't change the IRQ affinity, so I thought
changing the submission affinity would be less intrusive.
I think you're saying this will break if CPU B is offlined. I hadn't
considered that, so it doesn't sound like this will work.
next prev parent reply other threads:[~2018-06-20 14:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-18 17:32 [RFC PATCH] blk-mq: User defined HCTX CPU mapping Keith Busch
2018-06-18 17:32 ` Keith Busch
2018-06-20 9:08 ` Christoph Hellwig
2018-06-20 9:08 ` Christoph Hellwig
2018-06-20 14:49 ` Keith Busch [this message]
2018-06-20 14:49 ` 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=20180620144911.GA24104@localhost.localdomain \
--to=keith.busch@linux.intel.com \
--cc=axboe@kernel.dk \
--cc=bart.vanassche@wdc.com \
--cc=hch@lst.de \
--cc=keith.busch@intel.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
--cc=tom.leiming@gmail.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 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.