lkml.org 
[lkml]   [2013]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [patch v8 4/9] sched: fix slept time double counting in enqueue entity
From
Alex,

On Fri, Jun 21, 2013 at 4:56 PM, Alex Shi <seakeel@gmail.com> wrote:
> On 06/21/2013 10:50 AM, Lei Wen wrote:
>> I see your point... I made the mistake that update the wrong patch...
>> Please help check this one.
>>
>> commit 5fc3d5c74f8359ef382d9a20ffe657ffc237c109
>> Author: Lei Wen <leiwen@marvell.com>
>> Date: Thu Jun 20 10:43:59 2013 +0800
>>
>> sched: fix potential twice decay issue
>>
>> Signed-off-by: Lei Wen <leiwen@marvell.com>
>>
>> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
>> index c61a614..9640c66 100644
>> --- a/kernel/sched/fair.c
>> +++ b/kernel/sched/fair.c
>> @@ -5856,7 +5856,8 @@ static void switched_from_fair(struct rq *rq,
>> struct task_struct *p)
>> */
>> if (p->se.avg.decay_count) {
>> struct cfs_rq *cfs_rq = cfs_rq_of(&p->se);
>> - __synchronize_entity_decay(&p->se);
>> + p->se.avg.last_runnable_update +=
>> + __synchronize_entity_decay(&p->se);
>
> it is not needed, since the last_runnable_update will be reset if it
> will be switched to fair.

When it is backed to fair class, the only thing scheduler would do
is to check whether it could preempt current running task, so
where to reset the last_runnable_update?

Thanks,
Lei

>
> --
> Thanks
> Alex


\
 
 \ /
  Last update: 2013-06-21 11:41    [W:0.071 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site