2007-08-23 09:44:00

by Ingo Molnar

[permalink] [raw]
Subject: [patch] CFS scheduler, -v20, for v2.6.22.5, v2.6.21.7, v2.6.20.16


By popular demand, here is release -v20 of the CFS scheduler. It is a
full backport of the latest & greatest v2.6.23-rc3 CFS code to
v2.6.22.5, v2.6.21.7 and v2.6.20.16. The patches can be downloaded from
the usual place:

http://people.redhat.com/mingo/cfs-scheduler/

Changes since -v19: there have been lots of small regression fixes,
speedups, debug enhancements and tidy-ups - many of which can be
user-visible.

See the detailed shortlog below - there are nearly 100 changes - they do
add up to a significant total linecount change. There was no crash bug
or hang bug found in the CFS code since v19 was released. (in fact the
last crash/hang bug in CFS was found and fixed in v7, more than 3 months
ago, and even that crash only happened in an uncommon sw-suspend setup,
not during normal use. So CFS has turned out to be a pretty robust
codebase.)

Nevertheless, if you had any problems (performance or behavioral) with
v19 it's worth checking v20 out - and if v19 worked great for you it's
worth checking out that v20 still works great =B-)

Also, the backported CFS scheduler enables people to test suspected
scheduler regressions on older codebases too, to filter out the effects
of other changes.

v20 has been build and boot tested on both 32-bit and 64-bit x86, ontop
of all 3 backport kernel bases. As usual, any sort of feedback,
bugreport, fix and suggestion is more than welcome!

Ingo

------------------->
Adrian Bunk (1):
sched: make global code static

Al Viro (1):
take sched_debug.c out of nasal demon territory

Alexey Dobriyan (2):
Fix leaks on /proc/{*/sched,sched_debug,timer_list,timer_stats}
sched: remove binary sysctls from kernel.sched_domain

Avi Kivity (1):
sched: arch preempt notifier mechanism

Ingo Molnar (68):
sched: make cpu_clock() not use the rq clock
sched: remove cache_hot_time
sched: calc_delta_mine(): use fixed limit
sched: uninline calc_delta_mine()
sched: uninline inc/dec_nr_running()
sched: ->task_new cleanup
sched: move load-calculation functions
sched: add schedstat_set() API
sched: use schedstat_set() API
sched: reduce debug code
sched: batch sleeper bonus
sched: reorder update_cpu_load(rq) with the ->task_tick() call
sched: uninline rq_clock()
sched: schedule() speedup
sched: clean up delta_mine
sched: delta_exec accounting fix
sched: add [__]update_rq_clock(rq)
sched: eliminate rq_clock() use
sched: remove rq_clock()
sched: eliminate __rq_clock() use
sched: remove __rq_clock()
sched: remove 'now' use from assignments
sched: remove the 'u64 now' parameter from print_cfs_rq()
sched: remove the 'u64 now' parameter from update_curr()
sched: remove the 'u64 now' parameter from update_stats_wait_start()
sched: remove the 'u64 now' parameter from update_stats_enqueue()
sched: remove the 'u64 now' parameter from __update_stats_wait_end()
sched: remove the 'u64 now' parameter from update_stats_wait_end()
sched: remove the 'u64 now' parameter from update_stats_curr_start()
sched: remove the 'u64 now' parameter from update_stats_dequeue()
sched: remove the 'u64 now' parameter from update_stats_curr_end()
sched: remove the 'u64 now' parameter from __enqueue_sleeper()
sched: remove the 'u64 now' parameter from enqueue_sleeper()
sched: remove the 'u64 now' parameter from enqueue_entity()
sched: remove the 'u64 now' parameter from dequeue_entity()
sched: remove the 'u64 now' parameter from set_next_entity()
sched: remove the 'u64 now' parameter from pick_next_entity()
sched: remove the 'u64 now' parameter from put_prev_entity()
sched: remove the 'u64 now' parameter from update_curr_rt()
sched: remove the 'u64 now' parameter from ->enqueue_task()
sched: remove the 'u64 now' parameter from ->dequeue_task()
sched: remove the 'u64 now' parameter from ->pick_next_task()
sched: remove the 'u64 now' parameter from pick_next_task()
sched: remove the 'u64 now' parameter from ->put_prev_task()
sched: remove the 'u64 now' parameter from ->task_new()
sched: remove the 'u64 now' parameter from update_curr_load()
sched: remove the 'u64 now' parameter from inc_load()
sched: remove the 'u64 now' parameter from dec_load()
sched: remove the 'u64 now' parameter from inc_nr_running()
sched: remove the 'u64 now' parameter from dec_nr_running()
sched: remove the 'u64 now' parameter from enqueue_task()
sched: remove the 'u64 now' parameter from dequeue_task()
sched: remove the 'u64 now' parameter from deactivate_task()
sched: remove the 'u64 now' local variables
sched debug: remove the 'u64 now' parameter from print_task()/_rq()
sched: move the __update_rq_clock() call to scheduler_tick()
sched: remove __update_rq_clock() call from entity_tick()
sched: clean up set_curr_task_fair()
sched: optimize activate_task()
sched: optimize update_rq_clock() calls in the load-balancer
sched: make the multiplication table more accurate
sched: round a bit better
sched: fix update_stats_enqueue() reniced codepath
sched: refine negative nice level granularity
sched: improve rq-clock overflow logic
sched: fix typo in the FAIR_GROUP_SCHED branch
sched debug: dont print kernel address in /proc/sched_debug
sched: fix sleeper bonus

Josh Triplett (2):
sched: mark sysrq_sched_debug_show() static
sched: mark print_cfs_stats static

Nick Piggin (1):
sched: debug feature - make the sched-domains tree runtime-tweakable

Oleg Nesterov (1):
sched: run_rebalance_domains: s/SCHED_IDLE/CPU_IDLE/

Peter Williams (3):
sched: tidy up left over smpnice code
sched: simplify move_tasks()
sched: fix bug in balance_tasks()

Randy Dunlap (1):
sched: fix kernel-doc warnings

Satoru Takeuchi (1):
sched: remove unused rq->load_balance_class

Ulrich Drepper (1):
sched: clean up sched_getaffinity()


2007-08-23 10:25:38

by Ingo Molnar

[permalink] [raw]
Subject: Re: [patch] CFS scheduler, -v20, for v2.6.22.5, v2.6.21.7, v2.6.20.16


* Ingo Molnar <[email protected]> wrote:

> By popular demand, here is release -v20 of the CFS scheduler. It is a
> full backport of the latest & greatest v2.6.23-rc3 CFS code to
> v2.6.22.5, v2.6.21.7 and v2.6.20.16. The patches can be downloaded
> from the usual place:

update: i missed a small SMP balancing fix so i've updated the patches
to -v20.1.

Ingo

2007-08-23 12:25:40

by David Schwartz

[permalink] [raw]
Subject: RE: [patch] CFS scheduler, -v20, for v2.6.22.5, v2.6.21.7,v2.6.20.16


> * Ingo Molnar <[email protected]> wrote:
>
> > By popular demand, here is release -v20 of the CFS scheduler. It is a
> > full backport of the latest & greatest v2.6.23-rc3 CFS code to
> > v2.6.22.5, v2.6.21.7 and v2.6.20.16. The patches can be downloaded
> > from the usual place:
>
> update: i missed a small SMP balancing fix so i've updated the patches
> to -v20.1.
>
> Ingo

$ diff sched-cfs-v2.6.23-v20.patch sched-cfs-v2.6.23-v20.1.patch
$

It's not funny unless you change something, IMO.

DS


2007-08-24 01:43:31

by Bruce Ashfield

[permalink] [raw]
Subject: Re: [patch] CFS scheduler, -v20, for v2.6.22.5, v2.6.21.7, v2.6.20.16

On 8/23/07, Ingo Molnar <[email protected]> wrote:
>
> By popular demand, here is release -v20 of the CFS scheduler. It is a
> full backport of the latest & greatest v2.6.23-rc3 CFS code to
> v2.6.22.5, v2.6.21.7 and v2.6.20.16. The patches can be downloaded from
> the usual place:

Ingo,

Great to see the older kernels updated, thanks for the patches.
I've got a bit of a modified 2.6.21.7, but when I built with
CONFIG_FAIR_GROUP_SCHED=y, I need the following change
to make things right (On a quick glance, my change matches the
2.6.23-rc3 code). Then again, I may just be doing something
stupid.

My apologies in advance if gmail decides to mangle the patch.

--- a/kernel/sched_fair.c.orig 2007-08-23 21:25:08.000000000 -0400
+++ a/kernel/sched_fair.c 2007-08-23 21:25:18.000000000 -0400
@@ -1057,7 +1057,7 @@ static void task_new_fair(struct rq *rq,
*/
static void set_curr_task_fair(struct rq *rq)
{
- struct sched_entity *se = &rq->curr.se;
+ struct sched_entity *se = &rq->curr->se;

for_each_sched_entity(se)
set_next_entity(cfs_rq_of(se), se);



--
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"

2007-08-24 05:14:30

by Willy Tarreau

[permalink] [raw]
Subject: Re: [patch] CFS scheduler, -v20, for v2.6.22.5, v2.6.21.7, v2.6.20.16

Hi Ingo,

On Thu, Aug 23, 2007 at 11:43:46AM +0200, Ingo Molnar wrote:
>
> By popular demand, here is release -v20 of the CFS scheduler. It is a
> full backport of the latest & greatest v2.6.23-rc3 CFS code to
> v2.6.22.5, v2.6.21.7 and v2.6.20.16.

Great, thanks a lot ! I had been grepping 2.6.23's shortlog to catch all
patches beginning with "sched:", hoping to miss none. I had caught up
with -rc2 with something that worked fairly well, but I never was 100%
sure it was OK.

So, once again, thanks ;-)
Willy

2007-08-24 06:09:41

by Ingo Molnar

[permalink] [raw]
Subject: Re: [patch] CFS scheduler, -v20, for v2.6.22.5, v2.6.21.7, v2.6.20.16


* Bruce Ashfield <[email protected]> wrote:

> On 8/23/07, Ingo Molnar <[email protected]> wrote:
> >
> > By popular demand, here is release -v20 of the CFS scheduler. It is a
> > full backport of the latest & greatest v2.6.23-rc3 CFS code to
> > v2.6.22.5, v2.6.21.7 and v2.6.20.16. The patches can be downloaded from
> > the usual place:
>
> Ingo,
>
> Great to see the older kernels updated, thanks for the patches. I've
> got a bit of a modified 2.6.21.7, but when I built with
> CONFIG_FAIR_GROUP_SCHED=y, I need the following change to make things
> right (On a quick glance, my change matches the 2.6.23-rc3 code). Then
> again, I may just be doing something stupid.
>
> My apologies in advance if gmail decides to mangle the patch.
>
> --- a/kernel/sched_fair.c.orig 2007-08-23 21:25:08.000000000 -0400
> +++ a/kernel/sched_fair.c 2007-08-23 21:25:18.000000000 -0400
> @@ -1057,7 +1057,7 @@ static void task_new_fair(struct rq *rq,
> */
> static void set_curr_task_fair(struct rq *rq)
> {
> - struct sched_entity *se = &rq->curr.se;
> + struct sched_entity *se = &rq->curr->se;

thanks, applied.

Ingo

2007-08-24 14:59:47

by Ingo Molnar

[permalink] [raw]
Subject: Re: [patch] CFS scheduler, -v20, for v2.6.22.5, v2.6.21.7,v2.6.20.16


* David Schwartz <[email protected]> wrote:

> $ diff sched-cfs-v2.6.23-v20.patch sched-cfs-v2.6.23-v20.1.patch
> $
>
> It's not funny unless you change something, IMO.

look at the contents and you'll see why :-)

Ingo