Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 303524 Details for
Bug 443842
[PATCH] allow ionice to proceed even in case it could not set priority
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to allow ionice to proceed even in case it could not set priority
util-linux-ng-2.13.1-ionice-t.patch (text/plain), 2.40 KB, created by
Lubomir Kundrak
on 2008-04-23 16:54:20 UTC
(
hide
)
Description:
Patch to allow ionice to proceed even in case it could not set priority
Filename:
MIME Type:
Creator:
Lubomir Kundrak
Created:
2008-04-23 16:54:20 UTC
Size:
2.40 KB
patch
obsolete
>This patch adds -t option to ionice, to enable "tolerant" behavior. >If it is specified, ionice returns successfully or executes specified >command even in case it was not possible to run the specified command. > >Lubomir Kundrak <lkundrak@redhat.com> > >diff -urp util-linux-ng-2.13.1.orig/schedutils/ionice.1 util-linux-ng-2.13.1/schedutils/ionice.1 >--- util-linux-ng-2.13.1.orig/schedutils/ionice.1 2007-10-26 01:22:59.000000000 +0200 >+++ util-linux-ng-2.13.1/schedutils/ionice.1 2008-04-23 18:39:46.000000000 +0200 >@@ -49,6 +49,11 @@ data. > Pass in a process pid to change an already running process. If this argument > is not given, \fBionice\fP will run the listed program with the given > parameters. >+.TP 7 >+\fB-t\fP >+Ignore failure to set requested priority. If COMMAND is specified, run it >+even in case it was not possible to set desired scheduling priority, what >+can happen due to insufficient privilegies or old kernel version. > > .SH EXAMPLES > .LP >diff -urp util-linux-ng-2.13.1.orig/schedutils/ionice.c util-linux-ng-2.13.1/schedutils/ionice.c >--- util-linux-ng-2.13.1.orig/schedutils/ionice.c 2008-01-16 10:31:42.000000000 +0100 >+++ util-linux-ng-2.13.1/schedutils/ionice.c 2008-04-23 18:37:56.000000000 +0200 >@@ -82,16 +82,17 @@ static void usage(void) > printf("\t-c\tScheduling class\n"); > printf("\t\t\t1: realtime, 2: best-effort, 3: idle\n"); > printf("\t-p\tProcess pid\n"); >+ printf("\t-t\tIgnore failures to set priority, run command unconditionally\n"); > printf("\t-h\tThis help page\n"); > printf("\nJens Axboe <axboe@suse.de> (C) 2005\n"); > } > > int main(int argc, char *argv[]) > { >- int ioprio = 4, set = 0, ioprio_class = IOPRIO_CLASS_BE; >+ int ioprio = 4, set = 0, tolerant = 0, ioprio_class = IOPRIO_CLASS_BE; > int c, pid = 0; > >- while ((c = getopt(argc, argv, "+n:c:p:h")) != EOF) { >+ while ((c = getopt(argc, argv, "+n:c:p:th")) != EOF) { > switch (c) { > case 'n': > ioprio = strtol(optarg, NULL, 10); >@@ -104,6 +105,9 @@ int main(int argc, char *argv[]) > case 'p': > pid = strtol(optarg, NULL, 10); > break; >+ case 't': >+ tolerant = 1; >+ break; > case 'h': > default: > usage(); >@@ -147,8 +151,10 @@ int main(int argc, char *argv[]) > } > } else { > if (ioprio_set(IOPRIO_WHO_PROCESS, pid, ioprio | ioprio_class << IOPRIO_CLASS_SHIFT) == -1) { >- perror("ioprio_set"); >- exit(EXIT_FAILURE); >+ if (!tolerant) { >+ perror("ioprio_set"); >+ exit(EXIT_FAILURE); >+ } > } > > if (argv[optind]) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 443842
: 303524