public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	linux-kernel@vger.kernel.org,
	Stefani Seibold <stefani@seibold.net>,
	Dario Faggioli <raistlin@linux.it>,
	Max Krasnyansky <maxk@qualcomm.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH 6/6] sched: disabled rt-bandwidth by default
Date: Wed, 20 Aug 2008 21:56:04 +1000	[thread overview]
Message-ID: <200808202156.05024.nickpiggin@yahoo.com.au> (raw)
In-Reply-To: <20080819125954.GA20210@elte.hu>

On Tuesday 19 August 2008 22:59, Ingo Molnar wrote:
> * Nick Piggin <nickpiggin@yahoo.com.au> wrote:
> > [...] Let's retain our API specifications and backwards compatibilty
> > by default. [...]
>
> I agree with you that the 1 second default was a bit too tight - and we
> should definitely change that (and it's changed already).

I do not agree that it is too tight, it is just plain wrong.


> So changing the "allow RT tasks up to 10 seconds uninterrupted CPU
> monopolization" is OK to me - it still keeps runaway CPU loops (which
> are in the vast majority) debuggable, while allowing common-sense RT
> task usage.


RT tasks have always been debuggable by using a simple watchdog thread.
As I said before, someone who develops a non-trivial RT app without a
watchdog thread or isolated CPU basically doesn't deserve the honour of
us breaking our API to cater for their idiocity.

But even for those people, we now have the sysrq trigger too. And also
we'll still have the rt throttle sysctl that can be changed at runtime.

There are so many options... "oh but maybe they didn't research the
options either so let's break our APIs instead" is not common sense
IMO.


> But changing that back to the other extreme: "allow lockups by default"
> is unreasonable IMO - especially in the face of rtlimit that allows
> unprivileged tasks to gain RT privileges.

No, it's not "allow lockups by default". It is "follow the API and
backwards compatibility by default".

If some distro has gone and given all users RTPRIO rlimit by default
and allowed unprivileged users to lock up the system, it is not the
problem of the upstream kernel. That distro can set the rt throttle
default if it wants to. Or provide a watchdog thread for debugging
RT tasks.


> As an experiment try running a 100% CPU using SCHED_FIFO:99 RT task. It
> does not result in a usable Linux system - it interacts with too many
> normal system activities. It is a very, very special mode of operation
> and anyone using Linux in such a way has to take precautions and has to
> tune things specially anyway. (has to turn off the softlockup watchdog,
> has to make sure IO requests do not time out artificially, etc.) You
> wont even get normal keyboard or console behavior in most cases.

This is exactly what *real* RT app/system developers do. I'm not
talking about an untuned desktop system!!


> Furthermore, if by "API specifications" you mean POSIX - to get a
> conformant POSIX run one has to change a lot of things on a typical
> Linux system anyway. APIs and utilities have to be crippled to be "POSIX
> compliant".

By that argument we can break any userspace API for any reason.


> In other words: we use common sense when thinking about specifications.
> The kernel's defaults are about being reasonable by default.

It's not common sense to change this. It would be perfectly valid to
engineer a realtime process that uses a peak of say 90% of the CPU with
a 10% margin for safety and other services. Now they only have 5%.

Or a realtime app could definitely use the CPU adaptively up to 100% but
still unable to tolerate an unexpected preemption.

I don't know how you can change this so significantly and be so sure of
yourself that you won't break anything (actually you already have one
reported breakage in this thread).


> I have no _strong_ feelings about it, but i dont see the practical value
> in going beyond 10 seconds - as it turns a rather useful robustness
> feature off by default (and keeps it untested, etc.).

I feel strongly about it.

The primary issue is that we have broken the API from both specification
and previous implementation, the answer is yes. That *you* can't see any
reason to use the API in that way kind of pales in comparison with all
due respect. Especially as you already got a counter example of someone's
app that broke.

  parent reply	other threads:[~2008-08-20 11:56 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-19 10:33 [PATCH 0/6] sched: rt-bandwidth fixes Peter Zijlstra
2008-08-19 10:33 ` [PATCH 1/6] sched: rt-bandwidth for user grouping interface Peter Zijlstra
2008-08-19 10:33 ` [PATCH 2/6] sched: rt-bandwidth accounting fix Peter Zijlstra
2008-08-19 18:33   ` Max Krasnyansky
2008-08-19 18:38     ` Peter Zijlstra
2008-08-19 10:33 ` [PATCH 3/6] sched: rt-bandwidth group disable fixes Peter Zijlstra
2008-08-19 10:33 ` [PATCH 4/6] sched: extract walk_tg_tree() Peter Zijlstra
2008-08-19 10:33 ` [PATCH 5/6] sched: rt-bandwidth fixes Peter Zijlstra
2008-08-19 10:33 ` [PATCH 6/6] sched: disabled rt-bandwidth by default Peter Zijlstra
2008-08-19 11:05   ` Ingo Molnar
2008-08-19 11:11     ` Ingo Molnar
2008-08-19 11:42       ` [PATCH] sched: extract walk_tg_tree(), fix Ingo Molnar
2008-08-19 11:17     ` [PATCH 6/6] sched: disabled rt-bandwidth by default Nick Piggin
2008-08-19 12:59       ` Ingo Molnar
2008-08-19 18:15         ` Max Krasnyansky
2008-08-20 11:56         ` Nick Piggin [this message]
2008-08-26  9:00           ` Nick Piggin
2008-08-26  9:30             ` Ingo Molnar
2008-08-26  9:44               ` Nick Piggin
2008-08-26 10:29                 ` Ingo Molnar
2008-08-26 11:03                   ` Nick Piggin
2008-08-26  9:54               ` Nick Piggin
2008-08-26 11:09                 ` Thomas Gleixner
2008-08-26 11:27                   ` Nick Piggin
2008-08-26 12:50                     ` Theodore Tso
2008-08-26 13:31                       ` Stefani Seibold
2008-08-26 17:55                         ` Theodore Tso
2008-08-26 21:37                     ` Thomas Gleixner
2008-08-26 22:49                       ` Andi Kleen
2008-08-27 10:08                         ` Nick Piggin
2008-08-28 10:54                           ` Ingo Molnar
2008-08-28 11:09                             ` Andi Kleen
2008-08-28 11:19                               ` Peter Zijlstra
2008-08-28 11:28                                 ` Ingo Molnar
2008-08-28 11:50                                 ` Andi Kleen
2008-08-28 12:00                                   ` Peter Zijlstra
2008-08-28 12:14                                     ` Andi Kleen
2008-08-28 12:18                                       ` Nick Piggin
2008-08-28 16:19                                   ` Max Krasnyansky
2008-08-28 16:25                                     ` Ingo Molnar
2008-08-28 16:33                                       ` Andi Kleen
2008-08-28 12:03                             ` Nick Piggin
2008-08-28 13:07                               ` Ingo Molnar
2008-08-28 13:45                                 ` Nick Piggin
2008-08-28 12:29                             ` Nick Piggin
2008-08-27 10:04                       ` Nick Piggin
2008-08-26 13:47                   ` Mark Hounschell
2008-08-26 23:00                     ` Steven Rostedt
2008-08-27 18:55                       ` Chris Friesen
2008-08-28 14:15     ` Steven Rostedt
2008-08-28 14:30       ` Ingo Molnar
2008-08-28 14:36         ` Nick Piggin
2008-08-28 15:12           ` Steven Rostedt
2008-08-28 15:34             ` Nick Piggin
2008-08-28 15:50               ` Steven Rostedt
2008-08-28 17:26                 ` Linus Torvalds
2008-08-28 18:04                   ` Steven Rostedt
2008-08-28 18:10                     ` Darren Hart
2008-08-28 18:16                   ` Mark Hounschell
2008-08-28 18:42                     ` Linus Torvalds
2008-08-28 18:53                       ` Steven Rostedt
2008-08-29  7:56                         ` Mike Galbraith
2008-08-29  8:06                           ` Peter Zijlstra
2008-08-29  8:47                             ` Mike Galbraith
2008-08-28 19:39                       ` Stefani Seibold
2008-08-28 20:53                       ` Alan Cox
2008-08-30  6:33                   ` Nick Piggin
2008-08-28 16:33           ` Max Krasnyansky
2008-08-28 17:22             ` John Kacur
2008-08-28 16:05       ` Peter Zijlstra
2008-08-28 16:15         ` Steven Rostedt
2008-08-28 16:29           ` Peter Zijlstra

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=200808202156.05024.nickpiggin@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxk@qualcomm.com \
    --cc=mingo@elte.hu \
    --cc=raistlin@linux.it \
    --cc=stefani@seibold.net \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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