]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: simplify inode locking for RWF_NOWAIT
authorGoldwyn Rodrigues <rgoldwyn@suse.com>
Wed, 11 Sep 2019 16:45:15 +0000 (11:45 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 18 Nov 2019 11:46:45 +0000 (12:46 +0100)
commitaea72f30785499d70cdced9f5d3a17e22b9fd847
tree32eb38a32f613b4aae675b26f08e5c7af0b9e5ba
parentd99b5c70ac649c93af0fa3c23d94a215913c930f
btrfs: simplify inode locking for RWF_NOWAIT

This is similar to 63b45c25c96d ("xfs: fix AIM7 regression"). Apparently
our current rwsem code doesn't like doing the trylock, then lock for
real scheme. This causes extra contention on the lock and can be
measured eg. by AIM7 benchmark.  So change our read/write methods to
just do the trylock for the RWF_NOWAIT case.

Fixes: c41e779b6433 ("btrfs: nowait aio support")
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ update changelog ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/file.c