Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp736171ybn; Wed, 2 Oct 2019 05:29:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqxvldIiCGwQ0n78eRDWbiQEXCO3fAvpbG83BYBbu33orHOd6tY6YTjd4Ut/Q+RZKtdUYtep X-Received: by 2002:a50:d55e:: with SMTP id f30mr3515514edj.35.1570019368209; Wed, 02 Oct 2019 05:29:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570019368; cv=none; d=google.com; s=arc-20160816; b=pkSQvFnZ4Mms2AekT3tpjZyDF7o3hyoXAo1ycPYXE0Arym/aQevJ5LDjt5YELgZ8eD bw+1roMJ8e88qWatSCM5chxRMbkxq6JoRcxZt1E94JLDPAreYk3/qJ7DnFA9xxm1F2RB uINNgdIu8oIZ7p3O2C+zI7UPXDfELnHsegFvWAHAckn+5LKPWF5Lkgt4jXR2cgbJEuUi EGnRKhSSuEiM7vpeybkeJesHzguZYYmZSTHUZVlt70o5nN/8EVGC2X24RPEoYhpONFvC MZC0s1M6Lh86jN8ywt9VUIUqaQyyiweJWUIKRMcMw4Kjjb5l8YWyvQiXEvjHgWIn/3+/ wBcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=ldSuO6AWDVTXrtOCa19q/Do6CPiixadWK0t4FkReAnU=; b=dsUrfCg5ssprD1uSz9L1XLhlFjXBU/nVx8vucDARUpG7fL5yOgvNKjxXqRP/EMxaoJ 3NM5Ke6TRMyWFRvLGu12uiwrCCHmLpEG98/WeQymzxT+9OiN9MyyTUr04flNXe6S5itg iyLw7xMUAoMvolfu8hQ7PCVcXe4BqvtIfc0WfKUSseKQ7BJlcf1/4qZ8+UeEbLPDlDS7 qQVlhwA1BXEqf4N87kGXQitoGnIQ19OkK8NutHCF7PG8PdUWp973BQq9Z2Fqk7PVPNgz p1qSWkFMgA6fvjMJGK+f0qdL688t65FRTa5MnI4A5Ok6uKvteqa3wpN2vOYK8UuqHkni ELsw== 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 e14si11477755eda.104.2019.10.02.05.29.03; Wed, 02 Oct 2019 05:29:28 -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 S1727121AbfJBMYT (ORCPT + 99 others); Wed, 2 Oct 2019 08:24:19 -0400 Received: from mx2.suse.de ([195.135.220.15]:57182 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725747AbfJBMYT (ORCPT ); Wed, 2 Oct 2019 08:24:19 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 45594B11B; Wed, 2 Oct 2019 12:24:17 +0000 (UTC) From: Giovanni Gherdovich To: Srinivas Pandruvada , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Borislav Petkov , Len Brown , "Rafael J . Wysocki" Cc: x86@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Mel Gorman , Matt Fleming , Viresh Kumar , Juri Lelli , Paul Turner , Vincent Guittot , Quentin Perret , Dietmar Eggemann , Doug Smythies , Giovanni Gherdovich Subject: [PATCH v2 0/2] Add support for frequency invariance for (some) x86 Date: Wed, 2 Oct 2019 14:29:24 +0200 Message-Id: <20191002122926.385-1-ggherdovich@suse.cz> X-Mailer: git-send-email 2.16.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org v1 at https://lore.kernel.org/lkml/20190909024216.5942-1-ggherdovich@suse.cz/ Changes wrt v1: - add x86-specific implementation of arch_scale_freq_invariant() using a static key that checks for the availability of APERF and MPERF - refer to GOLDMONT_D instead of GOLDMONT_X, according to recent rename - set arch_cpu_freq to 1024 from x86_arch_scale_freq_tick_disable() to prevent PELT from being fed stale data - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Cover Letter from v1: This is a resend with of Peter Zijlstra's patch to support frequency scale-invariance on x86 from May 2018 [see 1]. I've added some modifications and included performance test results. If Peter doesn't mind, I'm slapping my name on it :) The changes from Peter's original implementation are: 1) normalizing against the 4-cores turbo level instead or 1-core turbo 2) removing the run-time search for when the above value isn't found in the various Intel MSRs -- the base frequency value is taken in that case. The section "4. KNOWN LIMITATIONS" in the first patch commit message addresses the reason why this approach was dropped back in 2018, and explains that the performance gains outweight that issue. The second patch from Srinivas is taken verbatim from the May 2018 submission as it still applies. I apologies for the length of patch #1 commit message; I've made a table of contents with summaries of each section that should make easier to skim through the content. This submission incorporates the feedback and requests for additional tests received during the presentation made at OSPM 2019 in Pisa three months ago. [1] https://lore.kernel.org/lkml/20180516044911.28797-2-srinivas.pandruvada@linux.intel.com/ Giovanni Gherdovich (1): x86,sched: Add support for frequency invariance Srinivas Pandruvada (1): cpufreq: intel_pstate: Conditional frequency invariant accounting arch/x86/include/asm/topology.h | 33 +++++++ arch/x86/kernel/smpboot.c | 195 +++++++++++++++++++++++++++++++++++++++- drivers/cpufreq/intel_pstate.c | 5 ++ kernel/sched/core.c | 1 + kernel/sched/sched.h | 7 ++ 5 files changed, 240 insertions(+), 1 deletion(-) -- 2.16.4