Re: [Bug #12465] KVM guests stalling on 2.6.28 (bisected)

Ingo Molnar
2009-01-20T13:07:14Z

* Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org> wrote:

>
> * Kevin Shanahan <kmshanah-biM/RbsGxha6c6uEtOJ/EA@public.gmane.org> wrote:
>
> > > This suggests some sort of KVM-specific problem. Scheduler latencies
> > > in the seconds that occur under normal load situations are noticed and
> > > reported quickly - and there are no such open regressions currently.
> >
> > It at least suggests a problem with interaction between the scheduler
> > and kvm, otherwise reverting that scheduler patch wouldn't have made the
> > regression go away.
>
> the scheduler affects almost everything, so almost by definition a
> scheduler change can tickle a race or other timing bug in just about any
> code - and reverting that change in the scheduler can make the bug go
> away. But yes, it could also be a genuine scheduler bug - that is always a
> possibility.
>
> Could you please run a cfs-debug-info.sh session on a CONFIG_SCHED_DEBUG=y
> and CONFIG_SCHEDSTATS=y kernel, while you are experiencing those
> latencies:
>
> http://people.redhat.com/mingo/cfs-scheduler/tools/cfs-debug-info.sh
>
> and post that (relatively large) somewhere, or send it as a reply after
> bzip2 -9 compressing it? It will include a lot of information about the
> delays your tasks are experiencing.

Another test would be to build the scheduler latency tracer into your
kernel:

CONFIG_SCHED_TRACER=y

And enable it via:

echo wakeup > /debug/tracing/current_tracer

and you should be seeing the worst-case scheduling latency traces in
/debug/tracing/trace, and the largest observed latency will be in
/debug/tracing/tracing_max_latency [in microseconds].

You can reset the max-latency (and thus restart tracing) via:

echo 0 > /debug/tracing/tracing_max_latency

Latencies up to 100 microseconds are ok. If you see 10 seconds delays
there (values of 10,000,000 or more) then it's probably a scheduler bug.

Please reproduce the latency under KVM and send us the trace. The trace
file will be a lot more verbose and a lot more verbose if you also enable
the function tracer (FUNCTION_TRACER, DYNAMIC_FTRACE and
FUNCTION_GRAPH_TRACER).

Ingo