]> git.baikalelectronics.ru Git - kernel.git/commit
[libata] get rid of ATA_MAX_QUEUE loop in ata_qc_complete_multiple() v2
authorJens Axboe <jens.axboe@oracle.com>
Wed, 20 May 2009 07:44:39 +0000 (09:44 +0200)
committerJeff Garzik <jgarzik@redhat.com>
Wed, 10 Jun 2009 11:50:17 +0000 (07:50 -0400)
commit9b7badd47ef8a7e7abc9f0e3116d0926a29a10c1
treeac6550df0e231f024d11123a9386d2c7b168503c
parent61b1f40bd48e2c0ed3ee2f06f0a2c3a04352d9c0
[libata] get rid of ATA_MAX_QUEUE loop in ata_qc_complete_multiple() v2

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>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/libata-core.c