Fix a system performance issue created by ata_sort_queue(). This function
authorMatthew Dillon <dillon@dragonflybsd.org>
Sat, 28 Jun 2008 01:06:40 +0000 (01:06 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sat, 28 Jun 2008 01:06:40 +0000 (01:06 +0000)
commitdbe4d0469d91af63fff18a002232bb1fbccbf9e4
tree74510549f3576c9d68253393c8706ab9413bcd1f
parent06ad81ff2e9f46e09ccd4ed99c75974f053b6c09
Fix a system performance issue created by ata_sort_queue().  This function
implements an elevator sort but it also allows requests to be delayed
indefinitely when other requests continually get inserted in front of them.
HAMMER's almost log-linear writing really exposes this issue.

The fix is to count how many times a request got delayed due to an insertion.
If the count exceeds 8, the new request is placed at the end of the queue and
set as the new freeze point.
sys/dev/disk/nata/ata-all.h
sys/dev/disk/nata/ata-queue.c