linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Easton <s3159795@student.anu.edu.au>
To: linux-kernel@vger.kernel.org
Cc: riel@conectiva.com.br
Subject: Re: Scheduling of low-priority background processes
Date: Tue, 6 Nov 2001 19:07:57 +1100	[thread overview]
Message-ID: <20011106190757.A28090@beernut.flames.org.au> (raw)
In-Reply-To: <Pine.LNX.4.33L.0111052256170.2963-100000@imladris.surriel.com>

> > On those systems, you could assign a scheduling priority lower than 
> > the one nomally used by interactive processes to CPU-hogging, 
> > numbercrunching tasks. These tasks would then use up any CPU time left 
> > over by interactive processes without otherwise interfering with them. 
> > I always found this feature very useful (think of SETI@home!). 
>
>
> > But that idea is so obvious, and since nobody did it so far, I am 
> > probably missing something. What is it? 
>
>
> Priority inversion. I did a patch which does exactly 
> what you describe, around the 2.1 timeframe. It worked 
> fine most of the time, but occasionally the following 
> happened: 
>
>
> 1) a SCHED_IDLE process got hold of some kernel lock 
> 2) a normal, low-priority process started eating CPU 
>    for a number of seconds 
> 3) a high-priority normal process wanted the lock the 
>    SCHED_IDLE task had, but had to wait several seconds, 
>    at times up to a minute, before the SCHED_IDLE task 
>    got a chance to run and release the lock 
>
>
> This wasn't too much of a problem on my own system, but 
> of course this is an easily exploitable vulnerability for 
> attackers. 
>
>
> For me, this just means we should improve the scheduler so 
> nice levels are stronger ... say that a nice +20 process 
> only gets 1% of the CPU of a normal priority process ;) 
>

What if the SCHED_IDLE behaviour only applies when the process
is in userspace?  Couldn't scheduler compare the process's
instruction pointer against the kernel/user break point, and
if the process is in the kernel, then just treat it like a
normal process?

>
> regards, 
>
>
> Rik 


  reply	other threads:[~2001-11-06  8:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-05 20:53 Scheduling of low-priority background processes Thomas Koeller
2001-11-05 21:08 ` Rik van Riel
2001-11-05 21:12   ` Thomas Koeller
2001-11-06  1:03 ` Rik van Riel
2001-11-06  8:07   ` Kevin Easton [this message]
2001-11-06  9:22     ` Kevin Easton
2001-11-08 12:39       ` Pavel Machek
2001-11-09 17:39       ` Richard Gooch
     [not found] <Pine.LNX.4.10.10111051722590.13543-100000@coffee.psychology.mcmaster.ca>
2001-11-05 23:30 ` Thomas Koeller

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=20011106190757.A28090@beernut.flames.org.au \
    --to=s3159795@student.anu.edu.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riel@conectiva.com.br \
    /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;
as well as URLs for NNTP newsgroup(s).