public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chen Gong <gong.chen@linux.intel.com>
To: Don Zickus <dzickus@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>, Andi Kleen <andi@firstfloor.org>,
	x86@kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Robert Richter <robert.richter@amd.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	seiji.aguchi@hds.com, vgoyal@redhat.com, mjg@redhat.com,
	tony.luck@intel.com, gong.chen@intel.com, satoru.moriya@hds.com,
	avi@redhat.com
Subject: Re: [PATCH 1/3] x86, reboot:  Use NMI instead of REBOOT_VECTOR to stop cpus
Date: Thu, 13 Oct 2011 16:17:42 +0800	[thread overview]
Message-ID: <4E969EA6.9060400@linux.intel.com> (raw)
In-Reply-To: <20111012125132.GI5795@redhat.com>

于 2011/10/12 20:51, Don Zickus 写道:
> On Wed, Oct 12, 2011 at 10:35:42AM +0800, Chen Gong wrote:
>> 于 2011/10/11 23:24, Don Zickus 写道:
>>> +
>>> +		/* sync above data before sending NMI */
>>> +		wmb();
>>> +
>>> +		apic->send_IPI_allbutself(NMI_VECTOR);
>>> +
>>> +		/*
>>> +		 * Don't wait longer than a second if the caller
>>> +		 * didn't ask us to wait.
>>> +		 */
>>> +		timeout = USEC_PER_SEC;
>>> +		while (num_online_cpus()>   1&&   (wait || timeout--))
>>> +			udelay(1);
>>
>> In this patch and next patch, how about using the same logic in commit 74d91e3c6
>
> I guess I don't understand why I would do that.  That commit doesn't seem
> to have a way to break out of the while loop and it does not take into account
> the 'wait' variable the virt folks needed.  The only thing that could be
> usable seems to be the 'touch_nmi_watchdog', but in that case if the other
> cpus haven't hit the NMI yet, I would be happy for other NMI sources to
> trigger to, to help move things along. :-)

Maybe two birds with on stone :-)

>
> The above code snippet is what is currently there and that seems to work
> well, so I didn't want to change to much when moving from the IRQ path to
> the NMI path.

Fine, if so, I have no objection.


  reply	other threads:[~2011-10-13  8:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-11 15:24 [PATCH 0/3] Use NMI to stop cpus Don Zickus
2011-10-11 15:24 ` [PATCH 1/3] x86, reboot: Use NMI instead of REBOOT_VECTOR " Don Zickus
2011-10-12  2:35   ` Chen Gong
2011-10-12 12:51     ` Don Zickus
2011-10-13  8:17       ` Chen Gong [this message]
2011-10-12  7:30   ` Ingo Molnar
2011-10-12 12:54     ` Don Zickus
2011-10-12 16:33       ` Ingo Molnar
2011-10-11 15:24 ` [PATCH 2/3] x86, NMI: Add NMI IPI selftest Don Zickus
2011-10-12  7:27   ` Ingo Molnar
2011-10-11 15:24 ` [PATCH 3/3] x86, NMI: knob to disable using NMI IPIs to stop cpus Don Zickus
2011-10-12  7:28   ` Ingo Molnar

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=4E969EA6.9060400@linux.intel.com \
    --to=gong.chen@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=avi@redhat.com \
    --cc=dzickus@redhat.com \
    --cc=gong.chen@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mjg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=robert.richter@amd.com \
    --cc=satoru.moriya@hds.com \
    --cc=seiji.aguchi@hds.com \
    --cc=tony.luck@intel.com \
    --cc=vgoyal@redhat.com \
    --cc=x86@kernel.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