All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Williams <pwil3058@bigpond.net.au>
To: Con Kolivas <kernel@kolivas.org>
Cc: Andrew Morton <akpm@osdl.org>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] sched: Add SCHED_BGND (background) scheduling policy
Date: Wed, 05 Jul 2006 10:49:38 +1000	[thread overview]
Message-ID: <44AB0CA2.5080908@bigpond.net.au> (raw)
In-Reply-To: <200607051014.48089.kernel@kolivas.org>

Con Kolivas wrote:
> On Wednesday 05 July 2006 09:35, Peter Williams wrote:
>> Problem:
>>
>> There is a genuine need for the ability to put tasks in the background
>> (a la the SCHED_IDLEPRIO policy in Con Kolivas's -sc kernels) as is
>> evidenced by comments in LKML re a desire for SCHED_BATCH tasks
>> to run completely in the background.
>>
>> Solution:
>>
>> Of course, one option would have been to just modify SCHED_BATCH so
>> that tasks with that policy run completely in the background but there is a
>> genuine need for a non background batch policy so the solution adopted
>> is to implementa a new policy SCHED_BGND.
>>
>> SCHED_BATCH means that it's a normal process and should get a fair
>> share of the CPU in accordance with its "nice" setting but it is NOT an
>> interactive task and should NOT receive any of the special treatment
>> that a task that is adjudged to be interactive receives.  In particular,
>> it should always be moved to the expired array at the end of its time
>> slice as to do otherwise might result in CPU starvation for other tasks.
>>
>> SCHED_BGND means it's totally unimportant and should only be given the
>> CPU if no one else wants it OR if not giving it the CPU could lead to
>> priority inversion or starvation of other tasks due to this tasks holding
>> system resources.
> 
> Could we just call it SCHED_IDLEPRIO since it's the same thing and there are 
> tools out there that already use this name?
> 

I'm easy.  Which user space visible headers contain the definition? 
That's the only place that it matters.  When I was writing a program to 
use this feature, I couldn't find a header that defined any of the 
scheduler policies that was visible in user space (of course, that 
doesn't mean there isn't one - just that I couldn't find it).

Peter
PS Any programs that use SCHED_IDLEPRIO should work as long as its value 
is defined as 4.
-- 
Peter Williams                                   pwil3058@bigpond.net.au

"Learning, n. The kind of ignorance distinguishing the studious."
  -- Ambrose Bierce

  reply	other threads:[~2006-07-05  0:49 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-04 23:35 [PATCH] sched: Add SCHED_BGND (background) scheduling policy Peter Williams
2006-07-05  0:14 ` Con Kolivas
2006-07-05  0:49   ` Peter Williams [this message]
2006-07-05  0:52     ` Con Kolivas
2006-07-05  8:05     ` Andreas Mohr
2006-07-05 14:04       ` Jan Engelhardt
2006-07-05  0:44 ` Con Kolivas
2006-07-05  1:15   ` Peter Williams
2006-07-05  1:33     ` Con Kolivas
2006-07-05  4:20       ` Valdis.Kletnieks
2006-07-05  3:06   ` Peter Williams
2006-07-05  6:35 ` Ingo Molnar
2006-07-05  8:03   ` Peter Williams
2006-07-05  8:15     ` Arjan van de Ven
2006-07-05  8:19     ` Ingo Molnar
2006-07-05 17:40       ` Nick Piggin
2006-07-05 11:42 ` Mike Galbraith
2006-07-05 13:59   ` Peter Williams
2006-07-05 14:18     ` Peter Williams
2006-07-05 14:48     ` Mike Galbraith
2006-07-06 23:50       ` Peter Williams

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=44AB0CA2.5080908@bigpond.net.au \
    --to=pwil3058@bigpond.net.au \
    --cc=akpm@osdl.org \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nickpiggin@yahoo.com.au \
    /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.