Whamcloud - gitweb
LU-10948 llite: Revalidate dentries in ll_intent_file_open 91/41091/3
authorOleg Drokin <oleg.drokin@intel.com>
Wed, 25 Apr 2018 19:04:48 +0000 (15:04 -0400)
committerOleg Drokin <green@whamcloud.com>
Thu, 4 Mar 2021 08:33:58 +0000 (08:33 +0000)
commit6ad2679352ee9a14eceb8c70b37df084bc07a6f7
treea627bf6a2f4a902c32b278d82e37104c1807b860
parentcd17e1a2e6367a7c3f07753e71fa569c28000c81
LU-10948 llite: Revalidate dentries in ll_intent_file_open

We might get a lookup lock in response to our open request and we
definitely want to ensure that our dentry is valid, so it could
actually be matched by dcache code in future operations.

Benchmark results:

This patch can significantly improve open-create + stat on the same
client.

This patch in combination with two others:

https://review.whamcloud.com/33584
https://review.whamcloud.com/33585

Improves the 'stat' side of open-create + stat by >10x.

Without patches (master branch commit 26a7abe):

mpirun -np 24 --allow-run-as-root /work/tools/bin/mdtest -n 50000 -d /cache1/out/ -F -C -T -v -w 32k

   Operation                      Max            Min           Mean        Std Dev
   ---------                      ---            ---           ----        -------
   File creation     :       3838.205       3838.204       3838.204          0.000
   File stat         :      33459.289      33459.249      33459.271          0.011
   File read         :          0.000          0.000          0.000          0.000
   File removal      :          0.000          0.000          0.000          0.000
   Tree creation     :       3146.841       3146.841       3146.841          0.000
   Tree removal      :          0.000          0.000          0.000          0.000

With the three patches:

mpirun -np 24 --allow-run-as-root /work/tools/bin/mdtest -n 50000 -d /cache1/out/ -F -C -T -v -w 32k
SUMMARY rate: (of 1 iterations)
   Operation                      Max            Min           Mean        Std Dev
   ---------                      ---            ---           ----        -------
   File creation     :       3822.440       3822.439       3822.440          0.000
   File stat         :     350620.140     350615.980     350617.193          1.051
   File read         :          0.000          0.000          0.000          0.000
   File removal      :          0.000          0.000          0.000          0.000
   Tree creation     :       2076.727       2076.727       2076.727          0.000
   Tree removal      :          0.000          0.000          0.000          0.000

Note 33K stats/second vs 350K stats/second.

ls -l time of the mdtest directory is also reduced from 23.5 seconds to
5.8 seconds.

Lustre-change: https://review.whamcloud.com/32157
Lustre-commit: 14ca3157b21d8bd22be29c9578819b72fd39a1e5

Change-Id: I2cb4f94c0300897adb90cc89425e5cfb1c6fe7af
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/41091
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: Andreas Dilger <adilger@whamcloud.com>
lustre/llite/file.c