dragonheart_kernel_oneplus_.../include
Sultan Alsawaf 4e0458a047
mm: Replace shrinker rwsem with fine-grained locks
The shrinker rwsem is problematic because the actual shrinking path must
back off when contention appears, causing some or all shrinkers to be
skipped. This can be especially bad when shrinkers are frequently
registered and unregistered. A high frequency of shrinker registrations/
unregistrations can effectively DoS the shrinker mechanism, rendering it
useless.

We can't use SRCU here because it would unilaterally shift the burden
back onto the registration/unregistration paths, which defeats the
purpose of why the back-off mechanism was added in the first place.

Using fine-grained locks and a rwsem at the per-shrinker level to
protect the shrinker list rather than a global rwsem lets us balance the
burden equally, eliminating the issue. Now, shrinking can happen
concurrently with shrinker registrations/unregistrations, without either
side being favored more than the other.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
2021-11-16 23:08:49 +08:00
..
acpi
asm-generic kbuild: Fix asm-generic/vmlinux.lds.h for LD_DEAD_CODE_DATA_ELIMINATION 2021-11-10 15:49:09 +08:00
clocksource
crypto crypto: streebog - add Streebog hash function 2021-11-16 23:05:58 +08:00
drm include: Import OnePlus Changes 2021-11-10 05:00:27 +08:00
dt-bindings dt-bindings: thermal: Add qmi QPM sensors support 2020-09-15 04:20:25 -07:00
keys
kvm
linux mm: Replace shrinker rwsem with fine-grained locks 2021-11-16 23:08:49 +08:00
math-emu
media Merge android-4.14-stable.180 (816f245) into msm-4.14 2020-08-05 11:41:56 +05:30
memory
microvisor
misc
net FROMGIT: net-tcp_rate: account for CE marks in rate sample 2021-11-10 15:49:27 +08:00
pcmcia
ras
rdma
scsi include: Import OnePlus Changes 2021-11-10 05:00:27 +08:00
slalib include: Import OnePlus Changes 2021-11-10 05:00:27 +08:00
soc icnss: Fix log spam caused by wrong paired PM operation for ICNSS 2021-11-16 23:06:46 +08:00
sound Merge android-4.14-stable.190 (d2d05bc) into msm-4.14 2020-09-06 01:12:33 +05:30
target
trace sched: Add support to spread tasks 2021-11-10 16:13:47 +08:00
uapi treewide/oneplus: massive code removal 2021-11-10 05:52:14 +08:00
video
vservices
xen
Kbuild