From: Jens Axboe <jens.axboe@oracle.com>
To: Jonathan Corbet <corbet@lwn.net>
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
Eric.Moore@lsi.com, jeff@garzik.org
Subject: Re: [PATCH 2/3] libata: add support for blk-iopoll
Date: Mon, 10 Aug 2009 19:22:35 +0200 [thread overview]
Message-ID: <20090810172235.GL12579@kernel.dk> (raw)
In-Reply-To: <20090810111523.035e0d20@bike.lwn.net>
On Mon, Aug 10 2009, Jonathan Corbet wrote:
> Hey, Jens,
>
> I'm a little slow in looking at this, hopefully it's not completely
> noise...
>
> > @@ -2157,7 +2194,12 @@ static irqreturn_t ahci_interrupt(int irq, void *dev_instance)
> >
> > ap = host->ports[i];
> > if (ap) {
> > - ahci_port_intr(ap);
> > + if (!blk_iopoll_enabled)
> > + ahci_port_intr(ap);
> > + else if (blk_iopoll_sched_prep(&ap->iopoll)) {
> > + ap_irq_disable(ap);
> > + blk_iopoll_sched(&ap->iopoll);
> > + }
> > VPRINTK("port %u\n", i);
> > } else {
> > VPRINTK("port %u (no irq)\n", i);
>
> It seems to me that, if blk_iopoll_sched_prep() fails, the interrupt
> will be dropped on the floor; would you not need an explicit
> ahci_port_intr() call in that case too? Unless I've misunderstood as
> usual...
If that happens, it is probably a spurious IRQ since it's already
scheduled to run (and hasn't yet). So it should be fine, in reality it
should not happen since the IRQ should have been acked and the iopoll
handler scheduled.
> Documenting the "zero means failure" nature of blk_iopoll_sched_prep()
> might also be a good idea; I predict confusion otherwise.
There's no real failure case, it zero just means "already scheduled".
But we do usually use 0 as the "normal" case, so good point anyway. I'll
change it.
--
Jens Axboe
next prev parent reply other threads:[~2009-08-10 17:22 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-06 19:58 [PATCH 0/3]: blk-iopoll, a polled completion API for block devices Jens Axboe
2009-08-06 19:58 ` [PATCH 1/3] block: add blk-iopoll, a NAPI like approach " Jens Axboe
2009-08-06 21:32 ` Alan Cox
2009-08-07 6:37 ` Jens Axboe
2009-08-07 8:38 ` Jeff Garzik
2009-08-07 8:50 ` Jens Axboe
2009-08-07 11:05 ` Jens Axboe
2009-08-07 11:31 ` Jens Axboe
2009-08-19 19:08 ` Jens Axboe
2009-08-20 11:30 ` [PATCH 1/3] block: add blk-iopoll, a NAPI like approach forblock devices jack wang
2009-08-20 11:38 ` Jens Axboe
2009-08-06 19:58 ` [PATCH 2/3] libata: add support for blk-iopoll Jens Axboe
2009-08-10 17:15 ` Jonathan Corbet
2009-08-10 17:22 ` Jens Axboe [this message]
2009-08-06 19:58 ` [PATCH 3/3] mptfusion: " Jens Axboe
2009-08-11 10:35 ` [PATCH 0/3]: blk-iopoll, a polled completion API for block devices Bart Van Assche
2009-08-11 14:39 ` Jens Axboe
2009-08-11 14:59 ` Bart Van Assche
2009-08-11 17:14 ` Jens Axboe
2009-08-11 18:37 ` Bart Van Assche
2009-08-11 18:41 ` Jens Axboe
2009-08-11 18:49 ` Bart Van Assche
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=20090810172235.GL12579@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=Eric.Moore@lsi.com \
--cc=corbet@lwn.net \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@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).