Received: by 10.223.176.46 with SMTP id f43csp4500067wra; Tue, 23 Jan 2018 10:11:16 -0800 (PST) X-Google-Smtp-Source: AH8x2262XWnGZAsBIXkLDO7As6RUZC55dXnldHEERH+BffWw7Dlqn/K7MUkzvt4loGdf5W7r+TkT X-Received: by 10.36.118.77 with SMTP id z74mr4704773itb.37.1516731076452; Tue, 23 Jan 2018 10:11:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516731076; cv=none; d=google.com; s=arc-20160816; b=AH8qMxSbGI4Um0LzeUe/eBIxfUstXV9iwj0xnDcXUAfSrStLmo0Vwdkmi+E7nVegab J+WwN1MXTh/qchcV0F4WPJVxARHiRjmabHGL6BmTQYh/q1GrbWlFwPkH/BUE4HST2xtU Nh0rXknnAPptdZ/XjxAyK8yQ0LxgI4qUTPt7+LoBNwBKcbASIfZZ4A0LYYR7NAMfeiap T6C8MfKblpWpQsBUZwPnQWDtL9fAeZqFJtbUpSbzMtNDR91fRyX+MzkSBGi6MEijU5qw u0eMNeKBnQMk7zuJVwS2ZGQ8aYsYU+12wbosYqUM9f2x7qT8C5+wSFRPCegENvaEu3Uz qiaQ== 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=3LBb8oxRKN5R/vn87w5xS1GGlZCzWaJJlDGewGjcHos=; b=v/ZBNm0z1EoxQ4n82HvJlw3xWTuJDCDrh/oSgPgD4So3UbdjEu6yebIwnP7qU5B1zd sR1sLNrimGJpjudOW2BdGMkYmWTZIgLW3KHWE4pBq1MRYBCkoDLXrOndJ6Dk8rcpb4O5 6YAQPwakik6YxIVbkX4mnygMjfnmh+B3zw4X0qc6hAZDWk1ZQMZcCRIIjFOF1nmPcTua KnjIRhCofG/42HCEcdoGoc7sf4ncSaydBnGSlNfPK7Mjw+ptJ7043SIbD7cXC9gdl1zB 59iJhDqeVqVMiUwH3kIiKx7WfZ4qLO/7XIbCi3IV7dSq+PEWLuphtkZOL/5n1NYlEmGR a/1Q== 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 f192si8544919ite.61.2018.01.23.10.11.03; Tue, 23 Jan 2018 10:11:16 -0800 (PST) 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 S1752019AbeAWSJN (ORCPT + 99 others); Tue, 23 Jan 2018 13:09:13 -0500 Received: from foss.arm.com ([217.140.101.70]:45112 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751907AbeAWSJL (ORCPT ); Tue, 23 Jan 2018 13:09:11 -0500 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 732CC1435; Tue, 23 Jan 2018 10:09:11 -0800 (PST) Received: from e110439-lin.cambridge.arm.com (e110439-lin.cambridge.arm.com [10.1.210.68]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E8AFE3F53D; Tue, 23 Jan 2018 10:09:08 -0800 (PST) From: Patrick Bellasi To: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Cc: Ingo Molnar , Peter Zijlstra , "Rafael J . Wysocki" , Viresh Kumar , Vincent Guittot , Paul Turner , Dietmar Eggemann , Morten Rasmussen , Juri Lelli , Todd Kjos , Joel Fernandes , Steve Muckle Subject: [PATCH v3 0/3] Utilization estimation (util_est) for FAIR tasks Date: Tue, 23 Jan 2018 18:08:44 +0000 Message-Id: <20180123180847.4477-1-patrick.bellasi@arm.com> X-Mailer: git-send-email 2.15.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This is a respin of [1], rebased on today's tip/sche/core [2], which gives the util_est series now working on top of Juri's series [3] integrating SCHED_DEADLINE into schedutil. Thanks to everyone who provided feedback on the previous version, all of the feedbacks have been addressed. Specifically, as Peter suggested, util_est signals for sched_entity's have been moved into sched_entity::sched_avg. This way util_est now fits into a single 64B cacheline along with its required util_avg signal. On the other hand, I've kept instead the EWMA conditional update, which Peter suggested to remove, since it turns out to save a bit more of overhead compared to not having it. This version has been verified to not have any noticeable overhead, despite the sched_feat(UTIL_EST) being enabled, by using: perf bench sched messaging --pipe --thread --group 8 --loop 50000 running 30 iterations on a 40 cores machine: Intel(R) Xeon(R) CPU E5-2690 v2 @ 3.00GHz dual socket, 10 cores (20 threads) per socket In the previous version, with this feature enabled, the measured overhead was instead in the range of ~1% on the same HW/SW test configuration. This series still keeps the sched feature disabled by default, but given the new performance figures we could now consider to have it always enabled, or even just covered by a dedicated KConfig option. Additional experiments [4] have been done by back-porting these patches to the v4.4 based kernel running on a Google's Pixel 2 phone. This allowed us to verify that the proposed modifications contribute to the improvement of PELT by either matching or outperforming WALT [5], an out-of-tree load tracking solution currently used by some high-end Android devices, in a representative set of interactive workloads and industrial benchmarks. Changes in v3: - rebased on today's tip/sched/core (0788116) - moved util_est into sched_avg (Peter) - use {READ,WRITE}_ONCE() for EWMA updates (Peter) - using unsigned int to fit all sched_avg into a single 64B cache line - schedutil integration using Juri's cpu_util_cfs() - first patch dropped since it's already queued in tip/sched/core Changes in v2: - rebased on top of v4.15-rc2 - tested that overhauled PELT code does not affect the util_est Cheers Patrick .:: References ============== [1] https://lkml.org/lkml/2017/12/5/634 20171205171018.9203-1-patrick.bellasi@arm.com [2] git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core (commit 07881166a892) [3] https://lkml.org/lkml/2017/12/4/173 20171204102325.5110-1-juri.lelli@redhat.com [4] https://gist.github.com/derkling/e087e1d028ef200f51ca356acdf68664 [5] Window Assisted Load Tracking https://lwn.net/Articles/704903/ Patrick Bellasi (3): sched/fair: add util_est on top of PELT sched/fair: use util_est in LB and WU paths sched/cpufreq_schedutil: use util_est for OPP selection include/linux/sched.h | 16 +++++ kernel/sched/debug.c | 4 ++ kernel/sched/fair.c | 156 +++++++++++++++++++++++++++++++++++++++++++++--- kernel/sched/features.h | 5 ++ kernel/sched/sched.h | 8 ++- 5 files changed, 181 insertions(+), 8 deletions(-) -- 2.15.1