linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Alexander Gordeev <agordeev@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH RESEND v3 5/6] AHCI: Optimize single IRQ interrupt processing
Date: Wed, 24 Sep 2014 10:39:13 -0400	[thread overview]
Message-ID: <20140924143913.GH16555@htj.dyndns.org> (raw)
In-Reply-To: <20140924140844.GB2695@agordeev.usersys.redhat.com>

Hello, Alexander.

On Wed, Sep 24, 2014 at 03:08:44PM +0100, Alexander Gordeev wrote:
> > Hmmm, how would the whole system benefit from it if there's only
> > single device?  Each individual servicing of the interrupt does more
> > now which includes scheduling which may end up adding to completion
> > latency.
> 
> As Chuck noticed, non-AHCI hardware context handlers will benefit.

Maybe I'm off but I'm kinda skeptical that we'd be gaining back the
overhead we pay by punting to a thread.

> > The thing I don't get is why multiple MSI handling and this patchset
> > are tied to threaded interrupt handling.
> 
> Multiple MSIs were implemented with the above aim (let's say aim #1)
> right away. Single MSI/IRQ handling is getting updated with this series.

Yeah, I get that.  I'm curious whether that was justified.

> > Splitting locks don't
> > necessarily have much to do with threaded handling and it's not like
> > ahci interrupt handling is heavy.  The hot path is pretty short
> > actually.  The meat of the work - completing requests and propagating
> > completions - is offloaded to softirq by block layer anyway.
> 
> So the aim (let's say aim #2) is to avoid any of those to compete with
> hardware context handler. IOW, not to wait on host/port spinlocks with
> local interrupts disabled unnecessarily.
> 
> I assume, if at the time of writing of original handlers the two
> interrupt context existed, they were written the way I propose now :)

Maybe it makes sense with many high speed devices attached to a single
host; otherwise, I think we'd prolly be paying more than we're
gaining.  Lock splitting itself is likely beneficial as our issue path
is a lot heavier than completion path but I'm not too sure about
splitting completion contexts especially given that completion for
block layer and up are already punted to softirq.

Would it be possible for you compare threaded vs. unthreaded under
relatively heavy load?  ie. let the interrupt handler access irq
status under host lock but release it and then go through per-port
locks from the interrupt handler.

Thanks for doing this!

-- 
tejun

  reply	other threads:[~2014-09-24 14:39 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-21 13:19 [PATCH RESEND v3 0/6] AHCI: Optimize interrupt processing Alexander Gordeev
2014-09-21 13:19 ` [PATCH RESEND v3 1/6] AHCI: Cleanup checking of multiple MSIs/SLM modes Alexander Gordeev
2014-09-23 20:18   ` Tejun Heo
2014-09-21 13:19 ` [PATCH RESEND v3 2/6] AHCI: Move host activation code into ahci_host_activate() Alexander Gordeev
2014-09-23 20:22   ` Tejun Heo
2014-09-23 20:55     ` Tejun Heo
2014-09-21 13:19 ` [PATCH RESEND v3 3/6] AHCI: Make few function names more descriptive Alexander Gordeev
2014-09-23 20:22   ` Tejun Heo
2014-09-21 13:19 ` [PATCH RESEND v3 4/6] AHCI: Get rid of redundant arg to ahci_handle_port_interrupt() Alexander Gordeev
2014-09-21 13:19 ` [PATCH RESEND v3 5/6] AHCI: Optimize single IRQ interrupt processing Alexander Gordeev
2014-09-23 20:57   ` Tejun Heo
2014-09-24 10:42     ` Alexander Gordeev
2014-09-24 13:04       ` Tejun Heo
2014-09-24 13:27         ` Chuck Ebbert
2014-09-24 13:36           ` Tejun Heo
2014-09-24 14:08         ` Alexander Gordeev
2014-09-24 14:39           ` Tejun Heo [this message]
2014-09-24 14:59             ` Alexander Gordeev
2014-09-25  3:27               ` Tejun Heo
2014-10-01 15:31             ` Alexander Gordeev
2014-10-01 15:39               ` Alexander Gordeev
2014-10-05  2:23               ` Tejun Heo
2014-10-05 16:16                 ` Tejun Heo
2014-10-06  7:27                   ` Alexander Gordeev
2014-10-06 12:58                     ` Tejun Heo
2014-10-06 13:24                       ` Alexander Gordeev
2014-10-06 14:54                         ` Tejun Heo
2014-09-25  3:00         ` Elliott, Robert (Server Storage)
2014-09-21 13:19 ` [PATCH RESEND v3 6/6] AHCI: Do not read HOST_IRQ_STAT reg in multi-MSI mode Alexander Gordeev

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=20140924143913.GH16555@htj.dyndns.org \
    --to=tj@kernel.org \
    --cc=agordeev@redhat.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;
as well as URLs for NNTP newsgroup(s).