lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ce019e81-7758-4586-b54b-1d9e078f9ca4@bytedance.com>
Date: Mon, 29 Jul 2024 16:20:38 +0800
From: Chuyi Zhou <zhouchuyi@...edance.com>
To: Dietmar Eggemann <dietmar.eggemann@....com>, mingo@...hat.com,
 peterz@...radead.org, juri.lelli@...hat.com, vincent.guittot@...aro.org,
 rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de, vschneid@...hat.com
Cc: chengming.zhou@...ux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] sched/fair: Sync se's load_avg with cfs_rq in
 reweight_task

Hello,

在 2024/7/29 15:56, Dietmar Eggemann 写道:
> On 23/07/2024 13:42, Chuyi Zhou wrote:
>> In reweight_task(), there are two situations:
>>
>> 1. The task was on_rq, then the task's load_avg is accurate because we
>> synchronized it with cfs_rq through update_load_avg() in dequeue_task().
> 
> Just asking: That's the dequeue_task() in __sched_setscheduler() or
> set_user_nice()? Maybe this is worth mentioning here?

OK.

> 
> [...]
> 
>> @@ -3795,7 +3816,9 @@ static void reweight_entity(struct cfs_rq *cfs_rq, struct sched_entity *se,
>>   		if (!curr)
>>   			__dequeue_entity(cfs_rq, se);
>>   		update_load_sub(&cfs_rq->load, se->load.weight);
>> -	}
>> +	} else if (entity_is_task(se))
>> +		sync_entity_load_avg(se);
>> +
> 
> IMHO, the 'if else' path needs braces. See
> Documentation/process/coding-style.rst '3) Placing Braces and Spaces'.

Thanks, will fix it in next version.

> 
>>   	dequeue_load_avg(cfs_rq, se);
>>   
>>   	if (se->on_rq) {
> 
> [...]
> 
> Reviewed-by: Dietmar Eggemann <dietmar.eggemann@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ