From: Alexander Gordeev <agordeev@redhat.com>
To: Dan Williams <dan.j.williams@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
IDE/ATA development list <linux-ide@vger.kernel.org>,
"Jiang, Dave" <dave.jiang@intel.com>
Subject: Re: [PATCH v3 6/5] AHCI: Do not read HOST_IRQ_STAT register in multi-MSI mode
Date: Fri, 19 Sep 2014 19:39:51 +0100 [thread overview]
Message-ID: <20140919183950.GJ8793@agordeev.usersys.redhat.com> (raw)
In-Reply-To: <CAA9_cmcpKRczsosw7odOC-a4-xRM6E5QrkQoxPrBBFybzcKZbg@mail.gmail.com>
On Fri, Sep 19, 2014 at 09:34:34AM -0700, Dan Williams wrote:
> On Fri, Sep 19, 2014 at 1:25 AM, Alexander Gordeev <agordeev@redhat.com> wrote:
> > As described in AHCI v1.0 specification chapter 10.6.2.2
> > "Multiple MSI Based Messages" generation of interrupts
> > is not controlled through the HOST_IRQ_STAT register.
> >
> > Considering MMIO access is expensive remove unnecessary
> > reading and writing of HOST_IRQ_STAT register.
> >
> > Further, serializing access to the host data is no longer
> > needed and the interrupt service routine can avoid competing
> > on the host lock.
> >
> > Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
> > Suggested-by: "Jiang, Dave" <dave.jiang@intel.com>
> > Cc: linux-ide@vger.kernel.org
> > ---
> > drivers/ata/ahci.h | 1 +
> > drivers/ata/libahci.c | 54 ++++++++-------------------------------------------
> > 2 files changed, 9 insertions(+), 46 deletions(-)
> >
> > diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
> > index c12f590..b8e117a 100644
> > --- a/drivers/ata/ahci.h
> > +++ b/drivers/ata/ahci.h
> > @@ -305,6 +305,7 @@ struct ahci_port_priv {
> > unsigned int ncq_saw_dmas:1;
> > unsigned int ncq_saw_sdb:1;
> > u32 intr_status; /* interrupts to handle */
> > + spinlock_t intr_lock; /* protects intr_status */
>
> Why introduce a new lock? Can't we switch to per-ata port locking
> rather than ata_host locking?
We could. But this case hardware context interrupt handler would compete
with threads/softriqs, which is exactly what I tried to avoid. With the
separate lock we *only* update ahci_port_priv::intr_status with interrupts
disabled.
--
Regards,
Alexander Gordeev
agordeev@redhat.com
prev parent reply other threads:[~2014-09-19 18:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1411031922.git.agordeev@redhat.com>
2014-09-19 8:25 ` [PATCH v3 6/5] AHCI: Do not read HOST_IRQ_STAT register in multi-MSI mode Alexander Gordeev
2014-09-19 11:33 ` Alexander Gordeev
2014-09-19 16:34 ` Dan Williams
2014-09-19 18:39 ` Alexander Gordeev [this message]
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=20140919183950.GJ8793@agordeev.usersys.redhat.com \
--to=agordeev@redhat.com \
--cc=dan.j.williams@gmail.com \
--cc=dave.jiang@intel.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.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