lkml.org 
[lkml]   [2011]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] sched: allow users with rtprio rlimit to change from SCHED_IDLE policy

* Peter Zijlstra <peterz@infradead.org> wrote:

> On Wed, 2011-02-23 at 12:13 +0100, Ingo Molnar wrote:
> > * Peter Zijlstra <peterz@infradead.org> wrote:
> >
> > > On Tue, 2011-02-22 at 13:04 -0800, Darren Hart wrote:
> > > > As it stands, users with rtprio rlimit permissions can change their policy from
> > > > SCHED_OTHER to SCHED_FIFO and back. They can change to SCHED_IDLE, but not back
> > > > to SCHED_FIFO. If they have the rtprio permission, they should be able to. Once
> > > > in SCHED_FIFO, they could go back to SCHED_OTHER. This patch allows users with
> > > > rtprio permission to change out of SCHED_IDLE.
> > > >
> > >
> > > Ingo, can you remember the rationale for this?
> > >
> > > The fact is that SCHED_IDLE is very near nice-20, and we can do:
> > >
> > > peterz@twins:~$ renice 5 -p $$
> > > 1867: old priority 0, new priority 5
> > > peterz@twins:~$ renice 0 -p $$
> > > 1867: old priority 5, new priority 0
> > >
> > > Which would suggest that we should be able to return to SCHED_OTHER
> > > RLIMIT_NICE-20.
> >
> > I dont remember anything subtle there - most likely we just forgot about that spot
> > when adding RLIMIT_RTPRIO support.
>
> Ah, I was arguing we should allow it regardless of RLIMIT_RTPRIO, based on
> RLIMIT_NICE, it is after all a change to SCHED_OTHER, not SCHED_FIFO/RR.

Sure. We just went for the most restrictive conditions - it's hard to add security
holes that way ;-)

Ingo


\
 
 \ /
  Last update: 2011-02-23 12:37    [W:0.073 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site