Whamcloud - gitweb
LU-4786 osc: to not pick busy pages for ELC 95/10795/2
authorJinshan Xiong <jinshan.xiong@intel.com>
Mon, 23 Jun 2014 21:20:52 +0000 (14:20 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 14 Aug 2014 14:38:54 +0000 (14:38 +0000)
commit0a6c6fcd46a4e2eb289eff72402e34d329a63d91
tree012a71e14f80ba5e2351ba29e88fa25d26cf5f65
parente33ba5895dbad524e0a26fd0b2b8baee4d43b466
LU-4786 osc: to not pick busy pages for ELC

This is a combination of commit 154fb1f7 from LU-3321 and commit
bfae5a4e from LU-4300. This patch is only required in b2_5 as the
code is already in 2.6.

Use weigh_ast to decide if a lock covers any pages.
In recovery, weigh_ast will be used to decide if a DLM read lock
covers any locked pages, or it will be canceled instead being
recovered.

The problem with the original implementation is that it attached
each osc_page to an osc_lock also changed lock state to add every
pages for readahead.

Bugzilla-bug-Id: b=16774

Change the policy of ELC to pick locks that have no dirty pages,
no page in writeback state, and no locked pages.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Ie857a4dd4e235f0c3273f53cbfab9592c2793ac9
Reviewed-on: http://review.whamcloud.com/10795
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre_dlm.h
lustre/ldlm/ldlm_request.c
lustre/mdc/mdc_request.c
lustre/osc/osc_cl_internal.h
lustre/osc/osc_internal.h
lustre/osc/osc_lock.c
lustre/osc/osc_page.c
lustre/osc/osc_request.c