diff options
author | Dave Chinner <dchinner@redhat.com> | 2022-07-14 12:04:38 +1000 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2022-07-14 12:04:38 +1000 |
commit | d8d9bbb0ee6c79191b704d88c8ae712b89e0d2bb (patch) | |
tree | e68e308afacc7c76a8c79e6ee5f9437fa0fe7307 /fs/xfs/xfs_iops.c | |
parent | 348000804a0f4dea74219a927e081d6e7dee792f (diff) | |
download | linux-d8d9bbb0ee6c79191b704d88c8ae712b89e0d2bb.tar.gz linux-d8d9bbb0ee6c79191b704d88c8ae712b89e0d2bb.tar.bz2 linux-d8d9bbb0ee6c79191b704d88c8ae712b89e0d2bb.zip |
xfs: reduce the number of atomic when locking a buffer after lookup
Avoid an extra atomic operation in the non-trylock case by only
doing a trylock if the XBF_TRYLOCK flag is set. This follows the
pattern in the IO path with NOWAIT semantics where the
"trylock-fail-lock" path showed 5-10% reduced throughput compared to
just using single lock call when not under NOWAIT conditions. So
make that same change here, too.
See commit 942491c9e6d6 ("xfs: fix AIM7 regression") for details.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
[hch: split from a larger patch]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_iops.c')
0 files changed, 0 insertions, 0 deletions