git: KERNEL - Implement a poor man's ioscheduler using sys/iosch

看板DFBSD_commit作者時間16年前 (2009/09/11 10:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit 79eae878f1b8b6e2cb926de5b30091ae33d25ea7 Author: Matthew Dillon <dillon@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
文章代碼(AID): #1AgRQetP (DFBSD_commit)