[PATCH] ionice: Extend the man page to explain the "none" class and cpu-nice inheritance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Extend the ionice man page to explain the "none" class and how the
cpu-nice => io-priority inheritance works.

Signed-off-by: Jakob Unterwurzacher <jakobunt@xxxxxxxxx>
---

Reading the cfq source [1] cleared this up for me.
The formula in the patch is from Documentation/block/ioprio.txt .

Preview of the patched man page: http://pastebin.com/f5caa733c

[1] http://tomoyo.sourceforge.jp/cgi-bin/lxr/source/block/cfq-iosched.c#L1366


diff -up a/ionice.1 b/ionice.1
--- a/ionice.1	2008-12-27 21:34:49.000000000 +0100
+++ b/ionice.1	2008-12-27 21:08:11.000000000 +0100
@@ -11,7 +11,7 @@ This program sets or gets the io schedul
 If no arguments or just \fI-p\fR is given, \fIionice\fR will query the current
 io scheduling class and priority for that process.
 
-As of this writing, Linux supports 3 scheduling classes:
+As of this writing, a process can be in one of four scheduling classes:
 
 .IP "\fBIdle\fP"
 A program running with idle io priority will only get disk time when no other
@@ -21,9 +21,9 @@ class does not take a priority argument.
 is permitted for an ordinary user (since kernel 2.6.25).
 
 .IP "\fBBest effort\fP"
-This is the default scheduling class for any process that hasn't asked for
-a specific io priority. Programs inherit the CPU nice setting for io
-priorities. This class takes a priority argument from \fI0-7\fR, with lower
+This is the effective scheduling class for any process that hasn't asked for
+a specific io priority.
+This class takes a priority argument from \fI0-7\fR, with lower
 number being higher priority. Programs running at the same best effort
 priority are served in a round-robin fashion.
 
@@ -35,6 +35,14 @@ some care, as it can starve other proces
 will receive on each scheduling window. This scheduling class is not
 permitted for an ordinary (i.e., non-root) user.
 
+.IP "\fBNone\fP"
+A process that that hasn't asked for a specific io priority will formally be
+in this class. The io scheduler will treat a process that is in this class as
+if it were in the best effort class. The priority within the best effort
+class will be dynamically derived from the cpu nice level of the process:
+io_priority = (cpu_nice + 20) / 5
+
+
 .SH OPTIONS
 .IP "\fB-c \fIclass\fP"
 The scheduling class. \fI1\fR for real time, \fI2\fR for best-effort, \fI3\fR for idle.
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux