git: KERNEL - Implement a poor man's ioscheduler using sys/iosched.h
Matthew Dillon
dillon at crater.dragonflybsd.org
Thu Sep 10 19:18:02 PDT 2009
commit 79eae878f1b8b6e2cb926de5b30091ae33d25ea7
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Thu Sep 10 19:12:08 2009 -0700
KERNEL - Implement a poor man's ioscheduler using sys/iosched.h
* Move struct iosched_data from the LWP to the TD.
* Expand bd_wait()'s wakeup array from 128 entries to 16384 entries
to cover a larger portion of the buffer cache's dirty space.
* bwillwrite() now adds to iosched_data->iowbytes and the ticks
global is used to decay it.
Total iowbytes is kept in per-cpu structures. Each cpu does not
necessarily match the threads assigned to it, but in aggregate
the sum of iowbytes for all cpus will match the sum of iowbytes
for all threads in the system.
* bwillwrite() now calculates a relative I/O write load for each thread
in the system and passes a fractional calculation to bd_wait().
This causes processes with low I/O loads to have a higher priority
(as in, NOT stall in bd_wait() anywhere near as long), and processes
with high I/O loads to have a lower priority (stall longer in bd_wait()),
when the buffer cache is saturated with dirty data.
Summary of changes:
sys/kern/kern_exit.c | 1 +
sys/kern/kern_iosched.c | 77 ++++++++++++++++++++++++++++++++++++++++++++--
sys/kern/lwkt_thread.c | 1 +
sys/kern/vfs_bio.c | 5 ++-
sys/sys/iosched.h | 7 +++-
sys/sys/proc.h | 1 -
sys/sys/thread.h | 4 ++
7 files changed, 88 insertions(+), 8 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/79eae878f1b8b6e2cb926de5b30091ae33d25ea7
--
DragonFly BSD source repository
More information about the Commits
mailing list