From patchwork Fri Oct 19 16:17:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 149291 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp3502443lji; Fri, 19 Oct 2018 09:17:59 -0700 (PDT) X-Google-Smtp-Source: ACcGV61g4xocNmQt3SEmSsT1nmeJzhpx/M6XayOfr28vj/uq54x4q+E9Dp8iExxUH8jdzD2cOpgY X-Received: by 2002:a62:8a4f:: with SMTP id y76-v6mr35489853pfd.142.1539965879638; Fri, 19 Oct 2018 09:17:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539965879; cv=none; d=google.com; s=arc-20160816; b=gFriXvcMQcq3x70xSaEn3yxM5Q6S8bNTbOHxfjBMARRio9JfTfN29YqJF4BnuZ4o1O hS4fv2Ixm0YdcxFZp1dm2RVYoYt9yVfbbETNx045g4R5fwrzLgP456nIqt1s+WVHXpUX IuKD90YAOZKAPIy79rp0uhiTDXIRUGydwMb12ENfTjcRvnDj+YUoEZ2UteAW5LYmj3KH NtNeMtiwOeSVkvJOXsCUbNKlcgoegx3R5AgI3FDtBjiC7BNJf6HjSR/+8gCCmkc2r+6i d7sYXcA4SMGZ7baFujfayQtCpqh25Dy/drP3lDyI8Pz0h1I5eY1Ej5tz9tSC+kMNPurt Fvkg== 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=NhdG7YCb6qRIRdvFuCcHZhGJGJjotp0H8yUCWfxRlJI=; b=Ex1USlTR31DOvb92R8kkD4QMCtUVYzJCYhktCGJrQ88EVNJGxn6Lgy4r5D2MkDNB1F Pimt9Ikparv20H+DSoaSvoz/LC1Usde88V4wrDxudgbBLtQtXF2RHerK3ltpsc1GoS/9 bPh4RffOmL25jjXmOBUxtbXwfCOTSqiIYgPwtqPFXMD6qarW7/fxX35LNKk6IKLhHvGA 06zqgsFHTRT19Qc75XjYrDzY17ZZi+54bW6ECLVJxn7/Yr5hhKLl7Tl1N63Zowyb/rl1 XqXDUGQwm+9dgob22/nrHWdosxaemk3blus7Xns7gxlsszw+cYPOTBNZm96rX9Tluhvz 8RvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GozLqqNv; 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 z29-v6si24218389pfl.209.2018.10.19.09.17.59; Fri, 19 Oct 2018 09:17:59 -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; dkim=pass header.i=@linaro.org header.s=google header.b=GozLqqNv; 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 S1727880AbeJTAYo (ORCPT + 32 others); Fri, 19 Oct 2018 20:24:44 -0400 Received: from mail-wm1-f45.google.com ([209.85.128.45]:40205 "EHLO mail-wm1-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727219AbeJTAYo (ORCPT ); Fri, 19 Oct 2018 20:24:44 -0400 Received: by mail-wm1-f45.google.com with SMTP id z204-v6so4234309wmc.5 for ; Fri, 19 Oct 2018 09:17:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=NhdG7YCb6qRIRdvFuCcHZhGJGJjotp0H8yUCWfxRlJI=; b=GozLqqNv/9z1uK/CnkBbtTNO+IlSH5Sn4vJKaHwi7XZ87iAdZbKokpM1MiwM+BqLDO QTpQ+Ymb9hLQQXQTuBdfG3tAuOfplbjZL73sQmNZXYmvbU7aRQ//6vxUh0UPL0lQrE5N yPz7RkoZCxzn80hCylbWpmXkbbQsKceRTVCpI= 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=NhdG7YCb6qRIRdvFuCcHZhGJGJjotp0H8yUCWfxRlJI=; b=BI+oSdKyueKduvXSZv/PulUztMP67mFNju0iy7yh2OeqqeTKCZfH/IDORL1LVLhrzD C8tM/qslG9l+ONEeyh5UaiMUDayiMhzGNpM1GpI9Z9sxrgqMlaFVSIXzOCgXE8L1BA16 8CEiOb5Krv8RqgM3nrxhsRP1jc7rI+wkHTs6qQIJ7lA3Z1URUMjmXJVVkEssVqGP1lr/ kYpEa+r+N4uTujnb5y3sojETueJwOVIs9TEZOuHyJtJfzL0Ziv+eKtcBkILiWZiDUEBn 30sRQuZBDGacm2wAr4vGJB15iyKxpMnRSHeDnfGwKESDF8npxEMqCbDe4nmvRoYE2qQG Wefg== X-Gm-Message-State: ABuFfojN0Dsf2CBVHRzs7j+aOJk6gD1/FC5RfuYoIOHdzhD7MPROWgMx sOQWRmyj6VdvqHiYDnWTUTdY8K+nwwQ= X-Received: by 2002:a1c:e102:: with SMTP id y2-v6mr5396190wmg.141.1539965875535; Fri, 19 Oct 2018 09:17:55 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:f:6020:9024:3180:921a:1e27]) by smtp.gmail.com with ESMTPSA id n11-v6sm17009460wrx.17.2018.10.19.09.17.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Oct 2018 09:17:54 -0700 (PDT) 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, Vincent Guittot Subject: [PATCH v4 0/2] sched/fair: update scale invariance of PELT Date: Fri, 19 Oct 2018 18:17:49 +0200 Message-Id: <1539965871-22410-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 4th version of the scale invariance patchset adds an important change compare to previous ones. 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 ensure that all the pelt signal 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 Vincent Guittot (2): sched/fair: move rq_of helper function sched/fair: update scale invariance of PELT kernel/sched/core.c | 2 +- kernel/sched/deadline.c | 6 ++-- kernel/sched/fair.c | 29 +++++----------- kernel/sched/pelt.c | 88 ++++++++++++++++++++++++++++++++++++++++++++----- kernel/sched/pelt.h | 27 +++++++++++++++ kernel/sched/rt.c | 6 ++-- kernel/sched/sched.h | 18 ++++++++++ 7 files changed, 139 insertions(+), 37 deletions(-) -- 2.7.4