From 3ce63c45f7443b1152d8caa78ddd835658eae771 Mon Sep 17 00:00:00 2001 From: Kirk McKusick Date: Fri, 14 Dec 2001 10:49:15 +0000 Subject: [PATCH] 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. --- sys/sys/buf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/sys/buf.h b/sys/sys/buf.h index dbac38b0dba0..efeaec102294 100644 --- a/sys/sys/buf.h +++ b/sys/sys/buf.h @@ -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