Allow users to set the "none" class on processes. Using the
none class has the distict advantage that the io priority
is inherited from the cpu nice level. Update the man page
to reflect the change.
Signed-off-by: Jakob Unterwurzacher <jakobunt@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
.SH OPTIONS
.IP "\fB-c \fIclass\fP"
-The scheduling class. \fI1\fR for real time, \fI2\fR for best-effort, \fI3\fR for idle.
+The scheduling class. \fI0\fR for none, \fI1\fR for real time, \fI2\fR for
+best-effort, \fI3\fR for idle.
.IP "\fB-n \fIclassdata\fP"
The scheduling class data. This defines the class data, if the class
accepts an argument. For real time and best-effort, \fI0-7\fR is valid
"\nOptions:\n"
" -n <classdata> class data (0-7, lower being higher prio)\n"
" -c <class> scheduling class\n"
- " 1: realtime, 2: best-effort, 3: idle\n"
+ " 0: none, 1: realtime, 2: best-effort, 3: idle\n"
" -t ignore failures\n"
" -h this help\n\n"));
exit(rc);
switch (ioclass) {
case IOPRIO_CLASS_NONE:
- ioclass = IOPRIO_CLASS_BE;
+ if (set & 1)
+ warnx(_("ignoring given class data for none class"));
+ ioprio = 0;
break;
case IOPRIO_CLASS_RT:
case IOPRIO_CLASS_BE: