linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Jeff Garzik <jeff@garzik.org>
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 09:58:52 +0200	[thread overview]
Message-ID: <20090520075852.GL11363@kernel.dk> (raw)
In-Reply-To: <4A13B60F.8030603@garzik.org>

On Wed, May 20 2009, Jeff Garzik wrote:
> 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...

Thanks!

> 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.

Probably a good idea, it is a sign of bigger problems if the hardware
completes tags that we don't know about.

-- 
Jens Axboe


  reply	other threads:[~2009-05-20  7:58 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
2009-05-20  7:58   ` Jens Axboe [this message]
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=20090520075852.GL11363@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=htejun@gmail.com \
    --cc=jeff@garzik.org \
    --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).