diff options
author | Dave Chinner <dchinner@redhat.com> | 2022-07-14 12:04:43 +1000 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2022-07-14 12:04:43 +1000 |
commit | 32dd4f9c506b1bf147c24cf05423cd893bc06e38 (patch) | |
tree | 3609c32414136ae8fd8df7d812283b0d784332c0 /fs/xfs/xfs_iops.c | |
parent | d8d9bbb0ee6c79191b704d88c8ae712b89e0d2bb (diff) | |
download | linux-32dd4f9c506b1bf147c24cf05423cd893bc06e38.tar.gz linux-32dd4f9c506b1bf147c24cf05423cd893bc06e38.tar.bz2 linux-32dd4f9c506b1bf147c24cf05423cd893bc06e38.zip |
xfs: remove a superflous hash lookup when inserting new buffers
Currently on the slow path insert we repeat the initial hash table
lookup before we attempt the insert, resulting in a two traversals
of the hash table to ensure the insert is valid. The rhashtable API
provides a method for an atomic lookup and insert operation, so we
can avoid one of the hash table traversals by using this method.
Adapted from a large patch containing this optimisation by Christoph
Hellwig.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-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