Whamcloud - gitweb
LU-11775 osc: check if opg is in lru list without locking 60/33860/4
authorLi Dongyang <dongyangli@ddn.com>
Fri, 14 Dec 2018 01:36:22 +0000 (12:36 +1100)
committerOleg Drokin <green@whamcloud.com>
Wed, 27 Feb 2019 18:03:06 +0000 (18:03 +0000)
commitb3af0798682b24d0f39424a7db12c9710a0e64b4
treea7492a48e0011b2efda8c86051f5e5ba88a597da
parent42d8cb04637b62d91deb9ef047f1d9ef8473eca6
LU-11775 osc: check if opg is in lru list without locking

osc_lru_use is called for every page queued for io,
we can just check if the osc_page is in the lru list
without taking the cl_lru_list_lock and return if not
as a fast path.
Note we still need to do the check again after locking
as it could be removed from the lru list by another thread.

Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Change-Id: I1587b6b5547ae5a7a8bfe32a78361bb888c85d5b
Reviewed-on: https://review.whamcloud.com/33860
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osc/osc_page.c