Whamcloud - gitweb
LU-11199 mdt: Attempt lookup lock on open 29/32929/5
authorPatrick Farrell <paf@cray.com>
Tue, 28 Aug 2018 14:28:29 +0000 (09:28 -0500)
committerOleg Drokin <green@whamcloud.com>
Fri, 12 Oct 2018 23:50:44 +0000 (23:50 +0000)
commit8b9105d8281f10b500d47a00458631a586c7f1d4
tree2a5affa0da79e4a1fbca982bd9b18da7db54b4f2
parent697e8fe6f325089fe2c69c56cc49bbdadd3a2c3d
LU-11199 mdt: Attempt lookup lock on open

Commit 4f50273a (LU-10269 ldlm: fix the issues introduced
by try bits) changed the locking behavior on open to not
attempt to grant the LOOKUP lock bit.  This causes a
performance regression in open(), which is up to 75% in
some benchmarks, such as mdsrate (from lustre/tests/mpi):

First create the files:
mpirun -n 4 /usr/lib64/lustre/tests/mdsrate /
-d /mnt/lustre/mdsrate --create --nfile=30000

Then drop caches:
echo 3 > /proc/sys/vm/drop_caches

Then run the open benchmark:
mpirun -n 4 /usr/lib64/lustre/tests/mdsrate /
-d /mnt/lustre/mdsrate --open --iters 8000 --nfile=30000
[More details in LU-1199]

This patch reverts that specific part of 4f50273a, which
restores open() performance to prior levels.

It may not be 100% correct to ask for open only when
also asking for layout, but this is the earlier behavior.

There is a further patch in flight to optimize this
code:
https://review.whamcloud.com/32156

And further changes are left for that patch.

Cray-bug-id: LUS-6358

Change-Id: Iceca88807e99955f28eba6bbcb3585964f7df2f4
Signed-off-by: Patrick Farrell <paf@cray.com>
Reviewed-on: https://review.whamcloud.com/32929
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mdt/mdt_open.c