[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABPqkBTpzSBEezx4ScwYYX6L8ir4GLBG9MMYJuAb6YA0QbiurQ@mail.gmail.com>
Date: Thu, 18 Apr 2013 14:04:00 +0200
From: Stephane Eranian <eranian@...gle.com>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: "Pan, Zhenjie" <zhenjie.pan@...el.com>,
"paulus@...ba.org" <paulus@...ba.org>,
"mingo@...hat.com" <mingo@...hat.com>,
"acme@...stprotocols.net" <acme@...stprotocols.net>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"dzickus@...hat.com" <dzickus@...hat.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"Liu, Chuansheng" <chuansheng.liu@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] NMI: fix NMI period is not correct when cpu frequency
changes issue.
On Thu, Apr 18, 2013 at 1:42 PM, Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:
> On Tue, 2013-04-16 at 06:57 +0000, Pan, Zhenjie wrote:
>> Watchdog use performance monitor of cpu clock cycle to generate NMI to detect hard lockup.
>> But when cpu's frequency changes, the event period will also change.
>> It's not as expected as the configration.
>> For example, set the NMI event handler period is 10 seconds when the cpu is 2.0GHz.
>> If the cpu changes to 800MHz, the period will be 10*(2000/800)=25 seconds.
>> So it may make hard lockup detect not work if the watchdog timeout is not long enough.
>> Now, set a notifier to listen to the cpu frequency change.
>> And dynamic re-config the NMI event to make the event period correct.
>>
>
>
> Urgh,. does this really matter.. all we really want is for that NMI to
> hit eventually in the not too distant future. Does the frequency really
> matter _that_ much?
>
I agree, it does not really matter. Set the watchdog to a couple of minutes
and it should be fine, shouldn't it?
> Also, can't we simply pick an event that's invariant to the cpufreq
> nonsense? Something like CPU_CLK_UNHALTED.REF -- or better the
> fixed_ctr2 which nobody ever uses anyway.
>
You don't want to use fixed counter 2 for NMI watchdog because it's pinned.
No other counter can count this event. And it is very useful. I use it often.
--
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