Commit cef85fee authored by Joel Fernandes (Google)'s avatar Joel Fernandes (Google) Committed by Chromeos LUCI
Browse files

FROMGIT: percpu-refcount: Use call_rcu_flush() for atomic switch

call_rcu() changes to save power will slow down the percpu refcounter's
"per-CPU to atomic switch" path. The primitive uses RCU when switching to
atomic mode. The enqueued async callback wakes up waiters waiting in the
percpu_ref_switch_waitq. Due to this, per-CPU refcount users will slow down,
such as blk_pre_runtime_suspend().

Use the call_rcu_flush() API instead which reverts to the old behavior.

(cherry picked from commit ab27dad9baf60339ff5293249a45f6ef88554536
 https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git

 rcu/next)

BUG=b:222463781
TEST=powerIdle lab tests.

Signed-off-by: default avatarJoel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: default avatarJoel Fernandes <joelaf@google.com>
Signed-off-by: default avatarParshuram Sangle <parshuram.sangle@intel.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/3965074


Reviewed-by: default avatarRoss Zwisler <zwisler@google.com>
Change-Id: If479fa3ee22258f656016e438b2ba0686196a065
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4069543
parent 90f8b925
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment