git: kernel - Limit tags allocated to reads or writes for CAM/scsi/ahci disks

Matthew Dillon dillon at crater.dragonflybsd.org
Sat Apr 9 19:59:11 PDT 2011


commit af0aa0ac35206b1999465292512771001f1a1b37
Author: Matthew Dillon <dillon at apollo.backplane.com>
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(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/af0aa0ac35206b1999465292512771001f1a1b37


-- 
DragonFly BSD source repository





More information about the Commits mailing list