linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Christoph Hellwig <hch@lst.de>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, linux-pci@vger.kernel.org,
	Linux Kernel Mailinglist <linux-kernel@vger.kernel.org>,
	Hannes Reinecke <hare@suse.com>
Subject: Re: [RFC PATCH] pci: add pci_irq_get_affinity_vector()
Date: Tue, 8 Nov 2016 16:20:20 +0100	[thread overview]
Message-ID: <85806bd8-b4a5-8820-cf7a-207a38fe5505@suse.de> (raw)
In-Reply-To: <20161108151150.GA14002@lst.de>

On 11/08/2016 04:11 PM, Christoph Hellwig wrote:
> On Tue, Nov 08, 2016 at 04:08:51PM +0100, Hannes Reinecke wrote:
>> The use-case here is that one needs to feed the MSI-X index into the driver
>> command structure. While we can extract that number trivially with scsi-mq,
>> but for scsi-sq we don't have such means.
>
>> The main impetus of this RFC is to figure out if such a function would have
>> a chance of getting upstream, or if I have to continue use cpumaps in the
>> drivers.
>
> There should be no need for a cpumap, nor should there be any need
> for a lookup.  Driver will need the vector index for some admin ops,
> but it can store it in it's driver-private queue structure (e.g. take
> a look at the cq_vector field in NVMe).  Drivers really should not need
> this during I/O, but if for some weird reason they do that driver specific
> field is trivially reachable through the hw_ctx which gets passed to
> ->queue_rq.

I did mention that this is trivial for scsi-mq, right?
The issue here is scsi-sq.
(Much as you despise it).

As long a scsi-mq is not the standard we _have_ to provide a way of 
retaining the original functionality which allowed for interrupt 
distribution even for scsi-sq.
Hence either the driver has to keep this functionality (looking up 
msi-index based on a give scsi command) internal within the driver or we 
provide a common function allowing drivers to look it up.

And my patch is aiming to provide the latter.
If you don't agree with it or think it'll be pointless, fine, I'll go 
ahead and modify the drivers.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

  reply	other threads:[~2016-11-08 15:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-08  7:47 [RFC PATCH] pci: add pci_irq_get_affinity_vector() Hannes Reinecke
2016-11-08 14:48 ` Thomas Gleixner
2016-11-08 14:56 ` Christoph Hellwig
2016-11-08 15:08   ` Hannes Reinecke
2016-11-08 15:11     ` Christoph Hellwig
2016-11-08 15:20       ` Hannes Reinecke [this message]
2016-11-08 15:25         ` Christoph Hellwig

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=85806bd8-b4a5-8820-cf7a-207a38fe5505@suse.de \
    --to=hare@suse.de \
    --cc=axboe@kernel.dk \
    --cc=hare@suse.com \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).