* [PATCH] CFS scheduler: documentation about scheduling policies
@ 2008-09-23 9:01 Martin Steigerwald
2008-09-23 9:11 ` Ingo Molnar
0 siblings, 1 reply; 9+ messages in thread
From: Martin Steigerwald @ 2008-09-23 9:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar, Peter Zijlstra
[-- Attachment #1: Type: text/plain, Size: 1648 bytes --]
The documentation about the CFS scheduler is scarse when it comes to
scheduling policies. This patch adds a chapter about the scheduling policies
it supports. Peter Zijlstra provided most of the information for it in
http://marc.info/?l=linux-kernel&m=122210038326356&w=2
This patch is based on 2.6.27-rc7.
Signed-off-by: Martin Steigerwald <ms@teamix.de>
---
--- sched-design-CFS.txt-2.6.27-rc7 2008-07-13 23:51:29.000000000 +0200
+++ sched-design-CFS.txt 2008-09-23 10:33:01.107393509 +0200
@@ -118,6 +118,29 @@ Some implementation details:
quite a bit simpler as a result.
+Supported scheduling policies
+=============================
+
+CFS implements three scheduling policies:
+
+ - SCHED_NORMAL (traditionally called SCHED_OTHER): The scheduling
+ policy that is used for regular tasks.
+
+ - SCHED_BATCH: Does not preempt 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. This is well suited for
+ batch jobs.
+
+ - SCHED_IDLE: This is even weaker than nice 19, but its not a true
+ idle timer scheduler in order to avoid to get into priority
+ inversion problems which would deadlock the machine.
+
+SCHED_FIFO/_RR are implemented in sched_rt.c and are as specified by
+POSIX.
+
+The command chrt from util-linux-ng 2.13.1.1 can set all of these except
+SCHED_IDLE.
+
Group scheduler extension to CFS
================================
--
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] 9+ messages in thread* Re: [PATCH] CFS scheduler: documentation about scheduling policies
2008-09-23 9:01 [PATCH] CFS scheduler: documentation about scheduling policies Martin Steigerwald
@ 2008-09-23 9:11 ` Ingo Molnar
2008-09-23 9:53 ` Martin Steigerwald
2008-09-23 11:48 ` Martin Steigerwald
0 siblings, 2 replies; 9+ messages in thread
From: Ingo Molnar @ 2008-09-23 9:11 UTC (permalink / raw)
To: Martin Steigerwald; +Cc: linux-kernel, Peter Zijlstra
* Martin Steigerwald <ms@teamix.de> wrote:
> The documentation about the CFS scheduler is scarse when it comes to
> scheduling policies. This patch adds a chapter about the scheduling policies
> it supports. Peter Zijlstra provided most of the information for it in
>
> http://marc.info/?l=linux-kernel&m=122210038326356&w=2
>
> This patch is based on 2.6.27-rc7.
>
> Signed-off-by: Martin Steigerwald <ms@teamix.de>
looks good to me - but could you please do the patch against the latest
scheduler tree, which has already updated this file (and which made your
patch not apply cleanly):
http://people.redhat.com/mingo/tip.git/README
also:
> --- sched-design-CFS.txt-2.6.27-rc7 2008-07-13 23:51:29.000000000 +0200
> +++ sched-design-CFS.txt 2008-09-23 10:33:01.107393509 +0200
please use -p1 to create patches - or since you've just set up the
tip/master tracking, do something like:
<modify Documentation/scheduler/sched-design-CFS.txt>
git-commit Documentation/scheduler/sched-design-CFS.txt
<add commit log>
and then export the commit you just created for use in emailing, via:
git log --pretty=email --stat -1 -p > mail.txt
Ingo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] CFS scheduler: documentation about scheduling policies
2008-09-23 9:11 ` Ingo Molnar
@ 2008-09-23 9:53 ` Martin Steigerwald
2008-09-23 10:14 ` Ingo Molnar
2008-09-23 11:48 ` Martin Steigerwald
1 sibling, 1 reply; 9+ messages in thread
From: Martin Steigerwald @ 2008-09-23 9:53 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel, Peter Zijlstra
[-- Attachment #1: Type: text/plain, Size: 1091 bytes --]
Am Dienstag, 23. September 2008 schrieb Ingo Molnar:
> * Martin Steigerwald <ms@teamix.de> wrote:
> > The documentation about the CFS scheduler is scarse when it comes to
> > scheduling policies. This patch adds a chapter about the scheduling
> > policies it supports. Peter Zijlstra provided most of the information for
> > it in
> >
> > http://marc.info/?l=linux-kernel&m=122210038326356&w=2
> >
> > This patch is based on 2.6.27-rc7.
> >
> > Signed-off-by: Martin Steigerwald <ms@teamix.de>
>
> looks good to me - but could you please do the patch against the latest
> scheduler tree, which has already updated this file (and which made your
> patch not apply cleanly):
>
> http://people.redhat.com/mingo/tip.git/README
Should I use
checkout -b tip-latest tip/master
as described in the README or tip/sched/devel or even something else?
I am new to git. I know Bazaar quite well however, so I am not compeltely new
to DVCS.
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] 9+ messages in thread
* Re: [PATCH] CFS scheduler: documentation about scheduling policies
2008-09-23 9:53 ` Martin Steigerwald
@ 2008-09-23 10:14 ` Ingo Molnar
0 siblings, 0 replies; 9+ messages in thread
From: Ingo Molnar @ 2008-09-23 10:14 UTC (permalink / raw)
To: Martin Steigerwald
Cc: linux-kernel, Peter Zijlstra, Thomas Gleixner, H. Peter Anvin
* Martin Steigerwald <ms@teamix.de> wrote:
> Am Dienstag, 23. September 2008 schrieb Ingo Molnar:
> > * Martin Steigerwald <ms@teamix.de> wrote:
> > > The documentation about the CFS scheduler is scarse when it comes to
> > > scheduling policies. This patch adds a chapter about the scheduling
> > > policies it supports. Peter Zijlstra provided most of the information for
> > > it in
> > >
> > > http://marc.info/?l=linux-kernel&m=122210038326356&w=2
> > >
> > > This patch is based on 2.6.27-rc7.
> > >
> > > Signed-off-by: Martin Steigerwald <ms@teamix.de>
> >
> > looks good to me - but could you please do the patch against the latest
> > scheduler tree, which has already updated this file (and which made your
> > patch not apply cleanly):
> >
> > http://people.redhat.com/mingo/tip.git/README
>
> Should I use
>
> checkout -b tip-latest tip/master
>
> as described in the README or tip/sched/devel or even something else?
tip/master should be fine - it has sched/devel integrated. I'll sort out
any cross-topic impact.
> I am new to git. I know Bazaar quite well however, so I am not
> compeltely new to DVCS.
the -tip tree, maintained by Thomas Gleixner, H. Peter Anvin and myself
is a "forest of trees" based on Linus's very latest -git tree. Currently
it's a collection of more than 180 topic trees. Most topic trees are
based on upstream -git, some topic trees are based on each other and
tip/master has them all integrated together.
there are a few main themes within -tip: tip/x86/* are all the currently
active x86 topics - all changes that are for v2.6.28. tip/sched/* are
the pending scheduler changes. tip/timers/* are timer changes,
tip/tracing/* are tracing patches, etc.
Unless you are a high-volume patch submitter or a maintainer of a given
topic tree it's not necessary for you to know/follow/interpret the
internal structure of -tip - you can send patches against tip/master and
we'll sort the patch out into the right topic branch. (and resolve
conflicts, if any)
Generally tip/master is not supposed to break in any way anytime: it
must build and boot on all hardware, no ifs and when. So it's not a
development tree in the classic sense, i.e. temporary breakages and
user-visible transition periods are not accepted. We do a lot of
automated testing against tip/master so it should be fine for daily
desktop use and daily development work. I use latest tip/master on about
7 x86 boxes at the moment.
The individual topic trees are development trees, and might contain bugs
at times - but we filter those out and only represent/merge a
known-stable version of each sub-tree in tip/master.
At least that's the theory - it's still a high-flux tree with multiple
updates every day and has an average of ~15 new commits added per day,
24/7. If you see a problem with it then please report it.
Ingo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] CFS scheduler: documentation about scheduling policies
2008-09-23 9:11 ` Ingo Molnar
2008-09-23 9:53 ` Martin Steigerwald
@ 2008-09-23 11:48 ` Martin Steigerwald
2008-09-23 11:50 ` Ingo Molnar
1 sibling, 1 reply; 9+ messages in thread
From: Martin Steigerwald @ 2008-09-23 11:48 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel, Peter Zijlstra
[-- Attachment #1: Type: text/plain, Size: 3486 bytes --]
Am Dienstag, 23. September 2008 schrieb Ingo Molnar:
> * Martin Steigerwald <ms@teamix.de> wrote:
> > The documentation about the CFS scheduler is scarse when it comes to
> > scheduling policies. This patch adds a chapter about the scheduling
> > policies it supports. Peter Zijlstra provided most of the information for
> > it in
> >
> > http://marc.info/?l=linux-kernel&m=122210038326356&w=2
> >
> > This patch is based on 2.6.27-rc7.
> >
> > Signed-off-by: Martin Steigerwald <ms@teamix.de>
>
> looks good to me - but could you please do the patch against the latest
> scheduler tree, which has already updated this file (and which made your
> patch not apply cleanly):
>
> http://people.redhat.com/mingo/tip.git/README
>
> also:
> > --- sched-design-CFS.txt-2.6.27-rc7 2008-07-13 23:51:29.000000000
> > +0200 +++ sched-design-CFS.txt 2008-09-23 10:33:01.107393509 +0200
>
> please use -p1 to create patches - or since you've just set up the
> tip/master tracking, do something like:
Okay, lets see how this works out.
---
From a57581d4ec3b13f63920b89c336ac9c93c6cf9f0 Mon Sep 17 00:00:00 2001
From: Martin Steigerwald <ms@teamix.de>
Date: Tue, 23 Sep 2008 13:45:46 +0200
Subject: [PATCH] CFS: Documentation about scheduling policies
The documentation about the CFS scheduler is scarse when it comes to
scheduling policies. This patch adds a chapter about the scheduling
policies it supports. Peter Zijlstra provided most of the information
for it in
http://marc.info/?l=linux-kernel&m=122210038326356&w=2
Signed-off-by: Martin Steigerwald <ms@teamix.de>
---
Documentation/scheduler/sched-design-CFS.txt | 28 ++++++++++++++++++++++++-
1 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/Documentation/scheduler/sched-design-CFS.txt b/Documentation/scheduler/sched-design-CFS.txt
index b2aa856..9d8eb55 100644
--- a/Documentation/scheduler/sched-design-CFS.txt
+++ b/Documentation/scheduler/sched-design-CFS.txt
@@ -114,7 +114,31 @@ result.
-5. SCHEDULING CLASSES
+5. Scheduling policies
+
+CFS implements three scheduling policies:
+
+ - SCHED_NORMAL (traditionally called SCHED_OTHER): The scheduling
+ policy that is used for regular tasks.
+
+ - SCHED_BATCH: Does not preempt 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. This is well suited for
+ batch jobs.
+
+ - SCHED_IDLE: This is even weaker than nice 19, but its not a true
+ idle timer scheduler in order to avoid to get into priority
+ inversion problems which would deadlock the machine.
+
+SCHED_FIFO/_RR are implemented in sched_rt.c and are as specified by
+POSIX.
+
+The command chrt from util-linux-ng 2.13.1.1 can set all of these except
+SCHED_IDLE.
+
+
+
+6. SCHEDULING CLASSES
The new CFS scheduler has been designed in such a way to introduce "Scheduling
Classes," an extensible hierarchy of scheduler modules. These modules
@@ -179,7 +203,7 @@ This is the (partial) list of the hooks:
-6. GROUP SCHEDULER EXTENSIONS TO CFS
+7. GROUP SCHEDULER EXTENSIONS TO CFS
Normally, the scheduler operates on individual tasks and strives to provide
fair CPU time to each task. Sometimes, it may be desirable to group tasks and
--
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 related [flat|nested] 9+ messages in thread
* Re: [PATCH] CFS scheduler: documentation about scheduling policies
2008-09-23 11:48 ` Martin Steigerwald
@ 2008-09-23 11:50 ` Ingo Molnar
2008-09-23 12:01 ` Martin Steigerwald
0 siblings, 1 reply; 9+ messages in thread
From: Ingo Molnar @ 2008-09-23 11:50 UTC (permalink / raw)
To: Martin Steigerwald; +Cc: linux-kernel, Peter Zijlstra
* Martin Steigerwald <ms@teamix.de> wrote:
> > please use -p1 to create patches - or since you've just set up the
> > tip/master tracking, do something like:
>
> Okay, lets see how this works out.
>
> ---
> From a57581d4ec3b13f63920b89c336ac9c93c6cf9f0 Mon Sep 17 00:00:00 2001
> From: Martin Steigerwald <ms@teamix.de>
> Date: Tue, 23 Sep 2008 13:45:46 +0200
> Subject: [PATCH] CFS: Documentation about scheduling policies
Applied to tip/sched/devel, merged it into tip/master and pushed the
result out - thanks Martin.
this was a perfect patch :)
Ingo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] CFS scheduler: documentation about scheduling policies
2008-09-23 11:50 ` Ingo Molnar
@ 2008-09-23 12:01 ` Martin Steigerwald
2008-09-23 12:07 ` Ingo Molnar
2008-09-23 12:10 ` Peter Zijlstra
0 siblings, 2 replies; 9+ messages in thread
From: Martin Steigerwald @ 2008-09-23 12:01 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel, Peter Zijlstra
[-- Attachment #1: Type: text/plain, Size: 1162 bytes --]
Am Dienstag, 23. September 2008 schrieb Ingo Molnar:
> * Martin Steigerwald <ms@teamix.de> wrote:
> > > please use -p1 to create patches - or since you've just set up the
> > > tip/master tracking, do something like:
> >
> > Okay, lets see how this works out.
> >
> > ---
> > From a57581d4ec3b13f63920b89c336ac9c93c6cf9f0 Mon Sep 17 00:00:00 2001
> > From: Martin Steigerwald <ms@teamix.de>
> > Date: Tue, 23 Sep 2008 13:45:46 +0200
> > Subject: [PATCH] CFS: Documentation about scheduling policies
>
> Applied to tip/sched/devel, merged it into tip/master and pushed the
> result out - thanks Martin.
>
> this was a perfect patch :)
Thanks. Now I can learn how I can update my local tip-master ;-). Hmmm, git
pull seemed to do the trick although it did not touch
Documentation/scheduler/sched-design-CFS.txt again. Seems it detected that I
applied the patch I sent you already.
Will it be in 2.6.28 or even in 2.6.27? 8-)
Looking forward to further documentation patches - these can't break any
code ;-).
--
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] 9+ messages in thread
* Re: [PATCH] CFS scheduler: documentation about scheduling policies
2008-09-23 12:01 ` Martin Steigerwald
@ 2008-09-23 12:07 ` Ingo Molnar
2008-09-23 12:10 ` Peter Zijlstra
1 sibling, 0 replies; 9+ messages in thread
From: Ingo Molnar @ 2008-09-23 12:07 UTC (permalink / raw)
To: Martin Steigerwald; +Cc: linux-kernel, Peter Zijlstra
* Martin Steigerwald <ms@teamix.de> wrote:
> Am Dienstag, 23. September 2008 schrieb Ingo Molnar:
> > * Martin Steigerwald <ms@teamix.de> wrote:
> > > > please use -p1 to create patches - or since you've just set up the
> > > > tip/master tracking, do something like:
> > >
> > > Okay, lets see how this works out.
> > >
> > > ---
> > > From a57581d4ec3b13f63920b89c336ac9c93c6cf9f0 Mon Sep 17 00:00:00 2001
> > > From: Martin Steigerwald <ms@teamix.de>
> > > Date: Tue, 23 Sep 2008 13:45:46 +0200
> > > Subject: [PATCH] CFS: Documentation about scheduling policies
> >
> > Applied to tip/sched/devel, merged it into tip/master and pushed the
> > result out - thanks Martin.
> >
> > this was a perfect patch :)
>
> Thanks. Now I can learn how I can update my local tip-master ;-).
> Hmmm, git pull seemed to do the trick although it did not touch
> Documentation/scheduler/sched-design-CFS.txt again. Seems it detected
> that I applied the patch I sent you already.
yes.
the best way to update is to have tip as a remote and to update via 'git
remote update'. Then you can do "git merge tip/master" - or if this does
not work (tip/master is an integration branch and has to be reset
occasionally) then you can do a 'git-reset --hard tip/master' to switch
over to the new tree.
NOTE: a hard reset means you'll lose local commits. If you want to carry
them over then do something like:
git rebase -i --onto tip/master 123412341234
where 123412341234 is the sha1 of the previous tip/master you based your
local changes on.
> Will it be in 2.6.28 or even in 2.6.27? 8-)
yes, it's queued up for v2.6.28. For v2.6.27 we [in -tip] dont do
documentation updates starting at around -rc4 or so (to reduce the
upstream churn).
> Looking forward to further documentation patches - these can't break
> any code ;-).
definitely ;-)
Ingo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] CFS scheduler: documentation about scheduling policies
2008-09-23 12:01 ` Martin Steigerwald
2008-09-23 12:07 ` Ingo Molnar
@ 2008-09-23 12:10 ` Peter Zijlstra
1 sibling, 0 replies; 9+ messages in thread
From: Peter Zijlstra @ 2008-09-23 12:10 UTC (permalink / raw)
To: Martin Steigerwald; +Cc: Ingo Molnar, linux-kernel
On Tue, 2008-09-23 at 14:01 +0200, Martin Steigerwald wrote:
> Am Dienstag, 23. September 2008 schrieb Ingo Molnar:
> > * Martin Steigerwald <ms@teamix.de> wrote:
> > > > please use -p1 to create patches - or since you've just set up the
> > > > tip/master tracking, do something like:
> > >
> > > Okay, lets see how this works out.
> > >
> > > ---
> > > From a57581d4ec3b13f63920b89c336ac9c93c6cf9f0 Mon Sep 17 00:00:00 2001
> > > From: Martin Steigerwald <ms@teamix.de>
> > > Date: Tue, 23 Sep 2008 13:45:46 +0200
> > > Subject: [PATCH] CFS: Documentation about scheduling policies
> >
> > Applied to tip/sched/devel, merged it into tip/master and pushed the
> > result out - thanks Martin.
> >
> > this was a perfect patch :)
>
> Thanks. Now I can learn how I can update my local tip-master ;-). Hmmm, git
> pull seemed to do the trick although it did not touch
> Documentation/scheduler/sched-design-CFS.txt again. Seems it detected that I
> applied the patch I sent you already.
'git remote update' will be best, 'git pull' only works if the
underlying stuff never gets rebased.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-09-23 12:10 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-23 9:01 [PATCH] CFS scheduler: documentation about scheduling policies Martin Steigerwald
2008-09-23 9:11 ` Ingo Molnar
2008-09-23 9:53 ` Martin Steigerwald
2008-09-23 10:14 ` Ingo Molnar
2008-09-23 11:48 ` Martin Steigerwald
2008-09-23 11:50 ` Ingo Molnar
2008-09-23 12:01 ` Martin Steigerwald
2008-09-23 12:07 ` Ingo Molnar
2008-09-23 12:10 ` Peter Zijlstra
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.