lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKfTPtC1DemKu86ykG3G498vq+HpOnj+35LD+s=wovs1OpK-zw@mail.gmail.com>
Date:	Fri, 24 Jun 2016 15:23:37 +0200
From:	Vincent Guittot <vincent.guittot@...aro.org>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Jirka Hladky <jhladky@...hat.com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...hat.com>,
	Kamil Kolakowski <kkolakow@...hat.com>,
	Morten Rasmussen <morten.rasmussen@....com>,
	Yuyang Du <yuyang.du@...el.com>,
	Dietmar Eggemann <dietmar.eggemann@....com>,
	Mike Galbraith <umgwanakikbuti@...il.com>,
	Benjamin Segall <bsegall@...gle.com>,
	Paul Turner <pjt@...gle.com>,
	Matt Fleming <matt@...eblueprint.co.uk>
Subject: Re: Kernel 4.7rc3 - Performance drop 30-40% for SPECjbb2005 and
 SPECjvm2008 benchmarks against 4.6 kernel

On 24 June 2016 at 15:09, Peter Zijlstra <peterz@...radead.org> wrote:
> On Fri, Jun 24, 2016 at 02:44:07PM +0200, Vincent Guittot wrote:
>
>> > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
>> > index 22d64b3f5876..d4f6fb2f3057 100644
>> > --- a/kernel/sched/fair.c
>> > +++ b/kernel/sched/fair.c
>> > @@ -2484,7 +2484,7 @@ static inline long calc_tg_weight(struct task_group *tg, struct cfs_rq *cfs_rq)
>> >          */
>> >         tg_weight = atomic_long_read(&tg->load_avg);
>> >         tg_weight -= cfs_rq->tg_load_avg_contrib;
>> > -       tg_weight += cfs_rq->load.weight;
>> > +       tg_weight += cfs_rq->avg.load_avg;
>>
>> IIUC, you are reverting
>> commit  fde7d22e01aa (sched/fair: Fix overly small weight for
>> interactive group entities)
>
> Ah!, I hadn't yet done a git-blame on this. Right you are, we should
> have put a comment there.
>
> So the problem here is that since commit:
>
>   2159197d6677 ("sched/core: Enable increased load resolution on 64-bit kernels")
>
> load.weight and avg.load_avg are in different metrics. Which completely
> wrecked things.
>
> The obvious alternative is using:
>
>         scale_load_down(cfs_rq->load.weight);
>
> Let me go run that through the benchmark.

Yes, looks to be good alternative

>
>> I have one question regarding the use of cfs_rq->avg.load_avg
>> cfs_rq->tg_load_avg_contrib is the sampling of cfs_rq->avg.load_avg so
>> I'm curious to understand why you use cfs_rq->avg.load_avg instead of
>> keeping cfs_rq->tg_load_avg_contrib. Do you think that the sampling is
>> not accurate enough to prevent any significant difference between both
>> when we use tg->load_avg ?
>
> I'm not entirely sure I understand your question; is it to the existence
> of calc_tg_weight()? That is, why use calc_tg_weight() and not use
> tg->load_avg as is?

Yes

>
> It seemed like a simple and cheap way to increase accuracy, nothing more
> behind it until the commit you referred to.

Thanks for the clarification.
I thought that the difference should always be smaller than 1/64th of
the cfs_rq->avg.load_avg thanks to update_tg_load_avg

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ