From: Yuyang Du <yuyang.du@intel.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: peterz@infradead.org, linux-kernel@vger.kernel.org,
pjt@google.com, bsegall@google.com, morten.rasmussen@arm.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
lizefan@huawei.com
Subject: Re: [PATCH 1/4] sched/fair: Generalize the load/util averages resolution definition
Date: Tue, 6 Oct 2015 16:00:00 +0800 [thread overview]
Message-ID: <20151006080000.GH11102@intel.com> (raw)
In-Reply-To: <20151005070445.GA10526@gmail.com>
On Mon, Oct 05, 2015 at 09:04:45AM +0200, Ingo Molnar wrote:
>
> * Yuyang Du <yuyang.du@intel.com> wrote:
>
> > +# define SCHED_RESOLUTION_SHIFT 10
>
> > #if 0 /* BITS_PER_LONG > 32 -- currently broken: it increases power usage under light load */
>
> Might be worth fixing?
Yes, it should be. Peter has already brought this up.
> Also, I noticed this:
>
> > -# define SCHED_LOAD_RESOLUTION 10
> > +# define SCHED_LOAD_SHIFT (SCHED_RESOLUTION_SHIFT + SCHED_RESOLUTION_SHIFT)
>
> So in the #if 0 (inactive) section we change it from 10 to 20 ...
>
> > -# define SCHED_LOAD_RESOLUTION 0
> > +# define SCHED_LOAD_SHIFT (SCHED_RESOLUTION_SHIFT)
> > # define scale_load(w) (w)
> > # define scale_load_down(w) (w)
> > #endif
> >
> > -#define SCHED_LOAD_SHIFT (10 + SCHED_LOAD_RESOLUTION)
>
> ... then we change the actually active definition from 20 to 10?
>
> Was that intended?
Yes, it is intended. And it is atually the same question as your previous
one.
This is about whether we have the discrepancy between weight (user can
assign) and load (used by CFS to charge the task).
And this is about the precison of charging vs. the precision of the
proportional runtime (weight) the CFS promises to provide.
As charging happens millions of times, accumulative error is the concern.
The comments said increasing load resolution improves the small weight
task share distribution.
However, as charging is done like runtime / load, runtime is real time
in ns, a big numbeer, so higher/bigger load may lead to more drift?
Because the error of the integer division is about the same as the divider?
Or as higher load is used, maybe we fix this (remove the bloody #if 0)
by making it a CONFIG_ ?
> Please double check the 'make allyesconfig' disassembly of kernel/sched/built-in.o
> before/after this patch to make sure it does not change any code.
>
> ( No full allyesconfig build needed: 'make -j16 kernel/sched' should cut down on
> the build time. )
I checked. Unfortunately, before differs from after. But the difference
should not be caused by this patch, as this patch does not make any
difference after macro expansion.
> Thanks,
>
> Ingo
next prev parent reply other threads:[~2015-10-06 15:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-04 17:56 [PATCH 0/4] sched/fair: Clean up sched metric definitions Yuyang Du
2015-10-04 17:56 ` [PATCH 1/4] sched/fair: Generalize the load/util averages resolution definition Yuyang Du
2015-10-05 7:04 ` Ingo Molnar
2015-10-06 8:00 ` Yuyang Du [this message]
2015-10-09 23:04 ` Yuyang Du
2015-10-05 10:52 ` Peter Zijlstra
2015-10-04 17:56 ` [PATCH 2/4] sched/fair: Remove SCHED_LOAD_SHIFT and SCHED_LOAD_SCALE Yuyang Du
2015-10-06 9:29 ` Vincent Guittot
2015-10-04 17:56 ` [PATCH 3/4] sched/fair: Remove scale_load_down() for load_avg Yuyang Du
2015-10-04 17:56 ` [PATCH 4/4] sched/fair: Rename scale_load() and scale_load_down() Yuyang Du
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=20151006080000.GH11102@intel.com \
--to=yuyang.du@intel.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=mingo@kernel.org \
--cc=morten.rasmussen@arm.com \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.