lkml.org 
[lkml]   [2012]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 -tip 5/5] AHCI: Support multiple MSIs
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.






\
 
 \ /
  Last update: 2012-09-27 07:21    [W:0.117 / U:1.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site