Whamcloud - gitweb
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>