From: 王贇 <yun.wang@linux.alibaba.com>
To: Vincent Guittot <vincent.guittot@linaro.org>,
Ben Segall <bsegall@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Juri Lelli <juri.lelli@redhat.com>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Mel Gorman <mgorman@suse.de>,
"open list:SCHEDULER" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH] sched: fix the nonsense shares when load of cfs_rq is too, small
Date: Tue, 10 Mar 2020 11:42:26 +0800 [thread overview]
Message-ID: <49a4dd4a-e7b6-5182-150d-16fff2d101cf@linux.alibaba.com> (raw)
In-Reply-To: <CAKfTPtDKTp_G1VNgAXnh=_yLS_T6YkipOsQQ52tBRp-m612JEw@mail.gmail.com>
On 2020/3/9 下午7:15, Vincent Guittot wrote:
[snip]
>>>> - load = max(scale_load_down(cfs_rq->load.weight), cfs_rq->avg.load_avg);
>>>> + load = max(cfs_rq->load.weight, scale_load(cfs_rq->avg.load_avg));
>>>>
>>>> tg_weight = atomic_long_read(&tg->load_avg);
>>>
>>> Get the point, but IMHO fix scale_load_down() sounds better, to
>>> cover all the similar cases, let's first try that way see if it's
>>> working :-)
>>
>> Yeah, that might not be a bad idea as well; it's just that doing this
>> fix would keep you from losing all your precision (and I'd have to think
>> if that would result in fairness issues like having all the group ses
>> having the full tg shares, or something like that).
>
> AFAICT, we already have a fairness problem case because
> scale_load_down is used in calc_delta_fair() so all sched groups that
> have a weight lower than 1024 will end up with the same increase of
> their vruntime when running.
> Then the load_avg is used to balance between rq so load_balance will
> ensure at least 1 task per CPU but not more because the load_avg which
> is then used will stay null.
>
> That being said, having a min of 2 for scale_load_down will enable us
> to have the tg->load_avg != 0 so a tg_weight != 0 and each sched group
> will not have the full shares. But it will make those group completely
> fair anyway.
> The best solution would be not to scale down the weight but that's a
> bigger change
Does that means a changing for all those 'load.weight' related
calculation, to reserve the scaled weight?
I suppose u64 is capable for 'cfs_rq.load' to reserve the scaled up load,
changing all those places could be annoying but still fine.
However, I'm not quite sure about the benefit, how much more precision
we'll gain and does that really matters? better to have some testing to
demonstrate it.
Regards,
Michael Wang
>
next prev parent reply other threads:[~2020-03-10 3:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-03 14:17 [RFC PATCH] sched: fix the nonsense shares when load of cfs_rq is too, small 王贇
2020-03-03 19:52 ` Peter Zijlstra
2020-03-04 1:19 ` 王贇
2020-03-04 8:47 ` Vincent Guittot
2020-03-04 9:43 ` Vincent Guittot
2020-03-05 1:23 ` 王贇
2020-03-04 9:52 ` Peter Zijlstra
2020-03-04 11:55 ` Vincent Guittot
2020-03-05 1:08 ` 王贇
2020-03-04 8:45 ` Vincent Guittot
2020-03-04 18:47 ` bsegall
2020-03-05 1:14 ` 王贇
2020-03-05 7:53 ` Vincent Guittot
2020-03-06 4:23 ` 王贇
2020-03-06 8:04 ` Vincent Guittot
2020-03-06 9:34 ` 王贇
2020-03-06 19:17 ` bsegall
2020-03-09 11:15 ` Vincent Guittot
2020-03-10 3:42 ` 王贇 [this message]
2020-03-10 7:57 ` Vincent Guittot
2020-03-10 8:15 ` 王贇
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=49a4dd4a-e7b6-5182-150d-16fff2d101cf@linux.alibaba.com \
--to=yun.wang@linux.alibaba.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.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