From owner-freebsd-current@freebsd.org Fri Aug 21 17:10:59 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 053929BF531 for ; Fri, 21 Aug 2015 17:10:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20F2914A5; Fri, 21 Aug 2015 17:10:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id t7LHAmIH017438 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 21 Aug 2015 20:10:48 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua t7LHAmIH017438 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id t7LHAmTR017437; Fri, 21 Aug 2015 20:10:48 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 21 Aug 2015 20:10:48 +0300 From: Konstantin Belousov To: Julian Elischer Cc: Ian Lepore , freebsd-current Subject: Re: freebsd-head: suddenly NMI panics lead to ddb being unable to stop CPUs? Message-ID: <20150821171048.GC2072@kib.kiev.ua> References: <55D74193.4020008@FreeBSD.org> <55D74402.70104@freebsd.org> <1440174193.242.279.camel@freebsd.org> <55D7577B.8090000@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55D7577B.8090000@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Aug 2015 17:10:59 -0000 On Sat, Aug 22, 2015 at 12:53:15AM +0800, Julian Elischer wrote: > On 8/22/15 12:23 AM, Ian Lepore wrote: > > On Fri, 2015-08-21 at 23:30 +0800, Julian Elischer wrote: > >> On 8/21/15 11:25 PM, Adrian Chadd wrote: > >>> Ah, cool. I'll give it a whirl. > >>> > >>> I'm a little worried about having all of the other cores spinning in > >>> this case (mostly thermal; the machines get VERY LOUD when the CPUs > >>> are spinning..) > >>> > >> make each spin with the pause instruction.. and for N seconds (N being > >> the CPU ID) or something > > cpu_spinwait() is defined as ia32_pause() on i386 and amd64. > > > > The problem is that ONLY x86 arches benefit from cpu_spinwait(), it's > > just a nop on other arches, which turn into little radiant heaters for > > long spins (like while waiting for APs to be released). > > remind me again why it cant spin with a 'halt' instruction? Because interrupts are disabled. Even NMI is disabled, because spin happens in the NMI handler. There is no way to wake up CPU from the halted state.