From: Karel Zak <kzak@redhat.com>
To: Phillip Susi <psusi@ubuntu.com>
Cc: util-linux@vger.kernel.org
Subject: Re: chrt requires priority argument
Date: Mon, 17 Feb 2014 12:52:38 +0100 [thread overview]
Message-ID: <20140217115238.GC2254@x2.net.home> (raw)
In-Reply-To: <52F3F4F1.5000007@ubuntu.com>
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
prev parent reply other threads:[~2014-02-17 11:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-06 20:47 chrt requires priority argument Phillip Susi
2014-02-17 11:52 ` Karel Zak [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140217115238.GC2254@x2.net.home \
--to=kzak@redhat.com \
--cc=psusi@ubuntu.com \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox