From patchwork Thu Jun 8 07:55:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dietmar Eggemann X-Patchwork-Id: 103335 Delivered-To: patch@linaro.org Received: by 10.182.29.35 with SMTP id g3csp2123611obh; Thu, 8 Jun 2017 00:55:41 -0700 (PDT) X-Received: by 10.98.18.148 with SMTP id 20mr16781249pfs.142.1496908541024; Thu, 08 Jun 2017 00:55:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496908541; cv=none; d=google.com; s=arc-20160816; b=J2i1W+Y1AN2NEi4qLaP+5qbiGp4twj8ucmgKzF+zOLm4hdBb82bbk8aDIBqdceYCDY iBDJttC50t2rmFh48M7iFCS6vdwMu95b4bC3HluQ7pbVNwfKkfRsLRmD2SNzipNa5W65 rs1DTZSF8cn9+o5yy7irZ4ZK8cN/L2Om824GQRBgYL1N79a+bMC8HRKE4LNuLjm+Vj6r BiNLVI5aoUK9owCv2g08wXoU5bnrXDbEJCiAHXYeUR1pInsUuE9NR9dUNwQx2d4DYuio s4whhLUIPvnD4ox2t/lqqAfb4TRWnwPAyHK9Zm6Ab69i/KT1jDeEI97eZcJNRPAHFHQC BG4g== 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 :arc-authentication-results; bh=2IM3LOqNnuWnTVego13bFIYRN8FeVXRFdhpmW3pRQ/s=; b=DP9+TX9ca+IFcH9SavJIlHUNpC05DPBDHSsle6TT4Mn4lh81lHly+arSbGgIsCnzSk U8mQmc2p9hN/306r02JufeJBzdZFzvyEzbBUaQNIA7+s2P55LCwh61DPPPvdqU0mfb0r S/Dcqd3cJ834zSKibhIOVroIbf/1g5wk4wfF6GyjNo4nvA3fv1wQ0SDp+tEtyInyLT2B Gy7dsi0CPbS4wlqEOGcc8ruJy5IhgXSTs0RGT8hfQnmAMIs6JIY7C3hGldOmKLrEzEPh JCTP90jhWUm2jUfc8d0UqAWe70lJkdEltmN8+5S8DQQ8LtFFDlGsm1jhoJ4SHfm3BSdz V0QQ== 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 n15si3803425pfj.278.2017.06.08.00.55.40; Thu, 08 Jun 2017 00:55:41 -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 S1751726AbdFHHzg (ORCPT + 25 others); Thu, 8 Jun 2017 03:55:36 -0400 Received: from foss.arm.com ([217.140.101.70]:43188 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751610AbdFHHze (ORCPT ); Thu, 8 Jun 2017 03:55:34 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0830480D; Thu, 8 Jun 2017 00:55:34 -0700 (PDT) Received: from e107985-lin.cambridge.arm.com (e107985-lin.cambridge.arm.com [10.1.210.41]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0BE7A3F3E1; Thu, 8 Jun 2017 00:55:31 -0700 (PDT) From: Dietmar Eggemann To: linux-kernel@vger.kernel.org Cc: linux-pm@vger.kernel.org, linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org, Greg Kroah-Hartman , Russell King , Catalin Marinas , Will Deacon , Juri Lelli , Vincent Guittot , Peter Zijlstra , Morten Rasmussen Subject: [PATCH 0/6] arm, arm64: frequency- and cpu-invariant accounting support for task scheduler Date: Thu, 8 Jun 2017 08:55:07 +0100 Message-Id: <20170608075513.12475-1-dietmar.eggemann@arm.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For a more accurate (i.e. frequency- and cpu-invariant) load-tracking the task scheduler needs a frequency-scaling and on a heterogeneous system a cpu-scaling correction factor. This patch-set implements a Frequency Invariance Engine (FIE) (topology_get_freq_scale()) in drivers/base/arch_topology.c to provide a frequency-scaling correction factor. The Cpu Invariance Engine (CIE) (topology_get_cpu_scale()) providing a cpu-scaling correction factor was already introduced by the "Fix issues and factorize arm/arm64 capacity information code" patch-set [1]. This patch-set also enables the frequency- and cpu-invariant accounting support. Enabling here means to associate (wire) the task scheduler cname arch_scale_freq_capacity and arch_scale_cpu_capacity with the FIE and CIE function names from drivers/base/arch_topology.c. This replaces the task scheduler's default FIE and CIE in kernel/sched/sched.h. Patch high level description: [ 01/06] Rework cpufreq policy notifier for frequency-invariant accounting support [ 02/06] Frequency Invariance Engine (FIE) [03,04/06] Enable frequency- and cpu-invariant accounting support on arm [05,06/06] Enable frequency- and cpu-invariant accounting support on arm64 The patch-set is based on top of linux-next/master (tag: next-20170607) and it is also available from: git://linux-arm.org/linux-de.git upstream/freq_and_cpu_inv It has been tested on TC2 (arm) and JUNO (arm64) by running a ramp-up rt-app task pinned to a cpu with the ondemand cpufreq governor and checking the load-tracking signals of this task. [1] https://marc.info/?l=linux-kernel&m=149625018223002&w=2 Dietmar Eggemann (6): drivers base/arch_topology: prepare cpufreq policy notifier for frequency-invariant load-tracking support drivers base/arch_topology: frequency-invariant load-tracking support arm: wire frequency-invariant accounting support up to the task scheduler arm: wire cpu-invariant accounting support up to the task scheduler arm64: wire frequency-invariant accounting support up to the task scheduler arm64: wire cpu-invariant accounting support up to the task scheduler arch/arm/include/asm/topology.h | 8 +++++ arch/arm/kernel/topology.c | 1 - arch/arm64/include/asm/topology.h | 8 +++++ arch/arm64/kernel/topology.c | 1 - drivers/base/arch_topology.c | 64 ++++++++++++++++++++++++++++++++++----- include/linux/arch_topology.h | 2 ++ 6 files changed, 75 insertions(+), 9 deletions(-) -- 2.11.0