summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/llite/rw.c
diff options
context:
space:
mode:
authorJinshan Xiong <jinshan.xiong@intel.com>2016-11-02 21:24:55 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-07 11:36:46 +0100
commita763e916d81e275176302684628738fd917b55da (patch)
treeabf67daf6e2b6276dc149ccd09220bad13902e8d /drivers/staging/lustre/lustre/llite/rw.c
parent2d8c919e59df6a576d2c81fedc36d69dc7394645 (diff)
downloadop-kernel-dev-a763e916d81e275176302684628738fd917b55da.zip
op-kernel-dev-a763e916d81e275176302684628738fd917b55da.tar.gz
staging/lustre: Get rid of cl_env hash table
cl_env hash table is under heavy contention when there are lots of processes doing IO at the same time; reduce lock contention by replacing cl_env cache with percpu array; remove cl_env_nested_get() and cl_env_nested_put(); remove cl_env_reenter() and cl_env_reexit(); Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-on: http://review.whamcloud.com/20254 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4257 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Bobi Jam <bobijam@hotmail.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Reviewed-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/llite/rw.c')
-rw-r--r--drivers/staging/lustre/lustre/llite/rw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/lustre/lustre/llite/rw.c b/drivers/staging/lustre/lustre/llite/rw.c
index 80cb8e0..d2515a8 100644
--- a/drivers/staging/lustre/lustre/llite/rw.c
+++ b/drivers/staging/lustre/lustre/llite/rw.c
@@ -896,17 +896,17 @@ int ll_writepage(struct page *vmpage, struct writeback_control *wbc)
struct cl_io *io;
struct cl_page *page;
struct cl_object *clob;
- struct cl_env_nest nest;
bool redirtied = false;
bool unlocked = false;
int result;
+ int refcheck;
LASSERT(PageLocked(vmpage));
LASSERT(!PageWriteback(vmpage));
LASSERT(ll_i2dtexp(inode));
- env = cl_env_nested_get(&nest);
+ env = cl_env_get(&refcheck);
if (IS_ERR(env)) {
result = PTR_ERR(env);
goto out;
@@ -971,7 +971,7 @@ int ll_writepage(struct page *vmpage, struct writeback_control *wbc)
}
}
- cl_env_nested_put(&nest, env);
+ cl_env_put(env, &refcheck);
goto out;
out:
OpenPOWER on IntegriCloud