Whamcloud - gitweb
LU-5108 llite: define per open file cache for ll_cl_context 03/10503/6
authorJinshan Xiong <jinshan.xiong@intel.com>
Thu, 29 May 2014 23:36:37 +0000 (16:36 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 12 Jun 2014 18:41:47 +0000 (18:41 +0000)
commitf1b9122ce683c78f83fe05850728fea3662fe006
tree4504c4177241ab7b3d1256ad9b9bf4263034ac8f
parent48eceeec98da3db2c93d980bb5f7e1c1f7c333cc
LU-5108 llite: define per open file cache for ll_cl_context

In ll_readpage and ll_write_begin, it needs to find out the cl_env
and cl_io, a.k.a ll_cl_context, when the IO is initialized. It used
to call cl_env_get() to figure it out but turned out to be contended
if multiple threads are doing IO.

In this patch, a per open file ll_cl_context cache is created. When
IO type of CIT_READ, CIT_WRITE and CIR_FAULT is initialized, it will
add a ll_cl_context into the cache maintained in ll_file_data. In this
case, the ll_cl_context can be found in ll_readpage and ll_write_begin
later.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I757d1df44f60c8b79be7bb458df59350be72d86b
Reviewed-on: http://review.whamcloud.com/10503
Tested-by: Jenkins
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/llite/file.c
lustre/llite/llite_internal.h
lustre/llite/llite_mmap.c
lustre/llite/rw.c
lustre/llite/rw26.c