Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp3256492ima; Tue, 23 Oct 2018 03:02:03 -0700 (PDT) X-Google-Smtp-Source: ACcGV63wPGNyP7oMcL+tc0kjooOAAiXxCkqMDcmb/sC5v0SHDByVzIdCBIzVrib+Nx/uLTzBSO6j X-Received: by 2002:a63:ec4b:: with SMTP id r11-v6mr45653127pgj.295.1540288923378; Tue, 23 Oct 2018 03:02:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540288923; cv=none; d=google.com; s=arc-20160816; b=a8g7a7Mha6O2XeHrslPViVMK8dWZFUpokhoqK+mi8PRIs9xJBnZGkGT7Nz+6+umaJb blFQ9wPu6tM6WzEyZvFS9QPAEFVXZygQalDub0xYs38jWicpXe02kOrl/Rn//P4SJ1pW xiH4UmnfjPAVSzplmhgrBh0C8CU2Lxg33wDTMc75YDxzdY10kuKPDBOFs+PIgoI6xyqA Hc9xzLjf3iPqEcffzWH4PReaqHAPHrPAy2/QMN14gKT0yiKK6pN/3FOaPuRaAAs+gEhQ bAC9nvWk3jsjZi+oCBp116ANTItWq+VRbz809tWeg5UBJq6yuWcFzgVlkfaoQwwjGXan Zc1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=aowGkJCJmkF+rGz8nllz8ppIt/CMUE5RB6sGSpqj2oQ=; b=ZUTZKfn/TJE9T3QbLIu+hkoxF+ir/FwE2Ajuctj+9ZLKGCdK2cldo6ODT7svKfyp6N En+vXqo8blF7H9lpD0skFU5D2GC1VlJd6zKRnqt4p6QKsY7eKG3MrZ7yYNXNqhScUztt n6KvrFndgSx17eDSLQpEkce45+hUyX0YSAmRw1/aR7Cw7liIJ3Z38m4h5seBvALeaTC/ bWqZ+QD1qjbc00zwCpUSh1Fv2xq/VIdWIXFrnAiBtyMnAb6cQHgn4hlFeV5MnVcjScwT HtezJApypDxAXGHRzek7m0Goyeef8fVbT3/YOEyP+7QTY+bcOcQ8myvQtT1rbbRHFpli tJHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b="Sq/wyM4o"; 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 v8-v6si867358pgo.220.2018.10.23.03.01.47; Tue, 23 Oct 2018 03:02:03 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b="Sq/wyM4o"; 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 S1728960AbeJWSX6 (ORCPT + 99 others); Tue, 23 Oct 2018 14:23:58 -0400 Received: from merlin.infradead.org ([205.233.59.134]:48512 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728920AbeJWSX6 (ORCPT ); Tue, 23 Oct 2018 14:23:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=aowGkJCJmkF+rGz8nllz8ppIt/CMUE5RB6sGSpqj2oQ=; b=Sq/wyM4oE4GpWsyT8gkjAAt8t 50jwiFwMOEPcl+Gmv6xa94nwRCU7VPKFE0ol39ufH1g0r5zel4bkqePdmUjDDwwgkbzBCbGj6TsvT wWDIuA7Sq0A26WKYk3LnXzHK22nELGHAyZJYpxyluCwCAUvLEn2xkknPl6sXrFSI5JCCgIBUYpyh9 YQABjhdsrDRdRfhHBsv2dz6vlblHvwT9Oi6pMYmOyyJR4R2BbgR3WBhpi7axpm4gs9KfWbAFIsar2 qa3lWApkduV1KCBeDopURNOtX/uuMVYqLuZu9NUQRCOYqZZ6yZHG40H0dg8dKWxzJ3rx0sYbVmtOn xc7lcsodw==; Received: from [185.7.230.214] (helo=worktop) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gEtUm-00017Q-HU; Tue, 23 Oct 2018 10:01:07 +0000 Received: by worktop (Postfix, from userid 1000) id 953046E08B3; Tue, 23 Oct 2018 12:00:57 +0200 (CEST) Date: Tue, 23 Oct 2018 12:00:57 +0200 From: Peter Zijlstra To: Vincent Guittot Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, 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 Subject: Re: [PATCH v4 2/2] sched/fair: update scale invariance of PELT Message-ID: <20181023100057.GJ3109@worktop.c.hoisthospitality.com> References: <1539965871-22410-1-git-send-email-vincent.guittot@linaro.org> <1539965871-22410-3-git-send-email-vincent.guittot@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1539965871-22410-3-git-send-email-vincent.guittot@linaro.org> User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 19, 2018 at 06:17:51PM +0200, Vincent Guittot wrote: > In order to achieve this time scaling, a new clock_pelt is created per rq. > diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h > index 3990818..d987f50 100644 > --- a/kernel/sched/sched.h > +++ b/kernel/sched/sched.h > @@ -848,6 +848,8 @@ struct rq { > unsigned int clock_update_flags; > u64 clock; > u64 clock_task; > + u64 clock_pelt; > + unsigned long lost_idle_time; Very clever that. Seems to work out nicely. We should maybe look at ensuring all these clock fields are indeed on the same cacheline.