Received: by 2002:ac0:a874:0:0:0:0:0 with SMTP id c49csp271145ima; Fri, 15 Mar 2019 02:27:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqw+ocpDU/1mV6Z5EaGhS+ifp7/f9SXW1E8LGRzyMfqsmGPTTYY8w+dNYVvC2N483JNUGYhG X-Received: by 2002:a63:2c87:: with SMTP id s129mr2398986pgs.311.1552642068746; Fri, 15 Mar 2019 02:27:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552642068; cv=none; d=google.com; s=arc-20160816; b=rl1Wex9ZanyPbq4OQsmuUsau1rD2dAuqD1FUXYri9ks5D26J7aJl8+L4WWBBAeDlVE 2vC8Ipa4oFwIGNo9ldPNW6JscY+WFWYOm9RFeai6s6EUtjNBuR0PDHAs8Afrv2km4559 tvy7jRHw4Yy4EHOmGXz21vyy5EV4E1zKsLQgJKmg78d2TUI068uXxE+hzbJpM+kgN9cr u+PqaPh+WBV25PRavM3om5Wf4YPPrtigmwqnWkrFf25YSja1lsBIBvTpS54H0qmR2TdL lDMPyvCqz/7/6/rA+/UJg8uiqp5NZFHJbGECGhwQ+NEXYJvKUAHNtkOFXnorVrmhZbjV 3krg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=meiT0XD+ijzgQZqi3Uj3kl0F9QLBEdO3L89tPQOWNN8=; b=nR+g0Ae+gXmoOg7pFxZyQOjiYOxPL7FJXps1ZmwWpsQFGCB9Pv86Ijb4y0GgUi6m/U +WWa1KcMe+UjpGbFj86HOcM4XRK616kKVW4eT0YBjgH2OZzPv5inr6mLEFj38ImqiiI2 X/jA5ZjKle3X6emey926Bw6xrPOQcccS2tK1zuio4ibhAVa6kszI8pz9bxFF9/BUOi3d BTbfEjTubZhwhSTHiX4XaLDu8BTv4IGTErfAagduGc21vCmHWS/sTrvHoDglyyY7J2xe 7pu/QhI3brS6QxQPlLF38ELIgLH8QOkJT8/EXZYK4pQQu5GqpnRYzIRk076GF4SaZAXb m2tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=km68X5eh; 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 t128si1523351pfb.151.2019.03.15.02.27.34; Fri, 15 Mar 2019 02:27:48 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=km68X5eh; 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 S1728630AbfCOJZk (ORCPT + 99 others); Fri, 15 Mar 2019 05:25:40 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:41192 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726886AbfCOJZk (ORCPT ); Fri, 15 Mar 2019 05:25:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=meiT0XD+ijzgQZqi3Uj3kl0F9QLBEdO3L89tPQOWNN8=; b=km68X5ehR6WVbMvujQbHeDW8w 4JKRTxJh66oEbiaYw3zc8ofgiSsuOSOH4McBSkI94GmthCrYvETxXA3NH5GpFJ2HpgsDNebLknMNx xGwm1SVbwIbvUKO7xrCbbof41wpKQVLaqINWAYob1hnCNpeMq62NkHiO6w2bM5h/CXPwlik4HaCaP 6Ny42jGSnE9ODRif00csG15IS2/3Sp1RqgjFiWLgK/LJQcVOgPGjryotOrNxND3jusb8B+Mm2X4gV 0pQiC1JoXSZMSagIWmV95aZYfHu0mi514TtSo9wtgku2XVVAsrCDMC20zB2LZ3SylN2994HiYS7i5 rDUdMZ09w==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4j5n-0003DB-MG; Fri, 15 Mar 2019 09:25:31 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id EC77821A7734B; Fri, 15 Mar 2019 10:25:29 +0100 (CET) Date: Fri, 15 Mar 2019 10:25:29 +0100 From: Peter Zijlstra To: Zhenzhong Duan Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Waiman Long , Srinivas Eeda , x86@kernel.org Subject: Re: [PATCH 2/2] Revert "x86/hpet: Reduce HPET counter read contention" Message-ID: <20190315092529.GU5996@hirez.programming.kicks-ass.net> References: <1552552932-21821-1-git-send-email-zhenzhong.duan@oracle.com> <1552552932-21821-2-git-send-email-zhenzhong.duan@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1552552932-21821-2-git-send-email-zhenzhong.duan@oracle.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 14, 2019 at 04:42:12PM +0800, Zhenzhong Duan wrote: > This reverts commit f99fd22e4d4bc84880a8a3117311bbf0e3a6a9dc. > > It's unnecessory after commit "acpi_pm: Fix bootup softlockup due to PMTMR > counter read contention", the simple HPET access code could be restored. > > On a general system with good TSC, TSC is the final default clocksource. > So the potential performce loss is only at bootup stage before TSC > replacing HPET, we didn't observe obvious delay of bootup. The timeline here is: - Len took out SKX from native_calibrate_tsc b51120309348 ("x86/tsc: Fix erroneous TSC rate on Skylake Xeon") This causes the TSC to run through the calibration code, which completes _after_ SMP bringup. - This then caused HPET to be used during SMP bringup, which resulted in Waiman doing the patch you now propose removing. Because large (multi-socket) SKX machines would barely boot. f99fd22e4d4b ("x86/hpet: Reduce HPET counter read contention") - Now, I figured that was all crazy to begin with, and introduced clocksource_tsc_early, such that we can run at the guestimate TSC frequency until we've completed calibration and then swap to the real TSC clocksource. aa83c45762a2 ("x86/tsc: Introduce early tsc clocksource") (and assorted fixes) This means that we now only use HPET for a very short time in early boot, _IFF_ TSC is stable. Now, given the amount of wreckage we still see with TSC, I'm very reluctant to revert this patch. Because the moment TSC goes out the window, we're back on HPET, and this patch does make a huge difference. Yes, its sad, gross and nasty... but the same is true for TSC still being a trainwreck. So NAK.