From: Ross Lagerwall <ross.lagerwall@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
Xen-devel <xen-devel@lists.xen.org>
Cc: Keir Fraser <keir@xen.org>, Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH v3] x86/NMI: Allow processing unknown NMIs when watchdog is enabled
Date: Mon, 1 Sep 2014 14:27:44 +0100 [thread overview]
Message-ID: <54047450.2080004@citrix.com> (raw)
In-Reply-To: <53FF379C.8070701@citrix.com>
On 08/28/2014 03:07 PM, Andrew Cooper wrote:
>> Run an NMI watchdog on each processor. If a processor is stuck for
>> -longer than the **watchdog\_timeout**, a panic occurs.
>> +longer than the **watchdog\_timeout**, a panic occurs. When `force` is
>> +specified, in addition to running an NMI watchdog on each processor,
>> +unknown NMIs will still be processed.
>>
>> ### watchdog\_timeout
>> > `= <integer>`
>> diff --git a/xen/arch/x86/nmi.c b/xen/arch/x86/nmi.c
>> index c4427a6..873427f 100644
>> --- a/xen/arch/x86/nmi.c
>> +++ b/xen/arch/x86/nmi.c
>> @@ -43,7 +43,18 @@ static DEFINE_PER_CPU(unsigned int, nmi_timer_ticks);
>>
>> /* opt_watchdog: If true, run a watchdog NMI on each processor. */
>> bool_t __initdata opt_watchdog = 0;
>> -boolean_param("watchdog", opt_watchdog);
>> +
>> +/* watchdog_force: If true, process unknown NMIs when running the watchdog. */
>> +bool_t watchdog_force = 0;
>> +
>> +static void __init parse_watchdog(char * s)
>> +{
>> + opt_watchdog = !!parse_bool(s);
>
> A lot of code in Xen gets the use of parse_bool() wrong. In this case,
> opt_watchdog will be set if garbage is passed in the parameter, which is
> a change in behaviour from before.
>
This is not a change in behavior from before. A bool param if specified
on the command-line is set to true unless explicitly set to a false-like
value (e.g. this is how a bare parameter like "watchdog" enables the
watchdog).
As it has been committed, the behavior has been changed and means
setting "watchdog" on the command-line does not result in the watchdog
being enabled.
--
Ross Lagerwall
next prev parent reply other threads:[~2014-09-01 13:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-27 16:25 [PATCH v3] x86/NMI: Allow processing unknown NMIs when watchdog is enabled Ross Lagerwall
2014-08-28 14:07 ` Andrew Cooper
2014-09-01 13:27 ` Ross Lagerwall [this message]
2014-09-01 14:51 ` Jan Beulich
2014-09-03 12:24 ` [PATCH] x86/NMI: allow passing just "watchdog" again Jan Beulich
2014-09-03 12:32 ` Andrew Cooper
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=54047450.2080004@citrix.com \
--to=ross.lagerwall@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=xen-devel@lists.xen.org \
/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;
as well as URLs for NNTP newsgroup(s).