Add disk I/O scheduling for positively niced processes.

When a positively niced process requests a disk I/O, make
it wait for its nice value of ticks before scheduling its
I/O request if there are any other processes with I/O
requests in the disk queue. For all the gory details, see
the ``Running fsck in the Background'' paper in the Usenix
BSDCon 2002 Conference Proceedings, pages 55-64.
This commit is contained in:
Kirk McKusick 2001-12-14 10:49:15 +00:00
parent 1a6ec3e8a3
commit 3ce63c45f7

View File

@ -94,7 +94,9 @@ extern struct buf_ops buf_ops_bio;
*/
struct buf {
/* XXX: b_io must be the first element of struct buf for now /phk */
/* XXX: if you change this, fix BIOTOBUF macro below */
struct bio b_io; /* "Builtin" I/O request. */
#define BIOTOBUF(biop) ((struct buf *)(biop))
#define b_bcount b_io.bio_bcount
#define b_blkno b_io.bio_blkno
#define b_caller1 b_io.bio_caller1