linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Alexander Gordeev <agordeev@redhat.com>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Suresh Siddha <suresh.b.siddha@intel.com>,
	Yinghai Lu <yinghai@kernel.org>,
	Matthew Wilcox <willy@linux.intel.com>,
	x86@kernel.org, linux-pci@vger.kernel.org,
	linux-ide@vger.kernel.org
Subject: Re: [PATCH v2 -tip 5/5] AHCI: Support multiple MSIs
Date: Thu, 27 Sep 2012 00:59:15 -0400	[thread overview]
Message-ID: <5063DD23.5050504@pobox.com> (raw)
In-Reply-To: <9d8eb2d4cef15f1ac63753d543c27f7aac7ac2b4.1346653435.git.agordeev@redhat.com>

On 09/03/2012 05:20 AM, Alexander Gordeev wrote:
> Take advantage of multiple MSIs implementation on x86 - on systems with
> IRQ remapping AHCI ports not only get assigned separate MSI vectors -
> but also separate IRQs. As result, interrupts generated by different
> ports could be serviced on different CPUs rather than on a single one.
>
> In cases when number of allocated MSIs is less than requested the Sharing
> Last MSI mode does not get used, no matter implemented in hardware or not.
> Instead, the driver assumes the advantage of multiple MSIs is negated and
> falls back to the single MSI mode as if MRSM bit was set (some Intel chips
> implement this strategy anyway - MRSM bit gets set even if the number of
> allocated MSIs exceeds the number of implemented ports).
>
> Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
> ---
>   drivers/ata/ahci.c    |   14 ++--
>   drivers/ata/ahci.h    |    5 +
>   drivers/ata/libahci.c |  211 +++++++++++++++++++++++++++++++++++++++++++++++--
>   3 files changed, 218 insertions(+), 12 deletions(-)

OK, round 2 :)

Reviewed the locking twice, and cannot find any problems there.  That 
was my main concern.

Other problems noted:

1) Including linux/pci.h into libahci.c should have been a hint ;p

libahci is entirely PCI-free, AHCI-specific code.  All code that is 
specific to PCI hosts goes into ahci.c.  Anything in libahci needs to be 
purely iomem read/write, standard AHCI DMA data structure manipulation, 
etc.  This is shared with ahci_platform.

So, move the PCI specific code back into ahci.c.  Thus, 
ahci_hw_interrupt appears like libahci material, but 
ahci_init_interrupts is not.

2) don't manually add new "static inline", let the compiler figure it out

3) spinlock init, such as in e.g. ahci_set_per_port_lock() should occur 
with the rest of ahci_port_priv initialization, inside ahci_port_start()

Otherwise it looks OK and ready for merging, after these updates.





  reply	other threads:[~2012-09-27  4:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-03  9:16 [PATCH v2 -tip 0/5] x86, MSI, AHCI: Support multiple MSIs Alexander Gordeev
2012-09-03  9:17 ` [PATCH v2 -tip 1/5] x86, MSI: Support multiple MSIs in presense of IRQ remapping Alexander Gordeev
2012-09-03 18:53   ` Yinghai Lu
2012-09-04  9:32     ` Alexander Gordeev
2012-09-03  9:18 ` [PATCH v2 -tip 2/5] x86, MSI: Allocate as many multiple IRQs as requested Alexander Gordeev
2012-09-03  9:19 ` [PATCH v2 -tip 3/5] x86, MSI: Minor readability fixes Alexander Gordeev
2012-09-03  9:19 ` [PATCH v2 -tip 4/5] PCI, MSI: Enable multiple MSIs with pci_enable_msi_block_auto() Alexander Gordeev
2012-09-07 20:53   ` Bjorn Helgaas
2012-09-03  9:20 ` [PATCH v2 -tip 5/5] AHCI: Support multiple MSIs Alexander Gordeev
2012-09-27  4:59   ` Jeff Garzik [this message]
2012-09-26 12:38 ` [PATCH v2 -tip 0/5] x86, MSI, " Alexander Gordeev
2012-09-27  4:03   ` Ingo Molnar

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=5063DD23.5050504@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=agordeev@redhat.com \
    --cc=bhelgaas@google.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    --cc=willy@linux.intel.com \
    --cc=x86@kernel.org \
    --cc=yinghai@kernel.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 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).