]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ext4: fix ext4_dax_read/write inode locking sequence for IOCB_NOWAIT
authorRitesh Harjani <riteshh@linux.ibm.com>
Thu, 12 Dec 2019 05:55:55 +0000 (11:25 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Feb 2020 07:34:35 +0000 (08:34 +0100)
commit428bb08aed38d08bd78a0b8a69afa97094b46b53
tree93bd75ac5a926be5063dd94a35e42a57a58c7bfe
parent44d748f2abda27c6a7efc5cb3dccd9ed56a61c45
ext4: fix ext4_dax_read/write inode locking sequence for IOCB_NOWAIT

[ Upstream commit f629afe3369e9885fd6e9cc7a4f514b6a65cf9e9 ]

Apparently our current rwsem code doesn't like doing the trylock, then
lock for real scheme.  So change our dax read/write methods to just do the
trylock for the RWF_NOWAIT case.
This seems to fix AIM7 regression in some scalable filesystems upto ~25%
in some cases. Claimed in commit 942491c9e6d6 ("xfs: fix AIM7 regression")

Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Matthew Bobrowski <mbobrowski@mbobrowski.org>
Tested-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Signed-off-by: Ritesh Harjani <riteshh@linux.ibm.com>
Link: https://lore.kernel.org/r/20191212055557.11151-2-riteshh@linux.ibm.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ext4/file.c