public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* chrt requires priority argument
@ 2014-02-06 20:47 Phillip Susi
  2014-02-17 11:52 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Phillip Susi @ 2014-02-06 20:47 UTC (permalink / raw)
  To: util-linux

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

chrt requires a priority argument, even for classes ( like batch )
that do not support them.  If you specify a non zero value, then the
command fails.  I think the argument should be ignored and forced to
zero for these classes, and the man page updated to indicate that the
priority is ignored for those classes that don't use it.  If the
argument could be made optional so you can omit it that would be nice too.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJS8/TxAAoJEI5FoCIzSKrw1FEH/12oM8MaMSQzJSLaHwB23DnT
hFGjIBFMn8nSbIXQinnhO+XmtCpoQUrRZ0rBZ6BjYno8t7NGpV1KZsX4x/cC8ZQD
kJj2jgxu8A8ETagPw1oPfIklZbq3FNQhTE+IczrQWlAr8elr1DB+m0pf/GVpN6b+
PiGvE+PUBnElOnEMic3uDQqvXZWSd+bDEcM99Gs2X9zH2nK1eGblhJav4uP5B3cY
kJqTROeB/hb2Yiiur0tEE7/TJoIYlNJbo7Va3LmhyUCiNYk3YMqep45Jh+2jSZ77
EP1EZ7OXea3NGdEc0dgE3Hb/OumkcEowxeEJLpz8sUN1LZf+I6wcL02O7fV9eHQ=
=TF0C
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: chrt requires priority argument
  2014-02-06 20:47 chrt requires priority argument Phillip Susi
@ 2014-02-17 11:52 ` Karel Zak
  0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2014-02-17 11:52 UTC (permalink / raw)
  To: Phillip Susi; +Cc: util-linux

On Thu, Feb 06, 2014 at 03:47:45PM -0500, Phillip Susi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> chrt requires a priority argument, even for classes ( like batch )
> that do not support them.  If you specify a non zero value, then the
> command fails.  I think the argument should be ignored and forced to
> zero for these classes

 Well, why do you expect this correction in userspace? I really
 don't like when we're trying to be more smart than kernel.

 For example for setpriority() is kernel able to do the correction
 for prio argument when the argument is out of the expected range. For
 some reason sched_setscheduler() is not so smart and incorrect
 priority ends with error.

 IMHO is better to follow kernel for so low-level utils like chrt(1)
 than silently hide mistakes in usage. And the current code is also
 ready for possible future kernel changes -- implement extra
 corrections and policies in userspace means that one day you will in
 conflict with your kernel.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-17 11:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-06 20:47 chrt requires priority argument Phillip Susi
2014-02-17 11:52 ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox