All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Love <rml@tech9.net>
To: Wessel Dankers <wsl@fruit.eu.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Scheduler priorities
Date: 28 Mar 2002 02:29:34 -0500	[thread overview]
Message-ID: <1017300610.17515.229.camel@phantasy> (raw)
In-Reply-To: <20020328070855.GB514@fruit.eu.org>

On Thu, 2002-03-28 at 02:08, Wessel Dankers wrote:

> Well evidently it should be root-only, just like SCHED_RR and SCHED_FIFO.
> If the priority inversion issues are worked out this restriction could be
> removed. I remember discussing this problem with Rik van Riel.
> The kernel-preempt patch seems to be able to detect when a process holds a
> lock; perhaps the process scheduler can temporarily revert to SCHED_NORMAL
> when this is the case? Preferably with a large nice value.

The preempt-kernel patch does keep track of the lock count, but it does
not include semaphores and those are what we need to worry about.

I also don't think it is enough that SCHED_IDLE only be settable by
root.  Regardless of what permissions it takes to set the scheduling
class, a "SCHED_IDLE" task should never be capable of harming an RT
task.

One solution I have come across is checking whether the task is
returning to kernel or user mode and acting appropriately.  As needed,
the task can be scheduled as SCHED_NORMAL.  This situation could even be
special-cased like ptrace and not impact normal scheduling.  Perhaps
this is what Ingo had in mind ... I hope he is still interested and
presents some code.

I know all this because I tried to implement SCHED_IDLE about a year
ago.  There were arguments against every approach, and SCHED_IDLE will
never be accepted until they are all satisfied.  If we want it, it needs
to be done right.

	Robert Love


  reply	other threads:[~2002-03-28  7:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-26 11:41 Scheduler priorities Nuno Miguel Rodrigues
2002-03-26 17:55 ` Mike Fedyk
2002-03-27  9:41   ` Frank Schaefer
2002-03-27 13:06     ` Nuno Miguel Rodrigues
2002-03-27 13:41       ` Robert Love
2002-03-27 20:23         ` Wessel Dankers
2002-03-27 21:14           ` Robert Love
2002-03-28  7:08             ` Wessel Dankers
2002-03-28  7:29               ` Robert Love [this message]
2002-03-29 21:42                 ` Pavel Machek
2002-03-29 23:52                   ` Robert Love

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=1017300610.17515.229.camel@phantasy \
    --to=rml@tech9.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wsl@fruit.eu.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.