Re: [Announce] [patch] Modular Scheduler Core and Completely Fair Scheduler [CFS]

Ingo Molnar
2007-04-15T17:56:22Z

* Willy Tarreau <w@1wt.eu> wrote:

> Well, since I merged the fair-fork patch, I cannot reproduce (in fact,
> bash forks 1000 processes, then progressively execs scheddos, but it
> takes some time). So I'm rebuilding right now. But I think that Linus
> has an interesting clue about GPM and notification before switching
> the terminal. I think it was enabled in console mode. I don't know how
> that translates to frozen xterms, but let's attack the problems one at
> a time.

to debug this, could you try to apply this add-on as well:

http://redhat.com/~mingo/cfs-scheduler/sched-fair-print.patch

with this patch applied you should have a /proc/sched_debug file that
prints all runnable tasks and other interesting info from the runqueue.

[ i've refreshed all the patches on the CFS webpage, so if this doesnt
apply cleanly to your current tree then you'll probably have to
refresh one of the patches.]

The output should look like this:

Sched Debug Version: v0.01
now at 226761724575 nsecs

cpu: 0
.nr_running : 3
.raw_weighted_load : 384
.nr_switches : 13666
.nr_uninterruptible : 0
.next_balance : 4294947416
.curr->pid : 2179
.rq_clock : 241337421233
.fair_clock : 7503791206
.wait_runtime : 2269918379

runnable tasks:
task | PID | tree-key | -delta | waiting | switches
-----------------------------------------------------------------
+ cat 2179 7501930066 -1861140 1861140 2
loop_silent 2149 7503010354 -780852 0 911
loop_silent 2148 7503510048 -281158 280753 918

now for your workload the list should be considerably larger. If there's
starvation going on then the 'switches' field (number of context
switches) of one of the tasks would never increase while you have this
'cannot switch consoles' problem.

maybe you'll have to unapply the fair-fork patch to make it trigger
again. (fair-fork does not fix anything, so it probably just hides a
real bug.)

(i'm meanwhile busy running your scheddos utilities to reproduce it
locally as well :)

Ingo