All of lore.kernel.org
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@linux.intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	richard.purdie@linuxfoundation.org
Subject: Re: [PATCH 2/2] sched: allow users with rtprio rlimit to change from SCHED_IDLE policy
Date: Wed, 23 Feb 2011 07:52:34 -0800	[thread overview]
Message-ID: <4D652D42.4040801@linux.intel.com> (raw)
In-Reply-To: <1298459826.2217.363.camel@twins>

On 02/23/2011 03:17 AM, Peter Zijlstra 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.

So we need an OR test of RLIMIT_NICE | RLIMIT_RTPRIO ? The reason I keep 
coming back to RTPRIO is it allows the user to change to 
SCHED_(FIFO|RR), and from there they can change to anything they want - 
so why force two steps? Perhaps the argument is to keep the meaning of 
the RLIMITs precise, and if you want to go from IDLE->OTHER you had 
better properly set RLIMIT_NICE - maybe I just convinced myself.

Shall I respin the patch to reflect that?


-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel

  parent reply	other threads:[~2011-02-23 15:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-22 21:04 [PATCH 0/2] sched: SCHED_BATCH fixes Darren Hart
2011-02-22 21:04 ` [PATCH 1/2] sched: allow SCHED_BATCH to preempt SCHED_IDLE tasks Darren Hart
2011-02-23  4:20   ` Mike Galbraith
2011-02-23  5:31     ` Mike Galbraith
2011-02-23  5:33     ` Darren Hart
2011-03-04 11:49   ` [tip:sched/core] sched: Allow " tip-bot for Darren Hart
2011-02-22 21:04 ` [PATCH 2/2] sched: allow users with rtprio rlimit to change from SCHED_IDLE policy Darren Hart
2011-02-23 11:03   ` Peter Zijlstra
2011-02-23 11:13     ` Ingo Molnar
2011-02-23 11:17       ` Peter Zijlstra
2011-02-23 11:35         ` Ingo Molnar
2011-02-23 15:52         ` Darren Hart [this message]
2011-02-23 16:00           ` Peter Zijlstra
2011-02-23 16:07             ` Darren Hart
2011-02-23 21:28             ` Darren Hart
2011-02-24 11:49               ` Peter Zijlstra
2011-03-04 11:49               ` [tip:sched/core] sched: Allow users with sufficient RLIMIT_NICE " tip-bot for Darren Hart

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=4D652D42.4040801@linux.intel.com \
    --to=dvhart@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=richard.purdie@linuxfoundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.