From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68C48C2D0A3 for ; Thu, 29 Oct 2020 12:24:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 133182076A for ; Thu, 29 Oct 2020 12:24:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726485AbgJ2MYu (ORCPT ); Thu, 29 Oct 2020 08:24:50 -0400 Received: from foss.arm.com ([217.140.110.172]:35088 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725355AbgJ2MYt (ORCPT ); Thu, 29 Oct 2020 08:24:49 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 067BF13A1; Thu, 29 Oct 2020 05:24:49 -0700 (PDT) Received: from e113632-lin (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8C89D3F719; Thu, 29 Oct 2020 05:24:47 -0700 (PDT) References: <20201028174412.680-1-vincent.guittot@linaro.org> User-agent: mu4e 0.9.17; emacs 26.3 From: Valentin Schneider To: Tao Zhou Cc: Vincent Guittot , mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, linux-kernel@vger.kernel.org, morten.rasmussen@arm.com Subject: Re: [PATCH v2] sched/fair: prefer prev cpu in asymmetric wakeup path In-reply-to: Date: Thu, 29 Oct 2020 12:24:45 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/10/20 12:17, Tao Zhou wrote: > Hi Vincent, > > On Wed, Oct 28, 2020 at 06:44:12PM +0100, Vincent Guittot wrote: >> @@ -6173,20 +6173,20 @@ static int >> select_idle_capacity(struct task_struct *p, struct sched_domain *sd, int target) >> { >> unsigned long best_cap = 0; >> - int cpu, best_cpu = -1; >> + int task_util, cpu, best_cpu = -1; >> struct cpumask *cpus; >> >> - sync_entity_load_avg(&p->se); >> - >> cpus = this_cpu_cpumask_var_ptr(select_idle_mask); >> cpumask_and(cpus, sched_domain_span(sd), p->cpus_ptr); >> >> + task_util = uclamp_task_util(p); > > The return type of uclamp_task_util() is *unsigned long*. > But, task_util is *int*. > > @Valentin: I checked that the return type of uclamp_task_util() > is changed from unsigned int to unsigned long by you > Indeed, IIRC I stated in that changelog that the canonical type for utilization / capacity values is unsigned long.