Re: [PATCH v2] sched/fair: prefer prev cpu in asymmetric wakeup path
From: Valentin Schneider
Date: Thu Oct 29 2020 - 08:24:51 EST
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.