lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111012125132.GI5795@redhat.com>
Date:	Wed, 12 Oct 2011 08:51:32 -0400
From:	Don Zickus <dzickus@...hat.com>
To:	Chen Gong <gong.chen@...ux.intel.com>
Cc:	Ingo Molnar <mingo@...e.hu>, Andi Kleen <andi@...stfloor.org>,
	x86@...nel.org, LKML <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Robert Richter <robert.richter@....com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	seiji.aguchi@....com, vgoyal@...hat.com, mjg@...hat.com,
	tony.luck@...el.com, gong.chen@...el.com, satoru.moriya@....com,
	avi@...hat.com
Subject: Re: [PATCH 1/3] x86, reboot:  Use NMI instead of REBOOT_VECTOR to
 stop cpus

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. :-)

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.

Perhaps I am missing something?

Cheers,
Don
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ