Merge tag 'rtc-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
[sfrench/cifs-2.6.git] / Documentation / block / switching-sched.rst
1 ===================
2 Switching Scheduler
3 ===================
4
5 To choose IO schedulers at boot time, use the argument 'elevator=deadline'.
6 'noop' and 'cfq' (the default) are also available. IO schedulers are assigned
7 globally at boot time only presently.
8
9 Each io queue has a set of io scheduler tunables associated with it. These
10 tunables control how the io scheduler works. You can find these entries
11 in::
12
13         /sys/block/<device>/queue/iosched
14
15 assuming that you have sysfs mounted on /sys. If you don't have sysfs mounted,
16 you can do so by typing::
17
18         # mount none /sys -t sysfs
19
20 It is possible to change the IO scheduler for a given block device on
21 the fly to select one of mq-deadline, none, bfq, or kyber schedulers -
22 which can improve that device's throughput.
23
24 To set a specific scheduler, simply do this::
25
26         echo SCHEDNAME > /sys/block/DEV/queue/scheduler
27
28 where SCHEDNAME is the name of a defined IO scheduler, and DEV is the
29 device name (hda, hdb, sga, or whatever you happen to have).
30
31 The list of defined schedulers can be found by simply doing
32 a "cat /sys/block/DEV/queue/scheduler" - the list of valid names
33 will be displayed, with the currently selected scheduler in brackets::
34
35   # cat /sys/block/sda/queue/scheduler
36   [mq-deadline] kyber bfq none
37   # echo none >/sys/block/sda/queue/scheduler
38   # cat /sys/block/sda/queue/scheduler
39   [none] mq-deadline kyber bfq