Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1586660 > unrolled thread

min_vruntime update when a task is sleeping/migrating

Started byPavan Kondeti <pkondeti@codeaurora.org>
First post2017-02-23 07:20 +0100
Last post2017-02-23 11:00 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  min_vruntime update when a task is sleeping/migrating Pavan Kondeti <pkondeti@codeaurora.org> - 2017-02-23 07:20 +0100
    Re: min_vruntime update when a task is sleeping/migrating Peter Zijlstra <peterz@infradead.org> - 2017-02-23 11:00 +0100

#1586660 — min_vruntime update when a task is sleeping/migrating

FromPavan Kondeti <pkondeti@codeaurora.org>
Date2017-02-23 07:20 +0100
Subjectmin_vruntime update when a task is sleeping/migrating
Message-ID<tdUUV-5HO-1@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1586789

FromPeter Zijlstra <peterz@infradead.org>
Date2017-02-23 11:00 +0100
Message-ID<tdYlP-7YH-15@gated-at.bofh.it>
In reply to#1586660
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);
> }

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web