DragonFly BSD
DragonFly commits List (threaded) for 2011-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

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


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 9 Apr 2011 19:58:26 -0700 (PDT)

commit af0aa0ac35206b1999465292512771001f1a1b37
Author: Matthew Dillon <dillon@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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]