Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-28 Thread Jack O'Quin
Ingo Molnar <[EMAIL PROTECTED]> writes: > * Nick Piggin <[EMAIL PROTECTED]> wrote: > >> And finally, with rlimit support, is there any reason why lockup >> detection and correction can't go into userspace? Even RT throttling >> could probably be done in a userspace daemon. > > that is correct.

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-28 Thread Jack O'Quin
Ingo Molnar <[EMAIL PROTECTED]> writes: > * Nick Piggin <[EMAIL PROTECTED]> wrote: > >> But the important elements are lost. The standard provides a >> deterministic scheduling order, and a deterministic scheduling latency >> (of course this doesn't mean a great deal for Linux, but I think we're

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-28 Thread Ingo Molnar
* Nick Piggin <[EMAIL PROTECTED]> wrote: > And finally, with rlimit support, is there any reason why lockup > detection and correction can't go into userspace? Even RT throttling > could probably be done in a userspace daemon. that is correct. Jackd already has a watchdog thread, against

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-28 Thread Ingo Molnar
* Nick Piggin [EMAIL PROTECTED] wrote: And finally, with rlimit support, is there any reason why lockup detection and correction can't go into userspace? Even RT throttling could probably be done in a userspace daemon. that is correct. Jackd already has a watchdog thread, against lockups.

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-28 Thread Jack O'Quin
Ingo Molnar [EMAIL PROTECTED] writes: * Nick Piggin [EMAIL PROTECTED] wrote: But the important elements are lost. The standard provides a deterministic scheduling order, and a deterministic scheduling latency (of course this doesn't mean a great deal for Linux, but I think we're good enough

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-28 Thread Jack O'Quin
Ingo Molnar [EMAIL PROTECTED] writes: * Nick Piggin [EMAIL PROTECTED] wrote: And finally, with rlimit support, is there any reason why lockup detection and correction can't go into userspace? Even RT throttling could probably be done in a userspace daemon. that is correct. Jackd already

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-28 Thread Ingo Molnar
* Jack O'Quin [EMAIL PROTECTED] wrote: i'm wondering, couldnt Jackd solve this whole issue completely in user-space, via a simple setuid-root wrapper app that does nothing else but validates whether the user is in the 'jackd' group and then keeps a pipe open to to the real jackd process

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-28 Thread Jack O'Quin
Ingo Molnar [EMAIL PROTECTED] writes: * Jack O'Quin [EMAIL PROTECTED] wrote: i'm wondering, couldnt Jackd solve this whole issue completely in user-space, via a simple setuid-root wrapper app that does nothing else but validates whether the user is in the 'jackd' group and then keeps a

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-28 Thread Ingo Molnar
* Jack O'Quin [EMAIL PROTECTED] wrote: thus after a couple of years we'd end up with lots of desktop apps running as SCHED_FIFO, and latency would go down the drain again. I wonder how Mac OS X and Windows deal with this priority escalation problem? Is it real or only theoretical? no

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-28 Thread Mike Galbraith
At 03:01 AM 1/28/2005 -0600, Jack O'Quin wrote: Ingo Molnar [EMAIL PROTECTED] writes: * Jack O'Quin [EMAIL PROTECTED] wrote: i'm wondering, couldnt Jackd solve this whole issue completely in user-space, via a simple setuid-root wrapper app that does nothing else but validates whether the

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-28 Thread Peter Williams
Ingo Molnar wrote: * Jack O'Quin [EMAIL PROTECTED] wrote: i'm wondering, couldnt Jackd solve this whole issue completely in user-space, via a simple setuid-root wrapper app that does nothing else but validates whether the user is in the 'jackd' group and then keeps a pipe open to to the real

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-28 Thread Ingo Molnar
* Peter Williams [EMAIL PROTECTED] wrote: I think part of the problem here is that by comparing each tasks limit to the runqueue's usage rate (and to some extent using a relatively short decay period) you're creating the need for the limits to be quite large i.e. it has to be big enough to

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-28 Thread Lee Revell
On Fri, 2005-01-28 at 10:11 +0100, Ingo Molnar wrote: * Jack O'Quin [EMAIL PROTECTED] wrote: thus after a couple of years we'd end up with lots of desktop apps running as SCHED_FIFO, and latency would go down the drain again. I wonder how Mac OS X and Windows deal with this priority

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-28 Thread Jack O'Quin
Peter Williams [EMAIL PROTECTED] writes: If the average usage rate is estimated over longer periods it will be lower allowing lower limits to be used. Also if the task's own usage rate estimates are used to test the limits then the limit can be lower. If the default limits can be made

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-27 Thread Ingo Molnar
* Nick Piggin <[EMAIL PROTECTED]> wrote: > But the important elements are lost. The standard provides a > deterministic scheduling order, and a deterministic scheduling latency > (of course this doesn't mean a great deal for Linux, but I think we're > good enough for a lot of soft-rt

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-27 Thread Lee Revell
On Wed, 2005-01-26 at 23:15 -0600, Jack O'Quin wrote: > >> > And finally, with rlimit support, is there any reason why lockup > >> > detection and correction can't go into userspace? Even RT > >> > throttling could probably be done in a userspace daemon. > >> > >> It can. But, doing it in the

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-27 Thread Ingo Molnar
* Jack O'Quin <[EMAIL PROTECTED]> wrote: > Well, this extremely long discussion started with a request on behalf > of a large group of audio developers and users for a way to gain > realtime scheduling privileges without running as root. > > Several kernel developers felt that would be

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-27 Thread Ingo Molnar
* Ingo Molnar <[EMAIL PROTECTED]> wrote: > negative nice levels are a guaranteed way to monopolize the CPU. > SCHED_FIFO with throttling could at most be used to 'steal' CPU time > up to the threshold. Also, if a task 'runs away' in SCHED_FIFO mode it > will be efficiently throttled. While if

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-27 Thread Ingo Molnar
* Nick Piggin <[EMAIL PROTECTED]> wrote: > Well in the context of a multi user system, this really is a > privileged operation. Witness: a normal user isn't even allowed to > raise the nice priority of a normal task. Note that I think everyone > agrees here, but I'm just repeating the point.

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-27 Thread Ingo Molnar
* Nick Piggin [EMAIL PROTECTED] wrote: Well in the context of a multi user system, this really is a privileged operation. Witness: a normal user isn't even allowed to raise the nice priority of a normal task. Note that I think everyone agrees here, but I'm just repeating the point. i've

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-27 Thread Ingo Molnar
* Ingo Molnar [EMAIL PROTECTED] wrote: negative nice levels are a guaranteed way to monopolize the CPU. SCHED_FIFO with throttling could at most be used to 'steal' CPU time up to the threshold. Also, if a task 'runs away' in SCHED_FIFO mode it will be efficiently throttled. While if it

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-27 Thread Ingo Molnar
* Jack O'Quin [EMAIL PROTECTED] wrote: Well, this extremely long discussion started with a request on behalf of a large group of audio developers and users for a way to gain realtime scheduling privileges without running as root. Several kernel developers felt that would be unacceptable,

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-27 Thread Lee Revell
On Wed, 2005-01-26 at 23:15 -0600, Jack O'Quin wrote: And finally, with rlimit support, is there any reason why lockup detection and correction can't go into userspace? Even RT throttling could probably be done in a userspace daemon. It can. But, doing it in the kernel is more

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-27 Thread Ingo Molnar
* Nick Piggin [EMAIL PROTECTED] wrote: But the important elements are lost. The standard provides a deterministic scheduling order, and a deterministic scheduling latency (of course this doesn't mean a great deal for Linux, but I think we're good enough for a lot of soft-rt applications

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-26 Thread Nick Piggin
On Wed, 2005-01-26 at 23:15 -0600, Jack O'Quin wrote: > Nick Piggin <[EMAIL PROTECTED]> writes: > > > But the important elements are lost. The standard provides a > > deterministic scheduling order, and a deterministic scheduling > > latency > > Where does the standard actually say this? All

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-26 Thread Jack O'Quin
Nick Piggin <[EMAIL PROTECTED]> writes: > On Wed, 2005-01-26 at 20:31 -0600, Jack O'Quin wrote: >> Nick Piggin <[EMAIL PROTECTED]> writes: >> >> > I'm a bit concerned about this kind of policy and breakage of >> > userspace APIs going into the kernel. I mean, if an app is >> > succeeds in

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-26 Thread Nick Piggin
On Wed, 2005-01-26 at 20:31 -0600, Jack O'Quin wrote: > Nick Piggin <[EMAIL PROTECTED]> writes: > > > I'm a bit concerned about this kind of policy and breakage of > > userspace APIs going into the kernel. I mean, if an app is > > succeeds in gaining SCHED_FIFO / SCHED_RR scheduling, and the > >

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-26 Thread Jack O'Quin
Nick Piggin <[EMAIL PROTECTED]> writes: > I'm a bit concerned about this kind of policy and breakage of > userspace APIs going into the kernel. I mean, if an app is > succeeds in gaining SCHED_FIFO / SCHED_RR scheduling, and the > scheduler does something else, that could be undesirable in some >

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-26 Thread Jack O'Quin
Ingo Molnar <[EMAIL PROTECTED]> writes: > - exported the current RT-average value to /proc/stat (it's the last >field in the cpu lines) > e.g. the issue Con and others raised: privileged tasks. By default, the > root user will likely have a 0 rlimit, for compatibility. _But_ i can > easily

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-26 Thread Nick Piggin
On Wed, 2005-01-26 at 16:27 -0600, Jack O'Quin wrote: > Ingo Molnar <[EMAIL PROTECTED]> writes: > > > - exported the current RT-average value to /proc/stat (it's the last > >field in the cpu lines) > > > e.g. the issue Con and others raised: privileged tasks. By default, the > > root user

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-26 Thread Ingo Molnar
* Peter Williams <[EMAIL PROTECTED]> wrote: > As I understand this (and I may be wrong), the intention is that if a > task has its RT_CPU_RATIO rlimit set to a value greater than zero then > setting its scheduling policy to SCHED_RR or SCHED_FIFO is allowed. correct. > This causes me to ask

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-26 Thread Ingo Molnar
* Peter Williams [EMAIL PROTECTED] wrote: As I understand this (and I may be wrong), the intention is that if a task has its RT_CPU_RATIO rlimit set to a value greater than zero then setting its scheduling policy to SCHED_RR or SCHED_FIFO is allowed. correct. This causes me to ask the

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-26 Thread Nick Piggin
On Wed, 2005-01-26 at 16:27 -0600, Jack O'Quin wrote: Ingo Molnar [EMAIL PROTECTED] writes: - exported the current RT-average value to /proc/stat (it's the last field in the cpu lines) e.g. the issue Con and others raised: privileged tasks. By default, the root user will likely

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-26 Thread Jack O'Quin
Ingo Molnar [EMAIL PROTECTED] writes: - exported the current RT-average value to /proc/stat (it's the last field in the cpu lines) e.g. the issue Con and others raised: privileged tasks. By default, the root user will likely have a 0 rlimit, for compatibility. _But_ i can easily

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-26 Thread Jack O'Quin
Nick Piggin [EMAIL PROTECTED] writes: I'm a bit concerned about this kind of policy and breakage of userspace APIs going into the kernel. I mean, if an app is succeeds in gaining SCHED_FIFO / SCHED_RR scheduling, and the scheduler does something else, that could be undesirable in some

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-26 Thread Nick Piggin
On Wed, 2005-01-26 at 20:31 -0600, Jack O'Quin wrote: Nick Piggin [EMAIL PROTECTED] writes: I'm a bit concerned about this kind of policy and breakage of userspace APIs going into the kernel. I mean, if an app is succeeds in gaining SCHED_FIFO / SCHED_RR scheduling, and the scheduler

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-26 Thread Jack O'Quin
Nick Piggin [EMAIL PROTECTED] writes: On Wed, 2005-01-26 at 20:31 -0600, Jack O'Quin wrote: Nick Piggin [EMAIL PROTECTED] writes: I'm a bit concerned about this kind of policy and breakage of userspace APIs going into the kernel. I mean, if an app is succeeds in gaining SCHED_FIFO /

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-26 Thread Nick Piggin
On Wed, 2005-01-26 at 23:15 -0600, Jack O'Quin wrote: Nick Piggin [EMAIL PROTECTED] writes: But the important elements are lost. The standard provides a deterministic scheduling order, and a deterministic scheduling latency Where does the standard actually say this? All I found was

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-25 Thread Ingo Molnar
* Jack O'Quin <[EMAIL PROTECTED]> wrote: > > http://redhat.com/~mingo/rt-limit-patches/ > > > > i've removed the global sysctl and implemented a new rlimit, > > RT_CPU_RATIO: the maximum amount of CPU time RT tasks may use, in > > percent. For testing purposes it defaults to 80%. > > Small

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-25 Thread Jack O'Quin
Ingo Molnar <[EMAIL PROTECTED]> writes: > pretty much the only criticism of the RT-CPU patch was that the global > sysctl is too rigid and that it doesnt allow privileged tasks to ignore > the limit. I've uploaded a new RT-CPU-limit patch that solves this > problem: > >

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-25 Thread Peter Williams
Ingo Molnar wrote: pretty much the only criticism of the RT-CPU patch was that the global sysctl is too rigid and that it doesnt allow privileged tasks to ignore the limit. I've uploaded a new RT-CPU-limit patch that solves this problem: http://redhat.com/~mingo/rt-limit-patches/ i've removed

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-25 Thread Peter Williams
Peter Williams wrote: Ingo Molnar wrote: pretty much the only criticism of the RT-CPU patch was that the global sysctl is too rigid and that it doesnt allow privileged tasks to ignore the limit. I've uploaded a new RT-CPU-limit patch that solves this problem:

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-25 Thread Con Kolivas
Ingo Molnar wrote: pretty much the only criticism of the RT-CPU patch was that the global sysctl is too rigid and that it doesnt allow privileged tasks to ignore the limit. I've uploaded a new RT-CPU-limit patch that solves this problem: http://redhat.com/~mingo/rt-limit-patches/ i've removed

[patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-25 Thread Ingo Molnar
pretty much the only criticism of the RT-CPU patch was that the global sysctl is too rigid and that it doesnt allow privileged tasks to ignore the limit. I've uploaded a new RT-CPU-limit patch that solves this problem: http://redhat.com/~mingo/rt-limit-patches/ i've removed the global sysctl

[patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-25 Thread Ingo Molnar
pretty much the only criticism of the RT-CPU patch was that the global sysctl is too rigid and that it doesnt allow privileged tasks to ignore the limit. I've uploaded a new RT-CPU-limit patch that solves this problem: http://redhat.com/~mingo/rt-limit-patches/ i've removed the global sysctl

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-25 Thread Con Kolivas
Ingo Molnar wrote: pretty much the only criticism of the RT-CPU patch was that the global sysctl is too rigid and that it doesnt allow privileged tasks to ignore the limit. I've uploaded a new RT-CPU-limit patch that solves this problem: http://redhat.com/~mingo/rt-limit-patches/ i've removed

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-25 Thread Peter Williams
Peter Williams wrote: Ingo Molnar wrote: pretty much the only criticism of the RT-CPU patch was that the global sysctl is too rigid and that it doesnt allow privileged tasks to ignore the limit. I've uploaded a new RT-CPU-limit patch that solves this problem:

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-25 Thread Peter Williams
Ingo Molnar wrote: pretty much the only criticism of the RT-CPU patch was that the global sysctl is too rigid and that it doesnt allow privileged tasks to ignore the limit. I've uploaded a new RT-CPU-limit patch that solves this problem: http://redhat.com/~mingo/rt-limit-patches/ i've removed

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-25 Thread Jack O'Quin
Ingo Molnar [EMAIL PROTECTED] writes: pretty much the only criticism of the RT-CPU patch was that the global sysctl is too rigid and that it doesnt allow privileged tasks to ignore the limit. I've uploaded a new RT-CPU-limit patch that solves this problem:

Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

2005-01-25 Thread Ingo Molnar
* Jack O'Quin [EMAIL PROTECTED] wrote: http://redhat.com/~mingo/rt-limit-patches/ i've removed the global sysctl and implemented a new rlimit, RT_CPU_RATIO: the maximum amount of CPU time RT tasks may use, in percent. For testing purposes it defaults to 80%. Small terminology

<    1   2