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: <158770079266.135303.7831640949542355577@swboyd.mtv.corp.google.com>
Date:   Thu, 23 Apr 2020 20:59:52 -0700
From:   Stephen Boyd <swboyd@...omium.org>
To:     Andy Gross <agross@...nel.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Douglas Anderson <dianders@...omium.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        rafael.j.wysocki@...el.com
Cc:     mka@...omium.org, mkshah@...eaurora.org, evgreen@...omium.org,
        Douglas Anderson <dianders@...omium.org>,
        linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 5/5] soc: qcom: rpmh-rsc: Remove the pm_lock

Quoting Douglas Anderson (2020-04-22 14:55:03)
> It has been postulated that the pm_lock is bad for performance because
> a CPU currently running rpmh_flush() could block other CPUs from
> coming out of idle.  Similarly CPUs coming out of / going into idle
> all need to contend with each other for the spinlock just to update
> the variable tracking who's in PM.
> 
> Let's optimize this a bit.  Specifically:
> 
> - Use a count rather than a bitmask.  This is faster to access and
>   also means we can use the atomic_inc_return() function to really
>   detect who the last one to enter PM was.
> - Accept that it's OK if we race and are doing the flush (because we
>   think we're last) while another CPU is coming out of idle.  As long
>   as we block that CPU if/when it tries to do an active-only transfer
>   we're OK.
> 
> Signed-off-by: Douglas Anderson <dianders@...omium.org>
> ---

Reviewed-by: Stephen Boyd <swboyd@...omium.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ