From patchwork Fri Nov 9 16:20:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 150679 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp52927ljp; Fri, 9 Nov 2018 08:21:19 -0800 (PST) X-Google-Smtp-Source: AJdET5eI6FjHDgmTBFdHM/WSGLnWrvPaWc0ROwPbGPHnIdvWxHgfIJKocdITDggYeskHmPNqU5Tl X-Received: by 2002:a65:5a4c:: with SMTP id z12mr8043607pgs.188.1541780478884; Fri, 09 Nov 2018 08:21:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541780478; cv=none; d=google.com; s=arc-20160816; b=b9t+pl2CijM31YPE37JwZSEqBwdp6Q4Gnlks1wUqNITfiXt03ZFkcVVnJmvFLm9sED XXsrbK0QJFkCCSMPyK8bGCp9cr5hVQpY9+aWeYRumuRy43Hh1i5xYLhXW3SOHsSR6Sh7 9hPi/27SFHmcYgLRkQmbR+REU8iVMcsE3U5BtCSWxxkREn8yeGGPPTIdNFii0uIGnrqB ULvAyg6zBHjiHdTmqRnwWlslEnZYWbqCkRipGPqQ+YNGCzIPOJhRUtt1tf40u/ad4qNN 4EqdGu+vTBHje0LYyrftLXLLADihwWZgDtMF1PMkTniL5Ng4Q3CsS6Ib+X4EZryh/XcI phgA== 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 :dkim-signature; bh=ZqlLsfgmEvuq/LnRN/D1OpMmiH4ixxwkmF58HlpPpX4=; b=qXmqeYUZh/1CpCKE8eWtkJyEPCapxutAw/kl2jPGHFob0QiqfV9HfsgdVqP0IFAIzC YyosPZRDEEwR6E6OyLnq3oD+8fSe3oHfGZ/kLiVz2oTb4KYEEPIaHO5i713mqJ8TJEF2 ze5kN4ALgQkzlCdC1PtaBdph/OTureQmd1xLZlA96mXNoEPW8wPjUkGoVrafqgJVNhNR rz1231xaDoapNKV7a6ckQnBzPmVlfbJjB5yXgZyxGBZIFh/xfr6p0+WuLyAimhryoISi k6hl3zZFVi9UyxlTeFTNNBNFPDL7SjnWsx2KHRPeX52I5fjjtXF7Y5WLff7Q8JbUoDdH vBJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QTwqaPx2; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f2-v6si8401616pfb.246.2018.11.09.08.21.10; Fri, 09 Nov 2018 08:21:18 -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; dkim=pass header.i=@linaro.org header.s=google header.b=QTwqaPx2; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728311AbeKJCCX (ORCPT + 32 others); Fri, 9 Nov 2018 21:02:23 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:44715 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727828AbeKJCCX (ORCPT ); Fri, 9 Nov 2018 21:02:23 -0500 Received: by mail-wr1-f67.google.com with SMTP id j17-v6so2476222wrq.11 for ; Fri, 09 Nov 2018 08:21:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=ZqlLsfgmEvuq/LnRN/D1OpMmiH4ixxwkmF58HlpPpX4=; b=QTwqaPx2ZE3v0HnmOEHedXU9HomomcxdFfBA9sc+Ug3AUwpt3XQk88/+RPt0IMiwFK j2HmaGHZNVniIGCgspyP3nt5y5wgjNAPepEYiz7jYVJF8xGUlG6bdwfQUeAXwmpAM88q eeJ7NOLxWiahehFtW3QHL/KO7ZLj61pLLX6Dw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ZqlLsfgmEvuq/LnRN/D1OpMmiH4ixxwkmF58HlpPpX4=; b=pav9FiLNCX6m5TWx9BanDBFNZcjbH8WgKHVtJjwSfxWyaZJEj4G93RzdLJydCxzp6k sm1XHnRzMP+fyVx6FldBWAtrDhAs1SwJ38Ll2FYYl/s4T9Bn11gfHYFTpn7d8oA5TCIu jnYFuaY7uxgR8GYYp8suoLgavUkDQOeIx54UPK3LNHfG5a1oaUE3vkoo/8EZd51n57CV cYbALTlZkTv3Eqv1AA+fadUgahivIppLisMKtTiBJVtguNG8P7ruXBZO2edGOUpWhGhr jmOqMuAaYLknps9XfX0YfT0QmeoEL4YuLEoBVpz3GXWuL2/ULuKdHxqfLuEm4b4NZcxy +HPw== X-Gm-Message-State: AGRZ1gIuOnjcSR/BP4Y6GSi1GQSq9vlHz5cjoRCk4kaCNyeQwf5NgOaq bShrdeB0Pk8DSeNEu38u8d75Lw== X-Received: by 2002:adf:eb0b:: with SMTP id s11-v6mr8385726wrn.102.1541780466845; Fri, 09 Nov 2018 08:21:06 -0800 (PST) Received: from localhost.localdomain ([2a01:e0a:f:6020:30de:f495:80da:cbe6]) by smtp.gmail.com with ESMTPSA id y195-v6sm1970509wme.22.2018.11.09.08.21.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Nov 2018 08:21:06 -0800 (PST) From: Vincent Guittot To: peterz@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org Cc: rjw@rjwysocki.net, dietmar.eggemann@arm.com, Morten.Rasmussen@arm.com, patrick.bellasi@arm.com, pjt@google.com, bsegall@google.com, thara.gopinath@linaro.org, pkondeti@codeaurora.org, quentin.perret@arm.com, Vincent Guittot Subject: [PATCH v6 0/2] sched/fair: update scale invariance of PELT Date: Fri, 9 Nov 2018 17:20:52 +0100 Message-Id: <1541780454-9934-1-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This new version of the scale invariance patchset adds an important change compare to v3 and before. It still scales the time to reflect the amount of work that has been done during the elapsed running time but this is now done at rq level instead of per entity and rt/dl/cfs_rq. The main advantage is that it is done once per clock update and we don't need to maintain per sched_avg's stolen_idle_time anymore. This also ensures that all pelt signals will be always synced for a rq. The 1st patch makes available rq_of() helper function for pelt.c file and the 2nd patch implements the new scaling algorithm Changes since v5: - Fix running_sum scaling in update_tg_cfs_runnable() raised by Dietmar - Remove unused cpu parameters raised by Dietmar Vincent Guittot (2): sched/fair: move rq_of helper function sched/fair: update scale invariance of PELT kernel/sched/core.c | 1 + kernel/sched/deadline.c | 6 +-- kernel/sched/fair.c | 56 ++++++++++------------- kernel/sched/pelt.c | 45 ++++++++++--------- kernel/sched/pelt.h | 115 ++++++++++++++++++++++++++++++++++++++++++++++-- kernel/sched/rt.c | 6 +-- kernel/sched/sched.h | 21 ++++++++- 7 files changed, 187 insertions(+), 63 deletions(-) -- 2.7.4