Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3795265yba; Tue, 7 May 2019 07:13:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqzOfLP42mMaFiXbKKVDDwmM0vpSYDWIl0LO6zf4jKX9vXaG2OWzTdFW6SXFCafXAcN7QP13 X-Received: by 2002:a62:6d47:: with SMTP id i68mr10114369pfc.189.1557238420601; Tue, 07 May 2019 07:13:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557238420; cv=none; d=google.com; s=arc-20160816; b=HUh46oB9eFPzaRkVZaE5jvEG5q7SKXcfANoitypX7+jxKYT6ZcETitOgJcOJSxaJ9Y bXIqkfU24db5q2KY8H8Ks3AHhxQWoTZW6kiPeBSOV7Ns16x+BN6k3xRxHYahqir6hboX yLrypTk8Agaum9uUo0LrlYwL8F8OicQA/PDjQpgxQ8HLeszYAekwHGGd06kDqQaHERjS RiRvTXuKjg0weac3xJU3LJM1djFXDuYJfAmVvpWyUpOKxJnY1hheUtI6x00SJQGPC5da E5vp/vT3Zz12HflWAB0fRW7kmv0CTrODAM4IV7K12pquO6oo3iXRuDR7gGoj8BCn8EoQ LMzA== 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; bh=eATTyYNJzihqTT6/r3y3Ux1qI5OhO66c4cbhQHa9Eag=; b=VKjL2OXly7s8mdbVffgKeVY1lWQJc7yHkk7KlO6VqOjtyA6B2VpIHDCPLc4wgjfv1X 8DQLN38bB0OU+YVHD0SxcrbnRhcDjrqHAUid9DvC9od9PkJBRhHts7HcLLdd+/aZiFPu 1Z1YNGtLVHTEncX0R/MC96p8OUmF7WHtRkMWWf7kPwEl4SZ0ZIVZfHYAW648foD04T5a wWY/p6FpglbwfdN/QjLRwV+RkGe8mSQ49i7pDvKXDb9d2Kn/+aOQNlH7NPRrC8XrM6sX gNM4EVn7URyWqERHYrsJSt9LHRStSwGjmaKEmYSpCT3YbgaAVMewzn0tVQnHhy/cDBKJ ejow== 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 p8si19074714plq.225.2019.05.07.07.13.23; Tue, 07 May 2019 07:13:40 -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; 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 S1726713AbfEGOKy (ORCPT + 99 others); Tue, 7 May 2019 10:10:54 -0400 Received: from foss.arm.com ([217.140.101.70]:55572 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726340AbfEGOKy (ORCPT ); Tue, 7 May 2019 10:10:54 -0400 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 4F48880D; Tue, 7 May 2019 07:10:54 -0700 (PDT) Received: from queper01-lin (queper01-lin.cambridge.arm.com [10.1.195.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C35FE3F5C1; Tue, 7 May 2019 07:10:51 -0700 (PDT) Date: Tue, 7 May 2019 15:10:50 +0100 From: Quentin Perret To: Luca Abeni Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Rafael J . Wysocki" , Ingo Molnar , Peter Zijlstra , Vincent Guittot , "Paul E . McKenney" , Joel Fernandes , Luc Van Oostenryck , Morten Rasmussen , Juri Lelli , Daniel Bristot de Oliveira , Patrick Bellasi , Tommaso Cucinotta Subject: Re: [RFC PATCH 2/6] sched/dl: Capacity-aware migrations Message-ID: <20190507141048.d45ia7qfytnfdhqc@queper01-lin> References: <20190506044836.2914-1-luca.abeni@santannapisa.it> <20190506044836.2914-3-luca.abeni@santannapisa.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190506044836.2914-3-luca.abeni@santannapisa.it> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday 06 May 2019 at 06:48:32 (+0200), Luca Abeni wrote: > static inline unsigned long cpu_bw_dl(struct rq *rq) > { > - return (rq->dl.running_bw * SCHED_CAPACITY_SCALE) >> BW_SHIFT; > + unsigned long res; > + > + res = (rq->dl.running_bw * SCHED_CAPACITY_SCALE) >> BW_SHIFT; > + > + return (res << SCHED_CAPACITY_SHIFT) / > + arch_scale_cpu_capacity(NULL, rq->cpu); The only user of cpu_bw_dl() is schedutil right ? If yes, we probably don't want to scale things here -- schedutil already does this I believe. Thanks, Quentin > } > > static inline unsigned long cpu_util_dl(struct rq *rq) > -- > 2.20.1 >