lkml.org 
[lkml]   [2020]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 5/5] soc: qcom: rpmh-rsc: Remove the pm_lock
From
Date
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@chromium.org>
> ---

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

\
 
 \ /
  Last update: 2020-04-24 06:00    [W:0.083 / U:0.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site