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.