diff options
-rw-r--r-- | Documentation/DMA-mapping.txt | 2 | ||||
-rw-r--r-- | Documentation/HOWTO | 2 | ||||
-rw-r--r-- | Documentation/block/00-INDEX | 20 | ||||
-rw-r--r-- | Documentation/block/as-iosched.txt | 21 | ||||
-rw-r--r-- | Documentation/block/biodoc.txt | 4 | ||||
-rw-r--r-- | Documentation/block/deadline-iosched.txt | 25 | ||||
-rw-r--r-- | Documentation/block/ioprio.txt | 2 | ||||
-rw-r--r-- | Documentation/block/request.txt | 2 | ||||
-rw-r--r-- | Documentation/block/switching-sched.txt | 21 | ||||
-rw-r--r-- | block/bsg.c | 2 | ||||
-rw-r--r-- | drivers/block/cciss.c | 1 | ||||
-rw-r--r-- | drivers/block/cpqarray.c | 3 | ||||
-rw-r--r-- | fs/splice.c | 2 |
13 files changed, 71 insertions, 36 deletions
diff --git a/Documentation/DMA-mapping.txt b/Documentation/DMA-mapping.txt index 6883921743f0..3c8ae020b6a7 100644 --- a/Documentation/DMA-mapping.txt +++ b/Documentation/DMA-mapping.txt @@ -782,5 +782,5 @@ following people: Jay Estabrook <Jay.Estabrook@compaq.com> Thomas Sailer <sailer@ife.ee.ethz.ch> Andrea Arcangeli <andrea@suse.de> - Jens Axboe <axboe@suse.de> + Jens Axboe <jens.axboe@oracle.com> David Mosberger-Tang <davidm@hpl.hp.com> diff --git a/Documentation/HOWTO b/Documentation/HOWTO index c64e969dc33b..dceb30921498 100644 --- a/Documentation/HOWTO +++ b/Documentation/HOWTO @@ -330,7 +330,7 @@ Here is a list of some of the different kernel trees available: - ACPI development tree, Len Brown <len.brown@intel.com> git.kernel.org:/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6.git - - Block development tree, Jens Axboe <axboe@suse.de> + - Block development tree, Jens Axboe <jens.axboe@oracle.com> git.kernel.org:/pub/scm/linux/kernel/git/axboe/linux-2.6-block.git - DRM development tree, Dave Airlie <airlied@linux.ie> diff --git a/Documentation/block/00-INDEX b/Documentation/block/00-INDEX new file mode 100644 index 000000000000..961a0513f8c3 --- /dev/null +++ b/Documentation/block/00-INDEX @@ -0,0 +1,20 @@ +00-INDEX + - This file +as-iosched.txt + - Anticipatory IO scheduler +barrier.txt + - I/O Barriers +biodoc.txt + - Notes on the Generic Block Layer Rewrite in Linux 2.5 +capability.txt + - Generic Block Device Capability (/sys/block/<disk>/capability) +deadline-iosched.txt + - Deadline IO scheduler tunables +ioprio.txt + - Block io priorities (in CFQ scheduler) +request.txt + - The members of struct request (in include/linux/blkdev.h) +stat.txt + - Block layer statistics in /sys/block/<dev>/stat +switching-sched.txt + - Switching I/O schedulers at runtime diff --git a/Documentation/block/as-iosched.txt b/Documentation/block/as-iosched.txt index a598fe10a297..738b72be128e 100644 --- a/Documentation/block/as-iosched.txt +++ b/Documentation/block/as-iosched.txt @@ -20,15 +20,10 @@ actually has a head for each physical device in the logical RAID device. However, setting the antic_expire (see tunable parameters below) produces very similar behavior to the deadline IO scheduler. - Selecting IO schedulers ----------------------- -To choose IO schedulers at boot time, use the argument 'elevator=deadline'. -'noop', 'as' and 'cfq' (the default) are also available. IO schedulers are -assigned globally at boot time only presently. It's also possible to change -the IO scheduler for a determined device on the fly, as described in -Documentation/block/switching-sched.txt. - +Refer to Documentation/block/switching-sched.txt for information on +selecting an io scheduler on a per-device basis. Anticipatory IO scheduler Policies ---------------------------------- @@ -115,7 +110,7 @@ statistics (average think time, average seek distance) on the process that submitted the just completed request are examined. If it seems likely that that process will submit another request soon, and that request is likely to be near the just completed request, then the IO -scheduler will stop dispatching more read requests for up time (antic_expire) +scheduler will stop dispatching more read requests for up to (antic_expire) milliseconds, hoping that process will submit a new request near the one that just completed. If such a request is made, then it is dispatched immediately. If the antic_expire wait time expires, then the IO scheduler @@ -165,3 +160,13 @@ The parameters are: for big seek time devices though not a linear correspondence - most processes have only a few ms thinktime. +In addition to the tunables above there is a read-only file named est_time +which, when read, will show: + + - The probability of a task exiting without a cooperating task + submitting an anticipated IO. + + - The current mean think time. + + - The seek distance used to determine if an incoming IO is better. + diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt index dc3f49e3e539..93f223b9723f 100644 --- a/Documentation/block/biodoc.txt +++ b/Documentation/block/biodoc.txt @@ -2,7 +2,7 @@ ===================================================== Notes Written on Jan 15, 2002: - Jens Axboe <axboe@suse.de> + Jens Axboe <jens.axboe@oracle.com> Suparna Bhattacharya <suparna@in.ibm.com> Last Updated May 2, 2002 @@ -21,7 +21,7 @@ Credits: --------- 2.5 bio rewrite: - Jens Axboe <axboe@suse.de> + Jens Axboe <jens.axboe@oracle.com> Many aspects of the generic block layer redesign were driven by and evolved over discussions, prior patches and the collective experience of several diff --git a/Documentation/block/deadline-iosched.txt b/Documentation/block/deadline-iosched.txt index be08ffd1e9b8..c23cab13c3d1 100644 --- a/Documentation/block/deadline-iosched.txt +++ b/Documentation/block/deadline-iosched.txt @@ -5,16 +5,10 @@ This little file attempts to document how the deadline io scheduler works. In particular, it will clarify the meaning of the exposed tunables that may be of interest to power users. -Each io queue has a set of io scheduler tunables associated with it. These -tunables control how the io scheduler works. You can find these entries -in: - -/sys/block/<device>/queue/iosched - -assuming that you have sysfs mounted on /sys. If you don't have sysfs mounted, -you can do so by typing: - -# mount none /sys -t sysfs +Selecting IO schedulers +----------------------- +Refer to Documentation/block/switching-sched.txt for information on +selecting an io scheduler on a per-device basis. ******************************************************************************** @@ -41,14 +35,11 @@ fifo_batch When a read request expires its deadline, we must move some requests from the sorted io scheduler list to the block device dispatch queue. fifo_batch -controls how many requests we move, based on the cost of each request. A -request is either qualified as a seek or a stream. The io scheduler knows -the last request that was serviced by the drive (or will be serviced right -before this one). See seek_cost and stream_unit. +controls how many requests we move. -write_starved (number of dispatches) -------------- +writes_starved (number of dispatches) +-------------- When we have to move requests from the io scheduler queue to the block device dispatch queue, we always give a preference to reads. However, we @@ -73,6 +64,6 @@ that comes at basically 0 cost we leave that on. We simply disable the rbtree front sector lookup when the io scheduler merge function is called. -Nov 11 2002, Jens Axboe <axboe@suse.de> +Nov 11 2002, Jens Axboe <jens.axboe@oracle.com> diff --git a/Documentation/block/ioprio.txt b/Documentation/block/ioprio.txt index 35e516b0b8a9..8ed8c59380b4 100644 --- a/Documentation/block/ioprio.txt +++ b/Documentation/block/ioprio.txt @@ -180,4 +180,4 @@ int main(int argc, char *argv[]) ---> snip ionice.c tool <--- -March 11 2005, Jens Axboe <axboe@suse.de> +March 11 2005, Jens Axboe <jens.axboe@oracle.com> diff --git a/Documentation/block/request.txt b/Documentation/block/request.txt index fff58acb40a3..754e104ed369 100644 --- a/Documentation/block/request.txt +++ b/Documentation/block/request.txt @@ -1,7 +1,7 @@ struct request documentation -Jens Axboe <axboe@suse.de> 27/05/02 +Jens Axboe <jens.axboe@oracle.com> 27/05/02 1.0 Index diff --git a/Documentation/block/switching-sched.txt b/Documentation/block/switching-sched.txt index 5fa130a67531..634c952e1964 100644 --- a/Documentation/block/switching-sched.txt +++ b/Documentation/block/switching-sched.txt @@ -1,3 +1,18 @@ +To choose IO schedulers at boot time, use the argument 'elevator=deadline'. +'noop', 'as' and 'cfq' (the default) are also available. IO schedulers are +assigned globally at boot time only presently. + +Each io queue has a set of io scheduler tunables associated with it. These +tunables control how the io scheduler works. You can find these entries +in: + +/sys/block/<device>/queue/iosched + +assuming that you have sysfs mounted on /sys. If you don't have sysfs mounted, +you can do so by typing: + +# mount none /sys -t sysfs + As of the Linux 2.6.10 kernel, it is now possible to change the IO scheduler for a given block device on the fly (thus making it possible, for instance, to set the CFQ scheduler for the system default, but @@ -20,3 +35,9 @@ noop anticipatory deadline [cfq] # echo anticipatory > /sys/block/hda/queue/scheduler # cat /sys/block/hda/queue/scheduler noop [anticipatory] deadline cfq + +Each io queue has a set of io scheduler tunables associated with it. These +tunables control how the io scheduler works. You can find these entries +in: + +/sys/block/<device>/queue/iosched diff --git a/block/bsg.c b/block/bsg.c index b8ddfc66f210..8e181ab3afb9 100644 --- a/block/bsg.c +++ b/block/bsg.c @@ -908,7 +908,7 @@ static long bsg_ioctl(struct file *file, unsigned int cmd, unsigned long arg) } } -static struct file_operations bsg_fops = { +static const struct file_operations bsg_fops = { .read = bsg_read, .write = bsg_write, .poll = bsg_poll, diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 2023d61d5458..3fb7e8bc436d 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -1191,7 +1191,6 @@ static inline void complete_buffers(struct bio *bio, int status) { while (bio) { struct bio *xbh = bio->bi_next; - int nr_sectors = bio_sectors(bio); bio->bi_next = NULL; bio_endio(bio, status ? 0 : -EIO); diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c index 3853c9a38d6a..568603d3043e 100644 --- a/drivers/block/cpqarray.c +++ b/drivers/block/cpqarray.c @@ -981,9 +981,8 @@ static void start_io(ctlr_info_t *h) static inline void complete_buffers(struct bio *bio, int ok) { struct bio *xbh; - while(bio) { - int nr_sectors = bio_sectors(bio); + while (bio) { xbh = bio->bi_next; bio->bi_next = NULL; diff --git a/fs/splice.c b/fs/splice.c index e95a36228863..02c39ae719b6 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -1390,10 +1390,10 @@ static int pipe_to_user(struct pipe_inode_info *pipe, struct pipe_buffer *buf, if (copy_to_user(sd->u.userptr, src + buf->offset, sd->len)) ret = -EFAULT; + buf->ops->unmap(pipe, buf, src); out: if (ret > 0) sd->u.userptr += ret; - buf->ops->unmap(pipe, buf, src); return ret; } |