Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2894909ybl; Thu, 29 Aug 2019 14:39:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqx0ariV6MkK0w7RtiT1RMUYKCII0RGd/4fRdMW5X9zMs31CQ58LRhsGqmU4HkcruHaxz5/I X-Received: by 2002:a17:902:7083:: with SMTP id z3mr12270093plk.87.1567114769155; Thu, 29 Aug 2019 14:39:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567114769; cv=none; d=google.com; s=arc-20160816; b=EKS7fNqR15lZmyzeW3zhNd8MAY/UK/oQD4s/08r7pGFT+xzfvz1e4E3LqKnSuObHRd HyghuRi2UOsqwhE9ELKtAS/+eO00/L9xL49Kb0mKpLQ5NpTkdg1dvVtNKNKu5ta8kP8J 06EJqC084DlblMO9xCn/TbZ7UKlQA41EYvamEapeVG+UUtbnqh07kVTmGo5o17ez1jq5 N8hJIY5LfHm7MhhYXlfDMQNYb1qikL0p809o9fpR3Vud6o2Ul5Q+vRK49VvqNOujIQn6 /eCX4PzB2Vn1VADivU7c6s1FMofP09OXHBduOuoGFb1pefGTeNtj9VolRDvtW0HA1BLu HGKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-id:mime-version:user-agent :references:message-id:in-reply-to:subject:cc:to:from:date; bh=YFI/mcIgbrcGdIE66634hu5J+71QFxLBX3rYizA0tlE=; b=iy6n7okCF6egrJ9Rs0lhf6GE3PazX6WZsspIdYixyvCNAdKAByIfoOir5aaa7Qzuq9 IyOfWJb0PiQ3OMM6cVtJjhh8jtZvc/DduyVAZLw+TwQquRahwafyqF8qiFH8oRdpdUwz FMp7ZP6ruXf2FtPl6IKWP/xuct/oMSeSdR4YzPV9AW4G6Hb7bxwUcDYcpsFffbwRQFUl MCZxdQ+ukfo4d2ivC83EyM7Dlcr5+pLv0SPfiLD+DzNnKheEgN67YaHdppCEQYRfDAgh NkFVTIFBk4hSKEl8WIBMJdvBgpD7hWs4UFieTx8VvRGP68O49raOKw7cOGP62KtEd93+ gbpw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si3033060plu.194.2019.08.29.14.39.13; Thu, 29 Aug 2019 14:39:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727926AbfH2ViZ (ORCPT + 99 others); Thu, 29 Aug 2019 17:38:25 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:51836 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726894AbfH2ViY (ORCPT ); Thu, 29 Aug 2019 17:38:24 -0400 Received: from p5de0b6c5.dip0.t-ipconnect.de ([93.224.182.197] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1i3S7Q-0007gp-9w; Thu, 29 Aug 2019 23:38:12 +0200 Date: Thu, 29 Aug 2019 23:38:11 +0200 (CEST) From: Thomas Gleixner To: Kai-Heng Feng cc: Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , harry.pan@intel.com, x86@kernel.org, LKML , Dave Hansen , Peter Zijlstra , Daniel Drake , Dan Williams , "Rafael J. Wysocki" , Len Brown , Tom Lendacky , Pu Wen Subject: [RFD] x86/tsc: Loosen the requirements for watchdog - (was x86/hpet: Disable HPET on Intel Coffe Lake) In-Reply-To: Message-ID: References: <20190829091232.15065-1-kai.heng.feng@canonical.com> <793CCD4F-35E0-46B9-B5D4-3D3233BA5D35@canonical.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-1424968746-1567110808=:1938" Content-ID: X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1424968746-1567110808=:1938 Content-Type: text/plain; CHARSET=UTF-8 Content-Transfer-Encoding: 8BIT Content-ID: On Thu, 29 Aug 2019, Thomas Gleixner wrote: > On Thu, 29 Aug 2019, Kai-Heng Feng wrote: > > I know we should find the root cause rather than stopping at "it’s a firmware > > bug”, but users are already affected by this issue [1]. > > Is there any better short-term workaround? > > Not really. And if Intel stays silent, I'm just going to apply it as is > along with a stable tag. Summary for those who are new on CC: Coffee Lake machines have a C10 state wrecked HPET which causes the TSC clocksource watchdog to misbehave which is not surprising as that's like trying to monitor an atomic clock with a sun-dial. So the intention is to disable HPET on those machines which affects also Kaby Lake CPUs as they share the model number and just differ in the stepping. Unless we get precise information from Intel which steppings are affected and that these are the only ones, we won't go down the stepping road as that is going to be an endless whack a mole game. Tried that before and got burned... While disabling HPET sounds trivial, this can have side effects. If the HPET is not available for whatever reason the kernel will use ACPI_PMTIMER as fallback clocksource for monitoring the TSC if the affected systems actually advertise it. If not that will effectively disable NOHZ and high resolution timers. Disabling NOHZ is a pain for power consumption and those machines are mostly laptops I assume. Now there is something we can consider to do: These CPUs have finally a working and usable TSC - knock on wood! Just for the record: That's 20+ years after we started to asked for it! The TSC has constant frequency and does not stop in deeper C-states. Aside of that these CPUs have the TSC_ADJUST MSR which allows us to figure out when the BIOS/SMM manages to wreckage the TSC on a CPU by writing to it for completely wrong reasons. So we could finally start to trust TSC at least on single socket systems. Multi-socket is a different story as the sockets might drift apart for reasons which I really don't want to discuss in this context for CoC's sake. So we definitely want a watchdog there as TSC ADJUST is not able to catch those issues. So if we have to disable the HPET on Kaby Lake alltogether unless Intel comes up with the clever fix, i.e. poking at the right registers, then I think we should also lift the TSC watchdog restrictions on these machines if they are single socket, which they are as the affected CPUs so far are mobile and client types. Also given the fact that we get more and more 'reduced' hardware exposed via ACPI and we already dealt with quite some fallout with various related issues due to that, I fear we need to bite this bullet anyway anytime soon. But TBH, 20+ years exposure to subtly wrecked timer hardware has left quite a few scars. I put AMD/HYGON folks on CC as well as they will run into similar problems sooner than later and their CPUs still do not have the TSC_ADJUST MSR which is paramount to loosen the watchdog restrictions. Hint, hint, hint... Thoughts? Thanks, tglx --8323329-1424968746-1567110808=:1938--