ANDROID: rxrpc: Use call_rcu_hurry() instead of call_rcu()

call_rcu() changes to save power may cause slowness. Use the
call_rcu_hurry() API instead which reverts to the old behavior.

We find this via inspection that the RCU callback does a wakeup of a
thread. This usually indicates that something is waiting on it. To be
safe, let us use call_rcu_hurry() here instead.

[ joel: Upstream is rewriting this code, so I am merging this as a CHROMIUM
  patch. There is no harm in including it.
  Link: https://lore.kernel.org/rcu/658624.1669849522@warthog.procyon.org.uk/#t ]

Bug: 258241771
Bug: 222463781
Test: CQ
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Change-Id: Iaadfe2f9db189489915828c6f2f74522f4b90ea3
Signed-off-by: Joel Fernandes <joelaf@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/3965078
Reviewed-by: Ross Zwisler <zwisler@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4318055
Reviewed-by: Vineeth Pillai <vineethrp@google.com>
(cherry picked from commit 1f98f32393f83d14bc290fef06d5b3132bee23e0)
[Cherry picked from chromeos-5.15 tree. Minor tweaks to commit message
to match Android style]
Signed-off-by: Qais Yousef <qyousef@google.com>
This commit is contained in:
Joel Fernandes (Google)
2022-10-16 16:23:04 +00:00
committed by Treehugger Robot
parent 930bdc0924
commit a4124a21b1

View File

@@ -253,7 +253,7 @@ void rxrpc_kill_connection(struct rxrpc_connection *conn)
* must carry a ref on the connection to prevent us getting here whilst
* it is queued or running.
*/
call_rcu(&conn->rcu, rxrpc_destroy_connection);
call_rcu_hurry(&conn->rcu, rxrpc_destroy_connection);
}
/*