* ionice: requires scheduling since 7ab08ba3e5e6f161b93ff2b3b7d5b18dc7b44510
@ 2011-07-22 8:09 Voelker, Bernhard
2011-07-22 8:54 ` Karel Zak
0 siblings, 1 reply; 6+ messages in thread
From: Voelker, Bernhard @ 2011-07-22 8:09 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux@vger.kernel.org
Since 7ab08ba3e5e6f161b93ff2b3b7d5b18dc7b44510, ionice requires a "scheduling".
$ schedutils/ionice 123
ionice: scheduling for the COMMAND not specified
As `ionice` is the sister of `nice`, I question why a certain prio/class is needed.
What's wrong with not passing a certain prio/class?
Second, doesn't this break existing scripts which rely on "123" being executed?
Have a nice day,
Berny
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ionice: requires scheduling since 7ab08ba3e5e6f161b93ff2b3b7d5b18dc7b44510
2011-07-22 8:09 ionice: requires scheduling since 7ab08ba3e5e6f161b93ff2b3b7d5b18dc7b44510 Voelker, Bernhard
@ 2011-07-22 8:54 ` Karel Zak
2011-07-22 8:57 ` Voelker, Bernhard
0 siblings, 1 reply; 6+ messages in thread
From: Karel Zak @ 2011-07-22 8:54 UTC (permalink / raw)
To: Voelker, Bernhard; +Cc: util-linux@vger.kernel.org
On Fri, Jul 22, 2011 at 10:09:57AM +0200, Voelker, Bernhard wrote:
> Since 7ab08ba3e5e6f161b93ff2b3b7d5b18dc7b44510, ionice requires a "scheduling".
>
> $ schedutils/ionice 123
> ionice: scheduling for the COMMAND not specified
>
> As `ionice` is the sister of `nice`, I question why a certain prio/class is needed.
> What's wrong with not passing a certain prio/class?
Good point, I'll fix it.
> Second, doesn't this break existing scripts which rely on "123" being executed?
It has never been supported:
$ ionice 123
none: prio 4
ionice: ioprio_get failed: No such process
Unfortunately, the 123 has been always interpreted as PID, not as
COMMAND. The another bug is that without -p the ioprio_get() has been
called two times, the "none: prio 4" is for PID=0 ;-)
I'll improve the behavior:
ionice : print the current I/O prio.
ionice <COMMAND> : exec command with default (best-effort) class
ionice -p PID [...] : return info about the PID(s)
ionice -c CLASS COMMAND : exec command with the class
ionice -c CLASS -p PID [...] : modify PID(s) class
Comments?
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: ionice: requires scheduling since 7ab08ba3e5e6f161b93ff2b3b7d5b18dc7b44510
2011-07-22 8:54 ` Karel Zak
@ 2011-07-22 8:57 ` Voelker, Bernhard
2011-07-22 9:43 ` Karel Zak
0 siblings, 1 reply; 6+ messages in thread
From: Voelker, Bernhard @ 2011-07-22 8:57 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux@vger.kernel.org
Karel Zak wrote:
> I'll improve the behavior:
great!
> ionice : print the current I/O prio.
> ionice <COMMAND> : exec command with default (best-effort) class
> ionice -p PID [...] : return info about the PID(s)
> ionice -c CLASS COMMAND : exec command with the class
> ionice -c CLASS -p PID [...] : modify PID(s) class
>
> Comments?
ionice --help : print help
is missing ;-)
Berny
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ionice: requires scheduling since 7ab08ba3e5e6f161b93ff2b3b7d5b18dc7b44510
2011-07-22 8:57 ` Voelker, Bernhard
@ 2011-07-22 9:43 ` Karel Zak
2011-07-22 10:21 ` Voelker, Bernhard
0 siblings, 1 reply; 6+ messages in thread
From: Karel Zak @ 2011-07-22 9:43 UTC (permalink / raw)
To: Voelker, Bernhard; +Cc: util-linux@vger.kernel.org
On Fri, Jul 22, 2011 at 10:57:28AM +0200, Voelker, Bernhard wrote:
> Karel Zak wrote:
>
> > I'll improve the behavior:
>
> great!
>
> > ionice : print the current I/O prio.
> > ionice <COMMAND> : exec command with default (best-effort) class
> > ionice -p PID [...] : return info about the PID(s)
> > ionice -c CLASS COMMAND : exec command with the class
> > ionice -c CLASS -p PID [...] : modify PID(s) class
> >
> > Comments?
Fixed.
I've also added support for human readable class names, you can use:
ionice -c best-effort /bin/foo
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: ionice: requires scheduling since 7ab08ba3e5e6f161b93ff2b3b7d5b18dc7b44510
2011-07-22 9:43 ` Karel Zak
@ 2011-07-22 10:21 ` Voelker, Bernhard
2011-07-22 10:57 ` Karel Zak
0 siblings, 1 reply; 6+ messages in thread
From: Voelker, Bernhard @ 2011-07-22 10:21 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux@vger.kernel.org
Karel Zak wrote:
> Fixed.
>
> I've also added support for human readable class names, you can use:
>
> ionice -c best-effort /bin/foo
great, thanks!
One last corner case regarding -t (ignoring failure):
$ schedutils/ionice -c 4 -t schedutils/ionice
ionice: bad prio class 4
$ schedutils/ionice -n 8 -t schedutils/ionice
idle
With -c, a bad prio class leads to a failure, while it doesn't with -n.
Is this intended?
Berny
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ionice: requires scheduling since 7ab08ba3e5e6f161b93ff2b3b7d5b18dc7b44510
2011-07-22 10:21 ` Voelker, Bernhard
@ 2011-07-22 10:57 ` Karel Zak
0 siblings, 0 replies; 6+ messages in thread
From: Karel Zak @ 2011-07-22 10:57 UTC (permalink / raw)
To: Voelker, Bernhard; +Cc: util-linux@vger.kernel.org
On Fri, Jul 22, 2011 at 12:21:08PM +0200, Voelker, Bernhard wrote:
> Karel Zak wrote:
>
> > Fixed.
> >
> > I've also added support for human readable class names, you can use:
> >
> > ionice -c best-effort /bin/foo
>
> great, thanks!
>
> One last corner case regarding -t (ignoring failure):
>
> $ schedutils/ionice -c 4 -t schedutils/ionice
> ionice: bad prio class 4
> $ schedutils/ionice -n 8 -t schedutils/ionice
> idle
>
> With -c, a bad prio class leads to a failure, while it doesn't with -n.
> Is this intended?
OK. Copy & past from the latest commit:
ionice: make -t more tolerant
* replace errx() with warnx() for unknown -c class
The right place to check I/O scheduler features is in kernel. We should
not try to be more smart than kernel.
* make the code ready (robust) for unknown sched.classes
* fix -t behavior
old version:
$ ionice -c 4 -t bash
ionice: bad prio class 4
new version:
$ ionice -c 4 -t bash
Reported-by: Voelker, Bernhard" <bernhard.voelker@siemens-enterprise.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-07-22 10:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-22 8:09 ionice: requires scheduling since 7ab08ba3e5e6f161b93ff2b3b7d5b18dc7b44510 Voelker, Bernhard
2011-07-22 8:54 ` Karel Zak
2011-07-22 8:57 ` Voelker, Bernhard
2011-07-22 9:43 ` Karel Zak
2011-07-22 10:21 ` Voelker, Bernhard
2011-07-22 10:57 ` Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox