From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Martin Steigerwald <ms@teamix.de>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>
Subject: Re: documentation about scheduling policies
Date: Mon, 22 Sep 2008 18:18:55 +0200 [thread overview]
Message-ID: <1222100335.16700.46.camel@lappy.programming.kicks-ass.net> (raw)
In-Reply-To: <200809221729.06870.ms@teamix.de>
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.
prev parent reply other threads:[~2008-09-22 16:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-22 15:29 documentation about scheduling policies Martin Steigerwald
2008-09-22 16:18 ` Peter Zijlstra [this message]
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=1222100335.16700.46.camel@lappy.programming.kicks-ass.net \
--to=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=ms@teamix.de \
/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