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] [thread-next>] [day] [month] [year] [list]
Message-ID: <16385ed9-eb44-3ea4-b10a-1e5ef993b33e@redhat.com>
Date:   Fri, 24 Jul 2020 17:31:56 +0200
From:   Daniel Bristot de Oliveira <bristot@...hat.com>
To:     Juri Lelli <juri.lelli@...hat.com>, Peng Liu <iwtbavbm@...il.com>
Cc:     linux-kernel@...r.kernel.org, mingo@...hat.com,
        peterz@...radead.org, vincent.guittot@...aro.org,
        dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
        mgorman@...e.de
Subject: Re: [PATCH] sched/deadline: dome some cleanup for push_dl_task()

On 7/24/20 9:14 AM, Juri Lelli wrote:
> Hi,
> 
> On 07/07/20 00:04, Peng Liu wrote:
>> 'commit 840d719604b0 ("sched/deadline: Update rq_clock of later_rq when pushing a task")'
>> introduced the update_rq_clock() to fix the "used-before-update" bug.
>>
>> 'commit f4904815f97a ("sched/deadline: Fix double accounting of rq/running bw in push & pull")'
>> took away the bug source(add_running_bw()).
>>
>> We no longer need to update rq_clock in advance, let activate_task()
>> worry about that.
>>
>> Signed-off-by: Peng Liu <iwtbavbm@...il.com>
>> ---
>>  kernel/sched/deadline.c | 8 +-------
>>  1 file changed, 1 insertion(+), 7 deletions(-)
>>
>> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
>> index 504d2f51b0d6..c3fa11f84d93 100644
>> --- a/kernel/sched/deadline.c
>> +++ b/kernel/sched/deadline.c
>> @@ -2104,13 +2104,7 @@ static int push_dl_task(struct rq *rq)
>>  
>>  	deactivate_task(rq, next_task, 0);
>>  	set_task_cpu(next_task, later_rq->cpu);
>> -
>> -	/*
>> -	 * Update the later_rq clock here, because the clock is used
>> -	 * by the cpufreq_update_util() inside __add_running_bw().
>> -	 */
>> -	update_rq_clock(later_rq);
>> -	activate_task(later_rq, next_task, ENQUEUE_NOCLOCK);
>> +	activate_task(later_rq, next_task, 0);
>>  	ret = 1;
> The change looks good to me, since now add_running_bw() is called later
> by enqueue_task_dl(), but rq_clock has already been updated by core's
> enqueue_task().
> 
> Daniel, Dietmar, a second pair of eyes (since you authored the commits
> above)?
> 
> I'd chage subject to something like "sched/deadline: Stop updating
> rq_clock before pushing a task".

Looks good to me!

Acked-by: Daniel Bristot de Oliveira <bristot@...hat.com>

Thanks
-- Daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ