From: Song Muchun <smuchun@gmail.com>
To: mingo@redhat.com, mingo@kernel.org, peterz@infradead.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] sched/fair: Fix update min_vruntime in dequeue_entity()
Date: Sun, 14 Oct 2018 19:26:12 +0800 [thread overview]
Message-ID: <20181014112612.2614-1-smuchun@gmail.com> (raw)
The comment and the code around 2nd update_min_vruntime() are
not in agreement. From commit b60205c7c558 ("sched/fair: Fix
min_vruntime tracking"), I think that we want to update min_vruntime
when a task is sleeping/migrating. So, the check is inverted there.
Fixes: b60205c7c558 ("sched/fair: Fix min_vruntime tracking")
Signed-off-by: Song Muchun <smuchun@gmail.com>
---
kernel/sched/fair.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 585d5726338b..ee271bb661cc 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4003,7 +4003,7 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
* 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)
+ if ((flags & (DEQUEUE_SAVE | DEQUEUE_MOVE)) != DEQUEUE_SAVE)
update_min_vruntime(cfs_rq);
}
--
2.17.1
next reply other threads:[~2018-10-14 11:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-14 11:26 Song Muchun [this message]
2018-10-16 9:15 ` [tip:sched/urgent] sched/fair: Fix the min_vruntime update logic " tip-bot for Song Muchun
-- strict thread matches above, loose matches on Subject: below --
2018-10-08 13:26 [PATCH] sched/fair: Fix update min_vruntime " Song Muchun
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=20181014112612.2614-1-smuchun@gmail.com \
--to=smuchun@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.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
all inboxes | Powered by JetHome®