[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081218214458.GA30834@elte.hu>
Date: Thu, 18 Dec 2008 22:44:58 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Frédéric Weisbecker <fweisbec@...il.com>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Steven Rostedt <rostedt@...dmis.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] tracing/function-graph-tracer: prevent from hrtimer
interrupt infinite loop
* Frédéric Weisbecker <fweisbec@...il.com> wrote:
> > Which means that it's not some hrtimer problem, but simply the traced
> > timer tick takes more than 1 millisecond to execute under this
> > virtualization.
> >
> > Ingo
> >
>
> Oh ok I see. Sorry I'm a bit slow today... So the solution would be to
> adapt dynamically the timeout between hrtimer irq. But I don't know that
> much hrtimer to implement such a feature...
just if you want this lockup to go away. I think you did the hardest bit
already: to detect the situation reliably, without false positives. Now
the 'action' needs to change: instead of 'turning off ftrace' (which is
brutal - ftrace was just the last drop of water that pushed the system
over the edge), we can instead do 'double the minimum clockevent delta
threshold'.
there's already such code in kernel/time/tick-oneshot.c:
/*
* We tried 2 times to program the device with the given
* min_delta_ns. If that's not working then we double it
* and emit a warning.
*/
if (++i > 2) {
/* Increase the min. delta and try again */
if (!dev->min_delta_ns)
dev->min_delta_ns = 5000;
else
dev->min_delta_ns += dev->min_delta_ns >> 1;
what would be needed is to simply double ->min_delta_ns on every such
situation you detect? Once you do that, it takes effect on the next tick
automatically.
Or something like that. In theory. :-)
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists