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]
Date:   Mon, 14 Oct 2019 17:03:27 +0100
From:   Valentin Schneider <valentin.schneider@....com>
To:     Quentin Perret <qperret@...gle.com>
Cc:     Vincent Guittot <vincent.guittot@...aro.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Dietmar Eggemann <Dietmar.Eggemann@....com>,
        Morten Rasmussen <morten.rasmussen@....com>,
        Quentin Perret <qperret@...rret.net>,
        "# v4 . 16+" <stable@...r.kernel.org>
Subject: Re: [PATCH] sched/topology: Disable sched_asym_cpucapacity on domain
 destruction

On 14/10/2019 14:52, Quentin Perret wrote:
> Right, but that's not possible by definition -- static keys aren't
> variables. The static keys for asym CPUs and for EAS are just to
> optimize the case when they're disabled, but when they _are_ enabled,
> you have no choice but do another per-rd check.
> 

Bleh, right, realized my nonsense after sending the email.

> And to clarify what I tried to say before, it might be possible to
> 'count' the number of RDs that have SD_ASYM_CPUCAPACITY set using
> static_branch_inc()/dec(), like we do for the SMT static key. I remember
> trying to do something like that for EAS, but that was easier said than
> done ... :)
> 

Gotcha, the reason I didn't go with this is that I wanted to maintain
the relationship between the key and the flag (you either have both or none).
It feels icky to have the key set and to have a NULL sd_asym_cpucapacity
pointer.

An alternative might be to have a separate counter for asymmetric rd's,
always disable the key on domain destruction and use that counter to figure
out if we need to restore it. If we don't care about having a NULL SD
pointer while the key is set, we could use the included counter as you're
suggesting. 

> Thanks,
> Quentin
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ