DragonFly commits List (threaded) for 2011-04
git: kernel - Limit tags allocated to reads or writes for CAM/scsi/ahci disks
Author: Matthew Dillon <firstname.lastname@example.org>
Date: Sat Apr 9 19:52:29 2011 -0700
kernel - Limit tags allocated to reads or writes for CAM/scsi/ahci disks
* Limit the number of tags which can be taken up read or write requests.
If all tags are taken up by one type of request then the other type
of request can become starved.
* This is particularly important because drives usually cache writes and
return an immediate completion, so even if the system is reading heavily
enough to eat a lot of tags we always want a few left in reserve to
drain those writes in the drive's write cache.
* A similar situation can occur when flushing a lot of write data, which
is almost guaranteed to fill up not only available tags but also the
drive's write cache. When the drive's write cache becomes full then
write requests begin to stall (no longer return instantly), causing
reads to become starved.
* When no tags are available give reads priority over writes for
the moment. This needs to be fixed.
Summary of changes:
sys/bus/cam/cam_queue.c | 10 +++
sys/bus/cam/cam_queue.h | 3 +
sys/bus/cam/cam_sim.c | 9 +++
sys/bus/cam/cam_sim.h | 1 +
sys/bus/cam/scsi/scsi_da.c | 150 +++++++++++++++++++++++++++++++++-----------
5 files changed, 137 insertions(+), 36 deletions(-)
DragonFly BSD source repository