Merge branch 'sglist-arch' into for-linus
authorJens Axboe <jens.axboe@oracle.com>
Tue, 16 Oct 2007 10:29:34 +0000 (12:29 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 16 Oct 2007 10:29:34 +0000 (12:29 +0200)
13 files changed:
Documentation/DMA-mapping.txt
Documentation/HOWTO
Documentation/block/00-INDEX [new file with mode: 0644]
Documentation/block/as-iosched.txt
Documentation/block/biodoc.txt
Documentation/block/deadline-iosched.txt
Documentation/block/ioprio.txt
Documentation/block/request.txt
Documentation/block/switching-sched.txt
block/bsg.c
drivers/block/cciss.c
drivers/block/cpqarray.c
fs/splice.c

index 6883921..3c8ae02 100644 (file)
@@ -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>
index c64e969..dceb309 100644 (file)
@@ -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 (file)
index 0000000..961a051
--- /dev/null
@@ -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
index a598fe1..738b72b 100644 (file)
@@ -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.
+
index dc3f49e..93f223b 100644 (file)
@@ -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
index be08ffd..c23cab1 100644 (file)
@@ -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>
 
 
index 35e516b..8ed8c59 100644 (file)
@@ -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>
index fff58ac..754e104 100644 (file)
@@ -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
index 5fa130a..634c952 100644 (file)
@@ -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
index b8ddfc6..8e181ab 100644 (file)
@@ -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,
index 2023d61..3fb7e8b 100644 (file)
@@ -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);
index 3853c9a..568603d 100644 (file)
@@ -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;
                
index e95a362..02c39ae 100644 (file)
@@ -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;
 }