public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* documentation about scheduling policies
@ 2008-09-22 15:29 Martin Steigerwald
  2008-09-22 16:18 ` Peter Zijlstra
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Steigerwald @ 2008-09-22 15:29 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar

[-- Attachment #1: Type: text/plain, Size: 1514 bytes --]


Please CC to me as I am not subscribed to linux-kernel.


Hi!

I wonder about scheduling policies in CFS. I find these:

ms@mango> grep "case SCHED_" sched.c sched_fair.c | sort | uniq 
~/lokal/Kernel/linux-2.6.26/kernel
sched.c:        case SCHED_BATCH:
sched.c:        case SCHED_FIFO:
sched.c:        case SCHED_IDLE:
sched.c:        case SCHED_NORMAL:
sched.c:        case SCHED_RR:

sched_fair.c seems to differentiate SCHED_PATCH only:

ms@mango> egrep "(SCHED_I|SCHED_B)" sched_fair.c                       
~/lokal/Kernel/linux-2.6.26/kernel
 * Completely Fair Scheduling (CFS) Class (SCHED_NORMAL/SCHED_BATCH)
        if (likely(!sysctl_sched_compat_yield) && curr->policy != SCHED_BATCH) 
{
        if (unlikely(p->policy == SCHED_BATCH))


The documentation on scheduling policies in Documentation/scheduler appears 
rather scarse to me.

The wikipage at

http://ck.wikia.com/wiki/SchedulingPolicies

has more hints. But I wonder whether they are up to date and also they partly 
related to RSDL/SD features.

What about SCHED_IDLEPRIO anyway - the description of it makes it appear quite 
useful to me? Is it SCHED_IDLE in the new scheduler? Hmm, it does not appear 
that chrt can set this scheduling priority as of util-linux-ng 2.13.1.1.

I am willing to create documentation patches provided someone explains these 
to me ;-).

Ciao,
-- 
Martin Steigerwald - team(ix) GmbH - http://www.teamix.de
gpg: 19E3 8D42 896F D004 08AC A0CA 1E10 C593 0399 AE90

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: documentation about scheduling policies
  2008-09-22 15:29 documentation about scheduling policies Martin Steigerwald
@ 2008-09-22 16:18 ` Peter Zijlstra
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Zijlstra @ 2008-09-22 16:18 UTC (permalink / raw)
  To: Martin Steigerwald; +Cc: linux-kernel, Ingo Molnar

On Mon, 2008-09-22 at 17:29 +0200, Martin Steigerwald wrote:
> Please CC to me as I am not subscribed to linux-kernel.
> 
> 
> Hi!
> 
> I wonder about scheduling policies in CFS. I find these:
> 
> ms@mango> grep "case SCHED_" sched.c sched_fair.c | sort | uniq 
> ~/lokal/Kernel/linux-2.6.26/kernel
> sched.c:        case SCHED_BATCH:
> sched.c:        case SCHED_FIFO:
> sched.c:        case SCHED_IDLE:
> sched.c:        case SCHED_NORMAL:
> sched.c:        case SCHED_RR:
> 
> sched_fair.c seems to differentiate SCHED_PATCH only:
> 
> ms@mango> egrep "(SCHED_I|SCHED_B)" sched_fair.c                       
> ~/lokal/Kernel/linux-2.6.26/kernel
>  * Completely Fair Scheduling (CFS) Class (SCHED_NORMAL/SCHED_BATCH)
>         if (likely(!sysctl_sched_compat_yield) && curr->policy != SCHED_BATCH) 
> {
>         if (unlikely(p->policy == SCHED_BATCH))
> 
> 
> The documentation on scheduling policies in Documentation/scheduler appears 
> rather scarse to me.

> I am willing to create documentation patches provided someone explains these 
> to me ;-).

SCHED_NORMAL (traditionally called SCHED_OTHER)
SCHED_BATCH
SCHED_IDLE

are all implemented in sched_fair.c which constitute a proportional fair
scheduler.

SCHED_BATCH differentiates itself by not preempting nearly as often as
regular tasks would, thereby allowing tasks to run longer and make
better use of caches but at the cost of interactivity.

SCHED_IDLE is basically an even weaker nice 19, its not a true idle time
scheduler because we can easily get into priority inversion problems
with that which would deadlock the machine.

SCHED_FIFO/_RR are implemented in sched_rt.c and are as specified by
POSIX.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-22 16:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-22 15:29 documentation about scheduling policies Martin Steigerwald
2008-09-22 16:18 ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox