linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: linux-ide@vger.kernel.org, htejun@gmail.com
Subject: Re: ibata: get rid of ATA_MAX_QUEUE loop in ata_qc_complete_multiple() v2
Date: Wed, 20 May 2009 03:49:35 -0400	[thread overview]
Message-ID: <4A13B60F.8030603@garzik.org> (raw)
In-Reply-To: <20090520074439.GJ11363@kernel.dk>

Jens Axboe wrote:
> We very rarely (if ever) complete more than one command in the
> sactive mask at the time, even for extremely high IO rates. So
> looping over the entire range of possible tags is pointless,
> instead use __ffs() to just find the completed tags directly.
> 
> Updated to clear the tag from the done_mask instead of shifting
> done_mask down as suggested by From: Tejun Heo <htejun@gmail.com>
> Verified with a user space tester to produce the same results.
> 
> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
> ---
>  drivers/ata/libata-core.c |   11 +++++------
>  1 files changed, 5 insertions(+), 6 deletions(-)

Much cleaner.  Queued...

Separately, I wonder if we shouldn't add code to report when the 
hardware gives us an unknown tag.

The code always correctly handles invalid tags passed to us from 
hardware "if (qc)", but we should probably squawk when that happens, I 
suspect.

	Jeff




  parent reply	other threads:[~2009-05-20  7:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-20  7:44 ibata: get rid of ATA_MAX_QUEUE loop in ata_qc_complete_multiple() v2 Jens Axboe
2009-05-20  7:46 ` Tejun Heo
2009-05-20  7:49 ` Jeff Garzik [this message]
2009-05-20  7:58   ` Jens Axboe
2009-05-20 20:11 ` Jeff Garzik

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=4A13B60F.8030603@garzik.org \
    --to=jeff@garzik.org \
    --cc=htejun@gmail.com \
    --cc=jens.axboe@oracle.com \
    --cc=linux-ide@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).