From: Vincent Guittot <vincent.guittot@linaro.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: 王贇 <yun.wang@linux.alibaba.com>, "Ingo Molnar" <mingo@redhat.com>,
"Juri Lelli" <juri.lelli@redhat.com>,
"Dietmar Eggemann" <dietmar.eggemann@arm.com>,
"Steven Rostedt" <rostedt@goodmis.org>,
"Ben Segall" <bsegall@google.com>, "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: Wed, 4 Mar 2020 12:55:21 +0100 [thread overview]
Message-ID: <CAKfTPtDrSzET+=G7rHvhDY3491CzGvp3ZqW0cqR8jhC1EvC2mQ@mail.gmail.com> (raw)
In-Reply-To: <20200304095209.GK2596@hirez.programming.kicks-ass.net>
On Wed, 4 Mar 2020 at 10:52, Peter Zijlstra <peterz@infradead.org> wrote:
>
> On Wed, Mar 04, 2020 at 09:47:34AM +0100, Vincent Guittot wrote:
> > you will add +1 of nice prio for each device
> >
> > should we use instead
> > # define scale_load_down(w) ((w >> SCHED_FIXEDPOINT_SHIFT) ? (w >>
> > SCHED_FIXEDPOINT_SHIFT) : MIN_SHARES)
>
> That's '((w >> SHIFT) ?: MIN_SHARES)', but even that is not quite right.
>
> I think we want something like:
>
> #define scale_load_down(w) \
> ({ unsigned long ___w = (w); \
> if (___w) \
> ____w = max(MIN_SHARES, ___w >> SHIFT); \
> ___w; })
>
> That is, we very much want to retain 0 I'm thinking.
yes, you're right
next prev parent reply other threads:[~2020-03-04 11:55 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 [this message]
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 ` 王贇
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='CAKfTPtDrSzET+=G7rHvhDY3491CzGvp3ZqW0cqR8jhC1EvC2mQ@mail.gmail.com' \
--to=vincent.guittot@linaro.org \
--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=yun.wang@linux.alibaba.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).