Re: SCHED_FIFO and SCHED_RR broken by cfs



On Mon, 2008-08-18 at 20:58 +1000, Nick Piggin wrote:
On Monday 18 August 2008 20:50, Peter Zijlstra wrote:
On Sun, 2008-08-17 at 23:04 +1000, Nick Piggin wrote:
On Sunday 17 August 2008 00:53, Peter Zijlstra wrote:
Has nothing to do with CFS, but everything to do with the fact that we
now have a 95% bandwidth control by default.

Does doing:

echo -1 > /proc/sys/kernel/sched_rt_runtime_us

fix it?

So, up to 95% cpu usage (per sched_rt_period_us) FIFO and RR behave
like they always did, once they cross that line, they'll be throttled.

95% seemed like a sane default in that it leaves a little room to
recover from a run-away rt process (esp handy now that !root users can
also use RT scheduling classes), and should be enough for most
applications as they usually don't consume all that much time.

Did it seem sane to break POSIX and backwards compatiblity by default?

Up to a point, yes.

There were quite a few complaints that runaway RT tasks could render a
machine unusable - which made 'desktop' usage of the RT class unsafe.

Right, but it is restricted to root, and if the task is run as root
then it can equally break the system in any number of ways. So the
complaints are just wrong.

Not so, we have RLIMIT_RTPRIO and quite a few people using it.

I have no problems with having some non-default mode to throttle by
default. And we already have the sysrq which can downgrade RT tasks.

Yeah - except that most distros disable sysrq and not a single desktop
user knows about it.

This 95%/1s default allows most RT tasks to run without having to tinker
with the settings, and for those who do need something else, they can
get it too, but will have to turn a knob.

And that could also easily cause huge problems for code that does the
*right* thing.


But I guess we could change the default back to unlimited and default to
unsafe if people feel strongly about this.

Yes, you can't just break the API like this. Please do fix.

Sigh - I guess that means all distros will just set a limit in their
init scripts - leaving those above in the same situation.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: SCHED_FIFO and SCHED_RR broken by cfs
    ... up to 95% cpu usage FIFO and RR behave ... machine unusable - which made 'desktop' usage of the RT class unsafe. ... Right, but it is restricted to root, and if the task is run as root ... Please do fix. ...
    (Linux-Kernel)
  • Re: k3b permissions problems in SuSE9.2 pro
    ... >>1) CD record does not run with root privileges ... >>It says to run K3bSetup to fix the problems. ... that's not the first time these kinds of user permission ...
    (alt.os.linux.suse)
  • Re: Dug myself into several deep holes
    ... > Over several months I have tried to fix sound, mail, X ... as root, force yourself to use sudo for things, and ask yourself three times ... learn to make backups of your system. ... Hardware/disk failure is ...
    (Debian-User)
  • Re: I messed up some config files, now all my users have lost sudo priv :(
    ... way I can fix it until I get to work and reboot in recovery mode. ... because the server is an essential web and svn server for the company - ... The first thing you have to do is to become root. ... The only stupid question is the one you don't ask ...
    (Ubuntu)
  • Re: mail confusion
    ... Then you just have to supply a usable 'From: ' header on the message ... as it is sent or have sendmail fix it on the way out. ... > However, if I send the message from the root account, it gets rejected ... which says to change the From: header if it matches the local host ...
    (Fedora)

Loading