…TUAL). This fixes the VKERNEL build.
Submitted-by: Venkatesh Srinivas <firstname.lastname@example.org>
* Accept another argument for fqp allocation which is the corresponding fqmp. This is internally stored for proper self-removal out of the fqmp list on destruction. * This parameter is also used to link the fqp into the fqmp list automatically on creation, avoiding code duplication and deadlocking. * Changed the destruction refcount to -0x400 instead of -3 to make tracking of these cases simpler and not confuse them with bad refcounting. * NOTE: this also fixes the longstanding issue of an eventual panic after a number of policy switches to/from fq. Reported-by: Antonio Huete (tuxillo@)
* Avoid an int64 overflow when calculating the total disk budget by losing bits of precision if needed. * Note that this might not quite fix the issue yet, as there is one other place where the int64 overflow can happen, although it is less likely. * While here, make the rebalancing happen every 0.5s instead of every 1s, effectively reducing the chance of int64 overflows. Reported-by: Antonio Huete (tuxillo@)
* Add some strategic KKASSERT to catch negative values where they aren't allowed. * Avoid certain race conditions by using a local variable instead of using the generally accessible one (budget vs dpriv->budgetpb). Only set the final value once we are ready.
* Factor out an fq_drain which will either cancel or dispatch all the bios we have currently in all our fqp queues. * Clean out old comments and code. * Deal with flushes by not queuing them but rather letting dsched handle them. By returning EINVAL, dsched_queue will dispatch the flush itself.
* Modify print_backtrace to take a parameter 'count' that specifies the maximum number of frames to print for the backtrace. * Change all current consumers to use the new print_backtrace with count -1, resulting in the same behaviour as before this change. * Remove cruft in dsched_fq that simulated this behaviour previously.
* Implemented fq priority support. This also includes the userland tool ionice. * Implement an exit_buffer hook to be able to clean up bufs before they are reused. * Some minor performance improvements in fq.
* Add the FQ (fair queueing) policy for the dsched I/O scheduler framework. * Right now, this is at best experimental; it only starts rate limiting when the disk is busy. Each process is allocated an equal fair amount of disk time, based on the average request latency and tps. If the disk is busy and one process exceeeds its fair share, its bios are queued for later dispatch. To avoid starvation of heavy write processes, heavy writes are interleaved once every 3 scheduler rebalances. The scheduler rebalance time is currently set to 1s, so that exceeding processes will be limited after this period. * While I've done some limited testing on switching policies at runtime and even under heavy I/O going on, it is not recommended to do this, as some problems will crop up. * Future work to do: - stabilization pass - adding bucket support (i.e. having different priority buckets for groups of processes, so that for example processes A,B and C get a total aggregate of 80% disk time, while processes D and E get a total aggregate of 20%, instead of each process getting 20%) - adding an "ionice" userland tool to allow to change the bucket/priority of a process
* Import my branch of the I/O scheduler framework. This commit only introduces the core dsched framework, without binding it into the system and without any policy except for the default one.
* Specify the dumpdev on the savecore line. Fixed issues when the swapdev is not the same as the dumpdev. Reported-by: Alexander Polakov <email@example.com>
This file exists only on i386. Including it is not needed at all since <sys/bus.h> on i386 already brings it in (via <machine/bus_dma.h>) and also does the right thing in x86_64. This fixes module building on x86_64.