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: <CAKfTPtCc0pgxnBU4YN5mSxDqfq9k7=qEWE2nDp+MipPNsTwzWw@mail.gmail.com>
Date:   Thu, 7 Jun 2018 10:44:26 +0200
From:   Vincent Guittot <vincent.guittot@...aro.org>
To:     Dietmar Eggemann <dietmar.eggemann@....com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...nel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Juri Lelli <juri.lelli@...hat.com>,
        Morten Rasmussen <Morten.Rasmussen@....com>,
        viresh kumar <viresh.kumar@...aro.org>,
        Valentin Schneider <valentin.schneider@....com>,
        Quentin Perret <quentin.perret@....com>
Subject: Re: [PATCH v5 07/10] sched/irq: add irq utilization tracking

On 7 June 2018 at 10:29, Dietmar Eggemann <dietmar.eggemann@....com> wrote:
> On 06/06/2018 06:06 PM, Vincent Guittot wrote:
>>
>> Hi Dietmar,
>>
>> Sorry for the late answer
>>
>> On 31 May 2018 at 18:54, Dietmar Eggemann <dietmar.eggemann@....com>
>> wrote:
>>>
>>> On 05/30/2018 08:45 PM, Vincent Guittot wrote:
>>>>
>>>> Hi Dietmar,
>>>>
>>>> On 30 May 2018 at 17:55, Dietmar Eggemann <dietmar.eggemann@....com>
>>>> wrote:
>>>>>
>>>>> On 05/25/2018 03:12 PM, Vincent Guittot wrote:
>>>
>>>
>>> [...]
>>>
>>>>>> +        */
>>>>>> +       ret = ___update_load_sum(rq->clock - running, rq->cpu,
>>>>>> &rq->avg_irq,
>>>>>> +                               0,
>>>>>> +                               0,
>>>>>> +                               0);
>>>>>> +       ret += ___update_load_sum(rq->clock, rq->cpu, &rq->avg_irq,
>>>>>> +                               1,
>>>>>> +                               1,
>>>>>> +                               1);
>>>
>>>
>>> Can you not change the function parameter list to the usual
>>> (u64 now, struct rq *rq, int running)?
>>>
>>> Something like this (only compile and boot tested):
>>
>>
>> To be honest, I prefer to keep the specific sequence above in a
>> dedicated function instead of adding it in core code.
>
>
> No big issue.
>
>> Furthermore,  we end up calling call twice ___update_load_avg instead
>> of only once. This will set an intermediate and incorrect value in
>> util_avg and this value can be read in the meantime
>
>
> Can't buy this argument though because this is true with the current
> implementation as well since the 'decay load sum' - 'accrue load sum'
> sequence is not atomic.

it's not a problem that the _sum variable are updated in different
step because there are internal variable
Only util_avg is used "outside" and the latter is updated after both
idle and running steps have been applied

>
> What about calling update_irq_load_avg(rq, 0) in update_rq_clock_task() if
> (irq_delta + steal) eq. 0 and sched_feat(NONTASK_CAPACITY) eq. true in this
> #ifdef CONFIG_XXX_TIME_ACCOUNTING block?

update_irq_load_avg(rq, 0) is called in update_blocked_averages to
decay smoothly like other blocked signals and replace the need to call
update_irq_load_avg(rq, 0) for every call to update_rq_clock_task()
which can be significant

>
> Maintaining a irq/steal time signal makes only sense if at least one of the
> CONFIG_XXX_TIME_ACCOUNTING is set and NONTASK_CAPACITY is true. The call to
> update_irq_load_avg() in update_blocked_averages() isn't guarded my them.

good point

>
> [...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ