Replace the bwillwrite() subsystem to make it more fair to processes.
commitc4df96359ae35da7b72c09f633437f5c4a8f33b7
authorMatthew Dillon <dillon@dragonflybsd.org>
Sat, 28 Jun 2008 17:59:51 +0000 (28 17:59 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sat, 28 Jun 2008 17:59:51 +0000 (28 17:59 +0000)
treedd51de766f92c675afbe36c7da2253df423055d8
parent21b7199d3f2f84c0134d5ec2bc32180cda622176
Replace the bwillwrite() subsystem to make it more fair to processes.

* Add new API functions, bwillread(), bwillwrite(), bwillinode() which
  the kernel calls when it intends to read, write, or make inode
  modifications.

* Redo the backend.  Add bd_heatup() and bd_wait().  bd_heatup() heats up
  the buf_daemon, starting it flushing before we hit any blocking conditions
  (similar to the previous algorith).

* The new bwill*() blocking functions no longer introduce escalating delays
  to keep the number of dirty buffers under control.  Instead it takes a page
  from HAMMER and estimates the load caused by the caller, then waits for a
  specific number of dirty buffers to complete their write I/O's before
  returning.  If the buffers can be retired quickly these functions will
  return more quickly.
sys/conf/files
sys/kern/kern_iosched.c [new file with mode: 0644]
sys/kern/vfs_bio.c
sys/kern/vfs_syscalls.c
sys/kern/vfs_vnops.c
sys/sys/buf.h
sys/sys/iosched.h [new file with mode: 0644]
sys/sys/proc.h
sys/vfs/ufs/ffs_softdep.c