kernel_samsung_a53x/fs
Jan Kara a297c70541 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>
2024-11-08 11:25:43 +01:00
..
9p Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
affs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
afs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
autofs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
befs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
btrfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cachefiles Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ceph Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cifs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
coda Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
configfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cramfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
crypto Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debugfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
devpts Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dlm Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ecryptfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
efivarfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
efs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
erofs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exfat Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exportfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ext2 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ext4 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
f2fs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fat Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
freevxfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fscache Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fuse Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gfs2 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hfsplus Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hostfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hpfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hugetlbfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
incfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iomap Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
isofs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jbd2 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jffs2 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kernfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lockd Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
minix Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nfs_common Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nfsd Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nilfs2 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nls Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
notify Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ntfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ocfs2 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
omfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
openpromfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
orangefs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
overlayfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
proc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pstore Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qnx4 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qnx6 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
quota quota: Fix slow quotaoff 2024-11-08 11:25:43 +01:00
ramfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
reiserfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
romfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sdfat Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
squashfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sysfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sysv Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tracefs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ubifs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
udf Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ufs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
unicode Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vboxsf Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
verity Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zonefs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
anon_inodes.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
attr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bad_inode.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
binfmt_aout.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
binfmt_elf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
binfmt_elf_fdpic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
binfmt_em86.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
binfmt_flat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
binfmt_misc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
binfmt_script.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
block_dev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
buffer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
char_dev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
compat_binfmt_elf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
coredump.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
d_path.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dax.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dcache.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dcookies.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
direct-io.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dlog_hook.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drop_caches.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
eventfd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
eventpoll.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exec.c security: samsung: defex_lsm: nuke 2024-06-15 16:20:49 -03:00
fcntl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fhandle.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
file.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
file_table.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
filesystems.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fs-writeback.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fs_context.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fs_parser.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fs_pin.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fs_struct.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fs_types.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fsopen.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
init.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
inode.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
internal.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ioctl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig.binfmt Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kernel_read_file.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
libfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
locks.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mbcache.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mount.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mpage.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
namei.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
namespace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
no-block.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nsfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
open.c security: samsung: defex_lsm: nuke 2024-06-15 16:20:49 -03:00
pipe.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pnode.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pnode.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
posix_acl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
proc_namespace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
read_write.c security: samsung: defex_lsm: nuke 2024-06-15 16:20:49 -03:00
readdir.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
remap_range.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
select.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
seq_file.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
signalfd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
splice.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stack.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
statfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
super.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sync.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timerfd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
userfaultfd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
utimes.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xattr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00