public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Pavan Kondeti <pkondeti@codeaurora.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>
Subject: Re: min_vruntime update when a task is sleeping/migrating
Date: Thu, 23 Feb 2017 10:50:50 +0100	[thread overview]
Message-ID: <20170223095050.GA6515@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <CAEU1=PnD3KuA-Wau9J7YLsUh_9xO9wFT2DvXSOWJ5HLVtCRHRg@mail.gmail.com>

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);
> }

      reply	other threads:[~2017-02-23  9:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-23  6:15 min_vruntime update when a task is sleeping/migrating Pavan Kondeti
2017-02-23  9:50 ` Peter Zijlstra [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170223095050.GA6515@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=pkondeti@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox