Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp683657imm; Thu, 4 Oct 2018 01:22:34 -0700 (PDT) X-Google-Smtp-Source: ACcGV63Vx2XgTOqxA0tiYs4e80ANQ3ytunGq5BUC/FgwR8B3DaYPUTvkGKY5sGd+HgO2/lP+DluG X-Received: by 2002:a63:ec11:: with SMTP id j17-v6mr4713265pgh.388.1538641354691; Thu, 04 Oct 2018 01:22:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538641354; cv=none; d=google.com; s=arc-20160816; b=DTYB8BR35v5zdrkNBLYJzYouym5LCJnu8JnJMUb8BghXVwSOoDEtc/tKcmgzWw1pE/ 3Wowj6jBen02WhG/nD7Rie7xR+Jybaw5/6m4Uii32qowFc4G1tvA/cxevohheAcedlFj bG8Fs5v8tONCgToVD4yDU1E41d3h7NzSHBy1i2+sWp8eKlyWlgNdiLBWz4eGSJSsTifO elZZUX7efhq22x5D9fQzf/4jYoDCzOP8oi34D3JL5ZP5rwHr/PVaZLSXUo/pnxyJbS+l jeHV5jwHCzAZu1z+vfjx+sBUTgsRORJeAxVkF7LD0ZrU1klREa5BViRx8xYEnsFt3KAs CiuQ== 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=aDrLXP3OZtrkPERNReDYxfeiCaeSlvYhIdU9q/+oa5A=; b=qE4jXcacPuR/PByC3+w2YkrP36p2/SwSqz3tLn5npi6sDXSgfy1Mnh+u53jztmPrPL mWy5JoM6OAMlM4bC54Uyh1Q0QfDF/8TCQqBxt3i6LYjiIjPae+fQo1WJFwiupMAYmDkx v4HJtiQAb9UyXqnG+oMEz0f97OFY1gTxWKwcvUNpvzLzBizBh+bSLXdFCSFNwqYsdNvB PIY6uU1q4vRgAVPk45ZQ5vC9xfk/216wyMQem+E20HmNgXSdqeei/GaOB/F45MLOwpCk D6UtYgQIqrMdPL/9VCblJ+GZZ+leRvE5t9hicNOgCuAloVjcPbp+lf3fnRb5dFMrzBSQ BD7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=Fbamxt0R; 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 v13-v6si4260642pgq.26.2018.10.04.01.22.18; Thu, 04 Oct 2018 01:22:34 -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=merlin.20170209 header.b=Fbamxt0R; 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 S1727450AbeJDPNi (ORCPT + 99 others); Thu, 4 Oct 2018 11:13:38 -0400 Received: from merlin.infradead.org ([205.233.59.134]:48574 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726949AbeJDPNi (ORCPT ); Thu, 4 Oct 2018 11:13:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=aDrLXP3OZtrkPERNReDYxfeiCaeSlvYhIdU9q/+oa5A=; b=Fbamxt0R9eOcw/JBiGurk1FHJ gwguw1O3IHGzq1a2DNWSlMyp0fLOyPymgJqLnfpDYCR0Aji221oKBEnIgVMjtG4G0pa7Ho5Y/8Xh9 /eL8bVxZSFxb0aKTyQiJDIe31e5vBdq3Qe3+yE14yEzWMqLrBKHU0SyN/f8xq2AS6PMtu9pUZOulg PMsaAHb5F2K75KoJ5fyuk+E0eo9pPbQzzY5vhArfhcEoEzwx59/lrDl5vZVFK4t2T6XHaAie/kShI vBjV0esGxxP4nQN2fikSjwT4kOTEUgjZBgY5pfFYTyI4GYhS37iTveE9M0gn6irhnVsto4RNXl2X6 sdYZqviLw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1g7ysh-0007Bo-1B; Thu, 04 Oct 2018 08:21:13 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A5FFA202C1A0F; Thu, 4 Oct 2018 10:11:00 +0200 (CEST) Date: Thu, 4 Oct 2018 10:11:00 +0200 From: Peter Zijlstra To: Vitaly Kuznetsov Cc: Marcelo Tosatti , Andy Lutomirski , Thomas Gleixner , Paolo Bonzini , Radim Krcmar , Wanpeng Li , LKML , X86 ML , Matt Rickard , Stephen Boyd , John Stultz , Florian Weimer , KY Srinivasan , devel@linuxdriverproject.org, Linux Virtualization , Arnd Bergmann , Juergen Gross Subject: Re: [patch 00/11] x86/vdso: Cleanups, simmplifications and CLOCK_TAI support Message-ID: <20181004081100.GI19272@hirez.programming.kicks-ass.net> References: <20180914125006.349747096@linutronix.de> <87sh1ne64t.fsf@vitty.brq.redhat.com> <20181003190617.GC21381@amt.cnet> <87k1mycfju.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87k1mycfju.fsf@vitty.brq.redhat.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, Oct 04, 2018 at 09:54:45AM +0200, Vitaly Kuznetsov wrote: > I was hoping to hear this from you :-) If I am to suggest how we can > move forward I'd propose: > - Check if pure TSC can be used on SkyLake+ systems (where TSC scaling > is supported). > - Check if non-masterclock mode is still needed. E.g. HyperV's TSC page > clocksource is a single page for the whole VM, not a per-cpu thing. Can > we think that all the buggy hardware is already gone? No, and it is not the hardware you have to worry about (mostly), it is the frigging PoS firmware people put on it. Ever since Nehalem TSC is stable (unless you get to >4 socket systems, after which it still can be, but bets are off). But even relatively recent systems fail the TSC sync test because firmware messes it up by writing to either MSR_TSC or MSR_TSC_ADJUST. But the thing is, if the TSC is not synced, you cannot use it for timekeeping, full stop. So having a single page is fine, it either contains a mult/shift that is valid, or it indicates TSC is messed up and you fall back to something else. There is no inbetween there. For sched_clock we can still use the global page, because the rate will still be the same for each cpu, it's just offset between CPUs and the code compensates for that.