Whamcloud - gitweb
LU-13419 osc: Move shrink update to per-write
authorPatrick Farrell <farr0186@gmail.com>
Mon, 13 Apr 2020 16:23:42 +0000 (11:23 -0500)
committerLi Xi <lixi@ddn.com>
Thu, 15 Jul 2021 13:27:36 +0000 (13:27 +0000)
commit8927ed56a632d8bc031933a2d435610d0e8ab541
treea852d1c4e69b431ffa24895c0a098d24218e39dc
parent57783513a12a2160deb85cd9d348d74943d57c0e
LU-13419 osc: Move shrink update to per-write

Updating the grant shrink interval is currently done for
each page submitted, rather than once per write.  Since
the grant shrink interval is in seconds, this is
unnecessary.

This came up because this function showed up in the perf
traces for https://review.whamcloud.com/#/c/38151/, and
it is called with the cl_loi_list_lock held.

Note that this change makes this access to the grant shrink
interval a 'dirty' access, without locking, but the grant
shrink interval is:
A) Already accessed like this in various places, and
B) can safely be out of date or suffer a lost update
without affecting correctness or performance.

IOR performance testing with this test:
mpirun -np 36 $IOR -o $LUSTRE -w -t 1M -b 2G -i 1 -F

No patches:
5942 MiB/s
With 38151:
14950 MiB/s
With 38151+this:
15320 MiB/s

Lustre-change: https://review.whamcloud.com/38214
Lustre-commit: c24c25dc1b84912063f79e44602526c482ca0479

Signed-off-by: Patrick Farrell <farr0186@gmail.com>
Change-Id: I8110b3c2570c183d58be2bccdbf76813ea3e373a
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/44266
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
lustre/osc/osc_cache.c
lustre/osc/osc_io.c