* min_vruntime update when a task is sleeping/migrating
@ 2017-02-23 6:15 Pavan Kondeti
2017-02-23 9:50 ` Peter Zijlstra
0 siblings, 1 reply; 2+ messages in thread
From: Pavan Kondeti @ 2017-02-23 6:15 UTC (permalink / raw)
To: linux-kernel, Peter Zijlstra
Hi Peter,
The comment and the code around 2nd update_min_vruntime() call in
dequeue_entity() are not matching. If I understand commit b60205c7c558
("sched/fair: Fix min_vruntime tracking") correctly, the check is
inverted there. We want to update min_vruntime when a task is
sleeping/migrating. is my understanding right?
static void
dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
{
<snip>
/*
* Now advance min_vruntime if @se was the entity holding it back,
* except when: DEQUEUE_SAVE && !DEQUEUE_MOVE, in this case we'll be
* put back on, and if we advance min_vruntime, we'll be placed back
* further than we started -- ie. we'll be penalized.
*/
if ((flags & (DEQUEUE_SAVE | DEQUEUE_MOVE)) == DEQUEUE_SAVE)
update_min_vruntime(cfs_rq);
}
Thanks,
Pavan
--
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a
Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: min_vruntime update when a task is sleeping/migrating
2017-02-23 6:15 min_vruntime update when a task is sleeping/migrating Pavan Kondeti
@ 2017-02-23 9:50 ` Peter Zijlstra
0 siblings, 0 replies; 2+ messages in thread
From: Peter Zijlstra @ 2017-02-23 9:50 UTC (permalink / raw)
To: Pavan Kondeti; +Cc: linux-kernel, Ingo Molnar
On Thu, Feb 23, 2017 at 11:45:26AM +0530, Pavan Kondeti wrote:
> Hi Peter,
>
> The comment and the code around 2nd update_min_vruntime() call in
> dequeue_entity() are not matching. If I understand commit b60205c7c558
> ("sched/fair: Fix min_vruntime tracking") correctly, the check is
> inverted there. We want to update min_vruntime when a task is
> sleeping/migrating. is my understanding right?
Hurm, yes that comment and the code are not in agreement :/
Having gone over the code again, I think the comment is right and the
code is wrong, but it would be good to double check that.
> static void
> dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
> {
>
> <snip>
> /*
> * Now advance min_vruntime if @se was the entity holding it back,
> * except when: DEQUEUE_SAVE && !DEQUEUE_MOVE, in this case we'll be
> * put back on, and if we advance min_vruntime, we'll be placed back
> * further than we started -- ie. we'll be penalized.
> */
> if ((flags & (DEQUEUE_SAVE | DEQUEUE_MOVE)) == DEQUEUE_SAVE)
> update_min_vruntime(cfs_rq);
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-23 9:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-23 6:15 min_vruntime update when a task is sleeping/migrating Pavan Kondeti
2017-02-23 9:50 ` Peter Zijlstra
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.