From: Andi Kleen <ak@linux.intel.com>
To: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH -tip 3/3] x86, mce: Add mce=nopoll option to disable timer polling
Date: Fri, 27 Mar 2009 12:44:07 +0100 [thread overview]
Message-ID: <49CCBC07.6000004@linux.intel.com> (raw)
In-Reply-To: <49CCA122.8070908@jp.fujitsu.com>
Hidetoshi Seto wrote:
>> Also I'm not sure a boot argument is really needed. Isn't it
>> good enough to do this early at boot through sysfs?
>
> Maybe it is good for this option, as far as polling never run
> so soon. Because sysfs is available after start of polling
> timer, boot argument is required just in theory of logics.
I think the best way would be to just not run mcelog if you want
the BIOS to log all. The only problem I guess is that users might be confused
by the printk. So perhaps just do a patch to shut down the printk?
>
> One another problem is that there are multiple documentations for
> machinecheck parameters, but not linked well:
>
> - Documentation/kernel-parameters.txt
> ("See Documentation/x86/x86_64/boot-options.txt" for "mce=")
> - Documentation/x86/x86_64/boot-options.txt
> ("AMD64 specific boot options" is not true now!)
> - Documentation/x86/x86_64/machinecheck
> (which I had not noticed the existence at first, oops!)
machinecheck is for the sysfs interface, boot options is for the boot parameters.
I guess a reference could be added to machinecheck to point to boot-options.txt
Undoubtedly the documentation could be further improved too. In general machine
checks are rather tricky and somewhat unobvious though and I expect no matter how good
the documentation ever is it won't be easy to understand.
>>> static int check_interval = 5 * 60; /* 5 minutes */
>>> @@ -633,11 +635,12 @@ static void mce_init_timer(void)
>>> {
>>> struct timer_list *t = &__get_cpu_var(mce_timer);
>>>
>>> + /* Disable polling if check_interval is 0 */
>>> + if (!check_interval)
>>> + return;
>> This check shouldn't be needed, the next two checks already do that.
>
> That is for readability improvement.
it was actually a cheesy way to avoid a race with multiple initializers, but
I fixed this in a better way in a upcoming patch (now the interval is per CPU)
> + /* Disable polling if check_interval is 0 */
> + if (!check_interval)
> + return;
> /* data race harmless because everyone sets to the same value */
> if (!next_interval)
> next_interval = check_interval * HZ;
> - if (!next_interval)
> - return;
>
> Are there any case where the HZ becomes 0?
No.
-Andi
next prev parent reply other threads:[~2009-03-27 11:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-26 8:39 [PATCH -tip 3/3] x86, mce: Add mce=nopoll option to disable timer polling Hidetoshi Seto
2009-03-26 9:01 ` Andi Kleen
2009-03-27 9:49 ` Hidetoshi Seto
2009-03-27 11:44 ` Andi Kleen [this message]
2009-03-30 9:07 ` Hidetoshi Seto
2009-03-30 9:31 ` Andi Kleen
2009-03-31 7:32 ` Hidetoshi Seto
2009-03-31 8:16 ` Andi Kleen
2009-03-28 21:29 ` [tip:x86/mce2] " Hidetoshi Seto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49CCBC07.6000004@linux.intel.com \
--to=ak@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=seto.hidetoshi@jp.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox