android_kernel_msm-6.1_noth.../include
Joel Fernandes (Google) 66a832fe38 UPSTREAM: rcu: Make call_rcu() lazy to save power
Implement timer-based RCU callback batching (also known as lazy
callbacks). With this we save about 5-10% of power consumed due
to RCU requests that happen when system is lightly loaded or idle.

By default, all async callbacks (queued via call_rcu) are marked
lazy. An alternate API call_rcu_hurry() is provided for the few users,
for example synchronize_rcu(), that need the old behavior.

The batch is flushed whenever a certain amount of time has passed, or
the batch on a particular CPU grows too big. Also memory pressure will
flush it in a future patch.

To handle several corner cases automagically (such as rcu_barrier() and
hotplug), we re-use bypass lists which were originally introduced to
address lock contention, to handle lazy CBs as well. The bypass list
length has the lazy CB length included in it. A separate lazy CB length
counter is also introduced to keep track of the number of lazy CBs.

[ paulmck: Fix formatting of inline call_rcu_lazy() definition. ]
[ paulmck: Apply Zqiang feedback. ]
[ paulmck: Apply s/call_rcu_flush/call_rcu_hurry/ feedback from Tejun Heo. ]

Suggested-by: Paul McKenney <paulmck@kernel.org>
Acked-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
(cherry picked from commit 3cb278e73be58bfb780ecd55129296d2f74c1fb7)

Bug: 258241771
Signed-off-by: Joel Fernandes <joelaf@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4909030
Reviewed-by: Vineeth Pillai <vineethrp@google.com>
Signed-off-by: Qais Yousef <qyousef@google.com>
Change-Id: I557d5af2a5d317bd66e9ec55ed40822bb5c54390
2024-01-19 00:10:44 +00:00
..
acpi ACPI: sleep: Avoid breaking S3 wakeup due to might_sleep() 2023-06-28 11:12:22 +02:00
asm-generic Merge 6.1.45 into android14-6.1-lts 2023-09-13 19:32:45 +00:00
clocksource
crypto Revert "crypto: api - Use work queue in crypto_destroy_instance" 2023-10-12 12:03:37 +00:00
drm Revert "drm/aperture: Remove primary argument" 2023-11-01 14:38:16 +00:00
dt-bindings dt-bindings: clock: qcom,gcc-sc8280xp: Add missing GDSCs 2023-09-13 09:42:45 +02:00
keys
kunit
kvm Merge 6.1.47 into android14-6.1-lts 2023-09-13 19:35:46 +00:00
linux UPSTREAM: rcu: Make call_rcu() lazy to save power 2024-01-19 00:10:44 +00:00
math-emu
media Revert "media: cec: core: add adap_nb_transmit_canceled() callback" 2023-10-12 14:10:23 +00:00
memory
misc
net ANDROID: KMI workaround for CONFIG_NETFILTER_FAMILY_BRIDGE 2024-01-09 23:37:43 +00:00
pcmcia
ras
rdma RDMA/cma: Always set static rate to 0 for RoCE 2023-06-21 16:00:59 +02:00
rv
scsi Revert "ata,scsi: do not issue START STOP UNIT on resume" 2023-11-02 07:06:05 +00:00
soc net: mscc: ocelot: don't keep PTP configuration of all ports in single structure 2023-07-19 16:22:01 +02:00
sound BACKPORT: ASoC: add snd_soc_card_mutex_lock/unlock() 2023-11-30 18:09:27 +00:00
target scsi: target: Fix multiple LUN_RESET handling 2023-05-11 23:03:19 +09:00
trace ANDROID: vendor_hooks: add hooks in driver/android/binder.c 2024-01-17 02:22:48 +00:00
uapi FROMGIT: wifi: nl80211: Extend del pmksa support for SAE and OWE security 2024-01-11 05:46:54 +00:00
ufs FROMLIST: scsi: ufs: core: Export symbols for MTK driver module 2023-07-04 09:08:44 +00:00
vdso
video
xen ACPI: processor: Fix evaluating _PDC method when running as Xen dom0 2023-05-11 23:03:11 +09:00