Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2590015ybb; Mon, 30 Mar 2020 09:04:14 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtuUjQ9WWLWtDtqvgd1avev6EJGzdu+PG/XOydVpyu1AXHu1ERusTDiW4xHTeCtjNAcAO+J X-Received: by 2002:a9d:4f0:: with SMTP id 103mr9471646otm.336.1585584253815; Mon, 30 Mar 2020 09:04:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585584253; cv=none; d=google.com; s=arc-20160816; b=Vknoi6tnPeYyk/lbxv9rl0mrUvJikPCoAsg38ehf/dOV37q2kpEhagpRSX3TUiP8O/ OCHkKCTBniCL42JjTJ1tOGfgnnz6IFpTI1pZDZ3weyo79hTZ6z+2NVEMRK/XCH2Mphgg ZvkY3uWeZ8PEbt4IlmQ4IxzMpPpWkwbhWKKkijawOOFc4vmboLVgeMnrdDbYXOeidzup RSqho6tXjqTpcKZGQSFR1dPtfvA61F0p5ci6s3e4vMxh1cV5+DkziOZNE6HgMNibnLXv 0QaZ/utrmUhazjabpXnbww1VX/WTWQnPXMoSgn0DSMjDOd+GYTE+oi9H5Qvw95p+XLRq /Qhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:in-reply-to :subject:cc:to:from:user-agent:references; bh=gWmIeODNf6XjPpXVRAaRm8SWIoGCVIfrL0hM59FzRSA=; b=J5lUjUY/qY1qX34tW6oEc6eKqgHFM/e3Wm2JNCCmHI8TaEbL73LXIZ9+kFUkgEjuJ+ S8jwNnB6YXiflNS03boxprwZJGvxNIbBF8dt5fXYCc+/jXYs78QMcuezLcduFRiNa48b +bOz07N4495RPBE+X6MGIC6bqZU506ObByqiKnZhyI6GLG5gFk75LNTEcB3+1w45aHZ3 T5rMkc+7nzG11zM6BjP4n/cPeE2KOaM3OwQzjhmC/udMkjPkuYRBqvrmXMKLKDSHTh7W 4ptGYbsdfxxMDCl+XmclajyCUKghyc5O1b3sOYCXB2ARw2+D0z9GxFRJZNGqWTKw1aVI ZDDw== 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 a66si6259031otc.172.2020.03.30.09.03.57; Mon, 30 Mar 2020 09:04:13 -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 S1729923AbgC3QDR (ORCPT + 99 others); Mon, 30 Mar 2020 12:03:17 -0400 Received: from foss.arm.com ([217.140.110.172]:56846 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727048AbgC3QDR (ORCPT ); Mon, 30 Mar 2020 12:03:17 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0290B1042; Mon, 30 Mar 2020 09:03:17 -0700 (PDT) Received: from e113632-lin (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A540F3F71E; Mon, 30 Mar 2020 09:03:15 -0700 (PDT) References: <20200122151617.531-2-ggherdovich@suse.cz> <158029757853.396.10568128383380430250.tip-bot2@tip-bot2> <158556634294.3228.4889951961483021094@build.alporthouse.com> <20200330125219.GM20696@hirez.programming.kicks-ass.net> User-agent: mu4e 0.9.17; emacs 26.3 From: Valentin Schneider To: Peter Zijlstra Cc: Chris Wilson , linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org, tip-bot2 for Giovanni Gherdovich , Giovanni Gherdovich , Ingo Molnar , Doug Smythies , "Rafael J. Wysocki" , x86 Subject: Re: [tip: sched/core] x86, sched: Add support for frequency invariance In-reply-to: <20200330125219.GM20696@hirez.programming.kicks-ass.net> Date: Mon, 30 Mar 2020 17:03:04 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 30 2020, Peter Zijlstra wrote: > +static void init_freq_invariance(bool secondary) > { > bool ret = false; > > - if (smp_processor_id() != 0 || !boot_cpu_has(X86_FEATURE_APERFMPERF)) > + if (!boot_cpu_has(X86_FEATURE_APERFMPERF)) > return; > > + if (secondary) { > + if (static_branch_likely(&arch_scale_freq_key)) { > + init_counter_refs(NULL); > + } > + return; > + } > + Oh doh, that's an "enable once and for all" thing. That makes much more sense; sorry for the noise.