From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7863BC77B7C for ; Wed, 26 Apr 2023 00:11:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238349AbjDZALi (ORCPT ); Tue, 25 Apr 2023 20:11:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231896AbjDZALg (ORCPT ); Tue, 25 Apr 2023 20:11:36 -0400 Received: from mail.zytor.com (unknown [IPv6:2607:7c80:54:3::138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB81810E9 for ; Tue, 25 Apr 2023 17:11:34 -0700 (PDT) Received: from [127.0.0.1] ([73.231.166.163]) (authenticated bits=0) by mail.zytor.com (8.17.1/8.17.1) with ESMTPSA id 33Q0Ahlv3867755 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Tue, 25 Apr 2023 17:10:44 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 33Q0Ahlv3867755 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2023040901; t=1682467844; bh=zlADXuLQzQL6rHF9UUciVfpOcO8xxJBWdPf+jRMOtOY=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=jQNul7h3BL6TjIB5IeiXakFXyVmFOZYvsiqT5Y9CCEe2lL0yHHCEnrzPwoJ3iynxH zyOSN4jPN8whhWJcgEvNZ3Cwn5ue4eVAHjUWRFD8WdYSuvdKxyGy3cqHZwfmvr/BzL fgbOwCxq8xyJ7UOh4ped5n6brZ+vBBrBchNZMOnIFWmkUKxOniqjjfvWZtDTjJwycE Z4NQxO8T70KqwH/kQQcVRsDkkQfm2uyVxwEEi10dOPAAVHNDWsMEtrViMZKzbAz1VT UXUpjy1cX9iDEBChgHLfsjobulqrE9R7lOpC6tuWuUxKCeJtoY7MJNlXvA23vd7Joz cPHTCf2EPjBug== Date: Tue, 25 Apr 2023 17:10:42 -0700 From: "H. Peter Anvin" To: Dave Hansen , Thomas Gleixner , Tony Battersby , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org CC: Mario Limonciello , Tom Lendacky , "linux-kernel@vger.kernel.org" , Andi Kleen Subject: Re: [PATCH RFC] x86/cpu: fix intermittent lockup on poweroff User-Agent: K-9 Mail for Android In-Reply-To: References: <3817d810-e0f1-8ef8-0bbd-663b919ca49b@cybernetics.com> <87o7nbzn8w.ffs@tglx> Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On April 25, 2023 3:29:49 PM PDT, Dave Hansen w= rote: >On 4/25/23 14:05, Thomas Gleixner wrote: >> The only consequence of looking at bit 0 of some random other leaf is >> that all CPUs which run stop_this_cpu() issue WBINVD in parallel, which >> is slow but should not be a fatal issue=2E >>=20 >> Tony observed this is a 50% chance to hang, which means this is a timin= g >> issue=2E > >I _think_ the system in question is a dual-socket Westmere=2E I don't se= e >any obvious errata that we could pin this on: > >> https://www=2Eintel=2Ecom/content/dam/www/public/us/en/documents/specif= ication-updates/xeon-5600-specification-update=2Epdf > >Andi Kleen had an interesting theory=2E WBINVD is a pretty expensive >operation=2E It's possible that it has some degenerative behavior when >it's called on a *bunch* of CPUs all at once (which this path can do)=2E >If the instruction takes too long, it could trigger one of the CPU's >internal lockup detectors and trigger a machine check=2E At that point, >all hell breaks loose=2E > >I don't know the cache coherency protocol well enough to say for sure, >but I wonder if there's a storm of cache coherency traffic as all those >lines get written back=2E One of the CPUs gets starved from making enoug= h >forward progress and trips a CPU-internal watchdog=2E > >Andi also says that it _should_ log something in the machine check banks >when this happens so there should be at least some kind of breadcrumb=2E > >Either way, I'm hoping this hand waving satiates tglx's morbid curiosity >about hardware that came out from before I even worked at Intel=2E ;) "Pretty expensive" doesn't really cover it=2E It is by far the longest tim= e an x86 CPU can block out all outside events=2E