Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp5809847imd; Wed, 31 Oct 2018 02:19:29 -0700 (PDT) X-Google-Smtp-Source: AJdET5efouKuvyTocJl0o0PQisjhGkGom0Zc+tCLpjPLKhIdsgUFIAK79RSqlJsptSbQoyN5g/Fj X-Received: by 2002:a62:1745:: with SMTP id 66-v6mr2526974pfx.236.1540977569386; Wed, 31 Oct 2018 02:19:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540977569; cv=none; d=google.com; s=arc-20160816; b=MJeGtJNloNTgSaQQWjMXdJ3QXCeGB7wUyMoZoL9o4XfRZvs7vZ4i7asI+Izc5bLr6s KdJppW1fJEdsY7lC8tKZD8zonQqffmbMxvJw8HLV1cfq8lv8R63rZpp1glhmSR81L4/A D39O/yKnVa7uVOSv0w9FRpcCuBj8+gp8Kh2dvoQqrLRXKUDkWev2bERQ1HCAwJgKNCii Tqw15aIUH0wkeGlDPx1Wyu1FW0gJ9zqWReedftHbNLhxG44zxQu8B+aP9E2fSuEwmOOv 5r/EsDMj2dAyWYUDbb+efM6B3Zulwni4TDPNxU/Ke6Dv0JMfyl7HALL9vC0qekv8sYCJ jzoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=cqESkq9AtZ7dSGE1LN01rZhHamFgyrI9PHchU5ozMuI=; b=wgY3Fwt5rVsvSsgJMaOO6HHHS9cPc7uHx7gM9vixe4ujruSYMxK2pCjz2wgBd0tZ5S S2jq4mrLucMIAs6nwa+jXo5qvukRtOAZD5oDC9ox36rUwzw59ZnG887KJmz33YtcqqPP 60zgx54S1ANgytK6V08bQ2NCdH2Rn+nSqTo+vBecCUM5BnEbVVimHCVNDil4udApN+gd FHnxiFlUVmFbYoaFeh7EtUMpej6ylBxEPea0VZ1lwRl1FIkk1OpsOMDq5DV3mFiqmkgX pQ2EEnx/89GpGrZXHw8fJ5ld+F0Sab1QwT4JM1TWEaqXEukNFhDbXQm6nNpXPKu/kJw5 qnmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V7O8WBH9; 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 p61-v6si4617222plb.382.2018.10.31.02.19.13; Wed, 31 Oct 2018 02:19:29 -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=V7O8WBH9; 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 S1727791AbeJaSQJ (ORCPT + 99 others); Wed, 31 Oct 2018 14:16:09 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:34695 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726054AbeJaSQJ (ORCPT ); Wed, 31 Oct 2018 14:16:09 -0400 Received: by mail-io1-f65.google.com with SMTP id d80-v6so9168084iof.1 for ; Wed, 31 Oct 2018 02:18:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cqESkq9AtZ7dSGE1LN01rZhHamFgyrI9PHchU5ozMuI=; b=V7O8WBH9OgSrFyUOkFbXYGytQrp4Q9426j5PanxxnvOrLw9kuZC0QnNeMStoIm5q91 Eq0XLy+GpbWCBsyGq2u4w3kFo6BsgDp3x2R+46vbBqUrGfgeWhS5MDSCVs0c33+UwJTk tT0M9egoG2WOSuTrCfOt63TTNXGFpHL6KFtwg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cqESkq9AtZ7dSGE1LN01rZhHamFgyrI9PHchU5ozMuI=; b=eawur8NLfCLIpo/H13j2wsNyR56O0pmUIwEMESYuC0MvCq3/DOFq+WR8cU+7CSlCHs CKkwd1EhJu5Gry57kjVEZMs7HYJZPCbxPMCbgLKwbRclWvH++8EADm95bMg9VjK7sMHe XHTJsGx0hr9fekGNEex5GaHEEwZqWTfiuJtsrWqNts3525V6aKK4M/CgQC+ihTLVtGby n2XSvgJZ7YiJKbEVzmRQ6bsgDpHG0dFZtt1CDWAfWJ5o6R5fDN9U8cUyeuBI4CeQmlxr Jc06InqpB86S9bvWYg6UNz7t0zHPTmb9ROGRgZRkrg9BZ3v3NYMShLAtvKJqolstGFEp P7Cg== X-Gm-Message-State: AGRZ1gKcRQB/tfQsZqpKL8E3fEadvcH/8gckyou8STRogz1zdvgf08/a 2c5AdHBN4TiY7E1unprUk3uCkV5KrndNX9Zl+jYZUQ== X-Received: by 2002:a6b:244:: with SMTP id 65-v6mr1322241ioc.183.1540977531261; Wed, 31 Oct 2018 02:18:51 -0700 (PDT) MIME-Version: 1.0 References: <1540570303-6097-1-git-send-email-vincent.guittot@linaro.org> <1540570303-6097-3-git-send-email-vincent.guittot@linaro.org> <6d0b324e-5e26-a510-9bcd-97f475e515ed@arm.com> In-Reply-To: <6d0b324e-5e26-a510-9bcd-97f475e515ed@arm.com> From: Vincent Guittot Date: Wed, 31 Oct 2018 10:18:39 +0100 Message-ID: Subject: Re: [PATCH v5 2/2] sched/fair: update scale invariance of PELT To: Dietmar Eggemann Cc: Peter Zijlstra , Ingo Molnar , linux-kernel , "Rafael J. Wysocki" , Morten Rasmussen , Patrick Bellasi , Paul Turner , Ben Segall , Thara Gopinath , pkondeti@codeaurora.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dietmar, On Wed, 31 Oct 2018 at 08:20, Dietmar Eggemann wrote: > > On 10/26/18 6:11 PM, Vincent Guittot wrote: > > [...] > > > static int select_idle_sibling(struct task_struct *p, int prev_cpu, int cpu); > > static unsigned long task_h_load(struct task_struct *p); > > @@ -764,7 +763,7 @@ void post_init_entity_util_avg(struct sched_entity *se) > > * such that the next switched_to_fair() has the > > * expected state. > > */ > > - se->avg.last_update_time = cfs_rq_clock_task(cfs_rq); > > + se->avg.last_update_time = cfs_rq_clock_pelt(cfs_rq); > > return; > > } > > } > > There is this 1/cpu scaling of se->avg.util_sum (running_sum) in > update_tg_cfs_runnable() so it can be used to calculate > se->avg.runnable_load_sum (runnable_sum). I guess with your approach > this should be removed. Yes good catch > > > @@ -3466,7 +3465,7 @@ static void detach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *s > > /* Update task and its cfs_rq load average */ > > static inline void update_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) > > { > > - u64 now = cfs_rq_clock_task(cfs_rq); > > + u64 now = cfs_rq_clock_pelt(cfs_rq); > > struct rq *rq = rq_of(cfs_rq); > > int cpu = cpu_of(rq); > > int decayed; > > @@ -6694,6 +6693,12 @@ done: __maybe_unused; > > if (new_tasks > 0) > > goto again; > > > > + /* > > + * rq is about to be idle, check if we need to update the > > + * lost_idle_time of clock_pelt > > + */ > > + update_idle_rq_clock_pelt(rq); > > + > > return NULL; > > } > > [...]