From a7319633ddc7400435a9492774c229dabd3d784d Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Wed, 21 May 2014 18:18:01 +0000 Subject: [PATCH] Revert "LU-4933 osc: Automatically tune the max_dirty_mb" This causes frequent test failures in conf-sanity.sh test_76a() due to changing max_dirty_mb automatically. This reverts commit 5303c139e3cef8ed09b85cf828afbbe24ea0d7db. Change-Id: I013d75ac85010262419a57575552bf55eff9fcdd Reviewed-on: http://review.whamcloud.com/10402 Reviewed-by: Patrick Farrell Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/include/obd.h | 12 ------------ lustre/ldlm/ldlm_lib.c | 6 +++--- lustre/osc/lproc_osc.c | 2 -- lustre/ptlrpc/import.c | 1 - 4 files changed, 3 insertions(+), 18 deletions(-) diff --git a/lustre/include/obd.h b/lustre/include/obd.h index bda6723..565ae38 100644 --- a/lustre/include/obd.h +++ b/lustre/include/obd.h @@ -1460,16 +1460,4 @@ static inline int cli_brw_size(struct obd_device *obd) return obd->u.cli.cl_max_pages_per_rpc << PAGE_CACHE_SHIFT; } -static inline void client_adjust_max_dirty(struct client_obd *cli) -{ - /* initializing */ - if (cli->cl_dirty_max <= 0) - cli->cl_dirty_max = OSC_MAX_DIRTY_DEFAULT * 1024 * 1024; - else - cli->cl_dirty_max = cli->cl_max_rpcs_in_flight * - (cli->cl_max_pages_per_rpc << PAGE_CACHE_SHIFT); - if (cli->cl_dirty_max >> PAGE_CACHE_SHIFT > totalram_pages / 8) - cli->cl_dirty_max = totalram_pages << (PAGE_CACHE_SHIFT - 3); -} - #endif /* __OBD_H */ diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 94e4020..a3769d5 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -349,9 +349,9 @@ int client_obd_setup(struct obd_device *obddev, struct lustre_cfg *lcfg) cli->cl_dirty = 0; cli->cl_avail_grant = 0; /* FIXME: Should limit this for the sum of all cl_dirty_max. */ - /* cl_dirty_max may be changed at connect time in - * ptlrpc_connect_interpret(). */ - client_adjust_max_dirty(cli); + cli->cl_dirty_max = OSC_MAX_DIRTY_DEFAULT * 1024 * 1024; + if (cli->cl_dirty_max >> PAGE_CACHE_SHIFT > totalram_pages / 8) + cli->cl_dirty_max = totalram_pages << (PAGE_CACHE_SHIFT - 3); CFS_INIT_LIST_HEAD(&cli->cl_cache_waiters); CFS_INIT_LIST_HEAD(&cli->cl_loi_ready_list); CFS_INIT_LIST_HEAD(&cli->cl_loi_hp_ready_list); diff --git a/lustre/osc/lproc_osc.c b/lustre/osc/lproc_osc.c index 1dae975..2f8da8c 100644 --- a/lustre/osc/lproc_osc.c +++ b/lustre/osc/lproc_osc.c @@ -111,7 +111,6 @@ static ssize_t osc_max_rpcs_in_flight_seq_write(struct file *file, client_obd_list_lock(&cli->cl_loi_list_lock); cli->cl_max_rpcs_in_flight = val; - client_adjust_max_dirty(cli); client_obd_list_unlock(&cli->cl_loi_list_lock); LPROCFS_CLIMP_EXIT(dev); @@ -512,7 +511,6 @@ static ssize_t osc_obd_max_pages_per_rpc_seq_write(struct file *file, } client_obd_list_lock(&cli->cl_loi_list_lock); cli->cl_max_pages_per_rpc = val; - client_adjust_max_dirty(cli); client_obd_list_unlock(&cli->cl_loi_list_lock); LPROCFS_CLIMP_EXIT(dev); diff --git a/lustre/ptlrpc/import.c b/lustre/ptlrpc/import.c index 19de797..81cf710 100644 --- a/lustre/ptlrpc/import.c +++ b/lustre/ptlrpc/import.c @@ -1148,7 +1148,6 @@ finish: LASSERT((cli->cl_max_pages_per_rpc <= PTLRPC_MAX_BRW_PAGES) && (cli->cl_max_pages_per_rpc > 0)); - client_adjust_max_dirty(cli); } out: -- 1.8.3.1