android_kernel_motorola_sm6225/include
Jan Kara bb7e3a019b quota: Fix slow quotaoff
commit 869b6ea1609f655a43251bf41757aa44e5350a8f upstream.

Eric has reported that commit dabc8b207566 ("quota: fix dqput() to
follow the guarantees dquot_srcu should provide") heavily increases
runtime of generic/270 xfstest for ext4 in nojournal mode. The reason
for this is that ext4 in nojournal mode leaves dquots dirty until the last
dqput() and thus the cleanup done in quota_release_workfn() has to write
them all. Due to the way quota_release_workfn() is written this results
in synchronize_srcu() call for each dirty dquot which makes the dquot
cleanup when turning quotas off extremely slow.

To be able to avoid synchronize_srcu() for each dirty dquot we need to
rework how we track dquots to be cleaned up. Instead of keeping the last
dquot reference while it is on releasing_dquots list, we drop it right
away and mark the dquot with new DQ_RELEASING_B bit instead. This way we
can we can remove dquot from releasing_dquots list when new reference to
it is acquired and thus there's no need to call synchronize_srcu() each
time we drop dq_list_lock.

References: https://lore.kernel.org/all/ZRytn6CxFK2oECUt@debian-BULLSEYE-live-builder-AMD64
Reported-by: Eric Whitney <enwlinux@gmail.com>
Fixes: dabc8b207566 ("quota: fix dqput() to follow the guarantees dquot_srcu should provide")
CC: stable@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-25 11:16:20 +02:00
..
acpi ACPI: CPPC: Do not prevent CPPC from working in the future 2022-08-25 11:15:30 +02:00
asm-generic word-at-a-time: use the same return type for has_zero regardless of endianness 2023-08-11 11:45:36 +02:00
clocksource
crypto
drm drm/mipi-dsi: Fix byte order of 16-bit DCS set/get brightness 2023-03-11 16:31:40 +01:00
dt-bindings
keys
kvm
linux quota: Fix slow quotaoff 2023-10-25 11:16:20 +02:00
math-emu
media media: v4l2-mem2mem: add lock to protect parameter num_rdy 2023-08-30 16:31:43 +02:00
memory
misc
net tcp: fix quick-ack counting to count actual ACKs of new data 2023-10-10 21:45:01 +02:00
pcmcia
ras
rdma
scsi scsi: core: Use 32-bit hostnum in scsi_host_lookup() 2023-09-23 10:48:08 +02:00
soc
sound ALSA: core: Add async signal helpers 2022-08-25 11:15:46 +02:00
target
trace nohz: Add TICK_DEP_BIT_RCU 2023-05-17 11:13:22 +02:00
uapi bpf: Clarify error expectations from bpf_clone_redirect 2023-10-10 21:44:58 +02:00
video
xen