From: Yuyang Du <yuyang.du@intel.com>
To: Mike Galbraith <umgwanakikbuti@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>, linux-kernel@vger.kernel.org
Subject: Re: 4.3 group scheduling regression
Date: Tue, 13 Oct 2015 04:42:25 +0800 [thread overview]
Message-ID: <20151012204225.GN11102@intel.com> (raw)
In-Reply-To: <1444709314.3362.2.camel@gmail.com>
On Tue, Oct 13, 2015 at 06:08:34AM +0200, Mike Galbraith wrote:
> It sounded like you wanted me to run the below alone. If so, it's a nogo.
Yes, thanks.
Then it is the sad fact that after migrate and removed_load_avg is added
in migrate_task_rq_fair(), we don't get a chance to update the tg so fast
that at the destination the mplayer is weighted to the group's share.
> -----------------------------------------------------------------------------------------------------------------
> Task | Runtime ms | Switches | Average delay ms | Maximum delay ms | Maximum delay at |
> -----------------------------------------------------------------------------------------------------------------
> oink:(8) | 787001.236 ms | 21641 | avg: 0.377 ms | max: 21.991 ms | max at: 51.504005 s
> mplayer:(25) | 4256.224 ms | 7264 | avg: 19.698 ms | max: 2087.489 ms | max at: 115.294922 s
> Xorg:1011 | 1507.958 ms | 4081 | avg: 8.349 ms | max: 1652.200 ms | max at: 126.908021 s
> konsole:1752 | 697.806 ms | 1186 | avg: 5.749 ms | max: 160.189 ms | max at: 53.037952 s
> testo:(9) | 438.164 ms | 2551 | avg: 6.616 ms | max: 215.527 ms | max at: 117.302455 s
> plasma-desktop:1716 | 280.418 ms | 1624 | avg: 3.701 ms | max: 574.806 ms | max at: 53.582261 s
> kwin:1708 | 144.986 ms | 2422 | avg: 3.301 ms | max: 315.707 ms | max at: 116.555721 s
>
> > --
> >
> > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> > index 4df37a4..3dba883 100644
> > --- a/kernel/sched/fair.c
> > +++ b/kernel/sched/fair.c
> > @@ -2686,12 +2686,13 @@ static inline u64 cfs_rq_clock_task(struct cfs_rq *cfs_rq);
> > static inline int update_cfs_rq_load_avg(u64 now, struct cfs_rq *cfs_rq)
> > {
> > struct sched_avg *sa = &cfs_rq->avg;
> > - int decayed;
> > + int decayed, updated = 0;
> >
> > if (atomic_long_read(&cfs_rq->removed_load_avg)) {
> > long r = atomic_long_xchg(&cfs_rq->removed_load_avg, 0);
> > sa->load_avg = max_t(long, sa->load_avg - r, 0);
> > sa->load_sum = max_t(s64, sa->load_sum - r * LOAD_AVG_MAX, 0);
> > + updated = 1;
> > }
> >
> > if (atomic_long_read(&cfs_rq->removed_util_avg)) {
> > @@ -2708,7 +2709,7 @@ static inline int update_cfs_rq_load_avg(u64 now, struct cfs_rq *cfs_rq)
> > cfs_rq->load_last_update_time_copy = sa->last_update_time;
> > #endif
> >
> > - return decayed;
> > + return decayed | updated;
A typo: decayed || updated, but shouldn't make any difference.
> > }
> >
> > /* Update task and its cfs_rq load average */
>
next prev parent reply other threads:[~2015-10-13 4:30 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-05 21:48 CFS scheduler unfairly prefers pinned tasks paul.szabo
2015-10-06 2:45 ` Mike Galbraith
2015-10-06 10:06 ` paul.szabo
2015-10-06 12:17 ` Mike Galbraith
2015-10-06 20:44 ` paul.szabo
2015-10-07 1:28 ` Mike Galbraith
2015-10-08 8:19 ` Mike Galbraith
2015-10-08 10:54 ` paul.szabo
2015-10-08 11:19 ` Peter Zijlstra
2015-10-10 13:22 ` [patch] sched: disable task group re-weighting on the desktop Mike Galbraith
2015-10-10 14:03 ` kbuild test robot
2015-10-10 14:41 ` Mike Galbraith
2015-10-10 17:01 ` Peter Zijlstra
2015-10-10 17:13 ` Peter Zijlstra
2015-10-11 2:25 ` Mike Galbraith
2015-10-11 17:42 ` 4.3 group scheduling regression Mike Galbraith
2015-10-12 7:23 ` Peter Zijlstra
2015-10-12 7:44 ` Mike Galbraith
2015-10-12 8:04 ` Peter Zijlstra
2015-10-12 0:53 ` Yuyang Du
2015-10-12 9:12 ` Peter Zijlstra
2015-10-12 2:12 ` Yuyang Du
2015-10-12 10:23 ` Mike Galbraith
2015-10-12 19:55 ` Yuyang Du
2015-10-13 4:08 ` Mike Galbraith
2015-10-12 20:42 ` Yuyang Du [this message]
2015-10-13 8:06 ` Peter Zijlstra
2015-10-13 0:35 ` Yuyang Du
2015-10-13 8:10 ` Peter Zijlstra
2015-10-13 0:37 ` Yuyang Du
2015-10-12 11:47 ` Peter Zijlstra
2015-10-12 19:32 ` Yuyang Du
2015-10-13 8:07 ` Peter Zijlstra
2015-10-13 2:22 ` Mike Galbraith
2015-10-12 8:48 ` Mike Galbraith
2015-10-10 20:14 ` [patch] sched: disable task group re-weighting on the desktop paul.szabo
2015-10-11 2:38 ` Mike Galbraith
2015-10-11 9:25 ` paul.szabo
2015-10-11 12:49 ` Mike Galbraith
2015-10-11 19:46 ` paul.szabo
2015-10-12 1:59 ` Mike Galbraith
2015-10-08 14:25 ` CFS scheduler unfairly prefers pinned tasks Mike Galbraith
2015-10-08 21:55 ` paul.szabo
2015-10-09 1:56 ` Mike Galbraith
2015-10-09 2:40 ` Mike Galbraith
2015-10-11 9:43 ` paul.szabo
2015-10-10 3:59 ` Wanpeng Li
2015-10-10 7:58 ` Wanpeng Li
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=20151012204225.GN11102@intel.com \
--to=yuyang.du@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=umgwanakikbuti@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).