[prev in list] [next in list] [prev in thread] [next in thread] 

List:       util-linux-ng
Subject:    Re: chrt requires priority argument
From:       Karel Zak <kzak () redhat ! com>
Date:       2014-02-17 11:52:38
Message-ID: 20140217115238.GC2254 () x2 ! net ! home
[Download RAW message or body]

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
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic