f2fs: move f2fs to use reader-unfair rwsems
authorTim Murray <timmurray@google.com>
Fri, 7 Jan 2022 20:48:44 +0000 (12:48 -0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 25 Jan 2022 01:40:04 +0000 (17:40 -0800)
commite4544b63a7ee49e7fbebf35ece0a6acd3b9617ae
treeb55709d5753a19b8beacfcab1fe12dc8128435d7
parentdd81e1c7d5fb126e5fbc5c9e334d7b3ec29a16a0
f2fs: move f2fs to use reader-unfair rwsems

f2fs rw_semaphores work better if writers can starve readers,
especially for the checkpoint thread, because writers are strictly
more important than reader threads. This prevents significant priority
inversion between low-priority readers that blocked while trying to
acquire the read lock and a second acquisition of the write lock that
might be blocking high priority work.

Signed-off-by: Tim Murray <timmurray@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
16 files changed:
fs/f2fs/checkpoint.c
fs/f2fs/compress.c
fs/f2fs/data.c
fs/f2fs/dir.c
fs/f2fs/f2fs.h
fs/f2fs/file.c
fs/f2fs/gc.c
fs/f2fs/inline.c
fs/f2fs/namei.c
fs/f2fs/node.c
fs/f2fs/recovery.c
fs/f2fs/segment.c
fs/f2fs/super.c
fs/f2fs/sysfs.c
fs/f2fs/verity.c
fs/f2fs/xattr.c