4e0458a047
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> |
||
---|---|---|
.. | ||
acpi | ||
asm-generic | ||
clocksource | ||
crypto | ||
drm | ||
dt-bindings | ||
keys | ||
kvm | ||
linux | ||
math-emu | ||
media | ||
memory | ||
microvisor | ||
misc | ||
net | ||
pcmcia | ||
ras | ||
rdma | ||
scsi | ||
slalib | ||
soc | ||
sound | ||
target | ||
trace | ||
uapi | ||
video | ||
vservices | ||
xen | ||
Kbuild |