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] [day] [month] [year] [list]
Date:   Sat, 4 Apr 2020 10:31:16 +0800
From:   Yafang Shao <laoar.shao@...il.com>
To:     Johannes Weiner <hannes@...xchg.org>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux MM <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Daniel Drake <drake@...lessm.com>,
        Suren Baghdasaryan <surenb@...gle.com>
Subject: Re: [PATCH] psi: fix randomized calculation in record_times()

On Fri, Apr 3, 2020 at 11:20 PM Johannes Weiner <hannes@...xchg.org> wrote:
>
> On Fri, Apr 03, 2020 at 04:55:25AM -0400, Yafang Shao wrote:
> > @@ -690,7 +690,10 @@ static void psi_group_change(struct psi_group *group, int cpu,
> >        */
> >       write_seqcount_begin(&groupc->seq);
> >
> > -     record_times(groupc, cpu, false);
> > +     if (groupc->total_tasks)
> > +             record_times(groupc, cpu, false);
> > +     else
> > +             groupc->state_start = cpu_clock(cpu);
>
> This change appears is a no-op. If there are no tasks,
> groupc->state_mask is 0, and the only thing record_times() does is
>
>         groupc->state_start = cpu_clock(cpu);
>
> Did you encounter actual problems, or are you just reading the code?

No real issues. Just reading the code and found it looks like a little weird.
But as you explained that state_mask can also guarantee it then we
don't need to make this change.

Thanks for the explanation.

Thanks
Yafang

Powered by blists - more mailing lists