From 1953af5737416c8ec7c73fad685e5c2663bb090a Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 24 Feb 2005 11:57:06 +0000 Subject: [PATCH] - tuning ported from b1_4 --- lustre/ldlm/ldlm_lib.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 68b7609..70bd9b7 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -245,10 +245,13 @@ int client_obd_setup(struct obd_device *obddev, obd_count len, void *buf) spin_lock_init(&cli->cl_write_rpc_hist.oh_lock); spin_lock_init(&cli->cl_read_page_hist.oh_lock); spin_lock_init(&cli->cl_write_page_hist.oh_lock); - - if (num_physpages <= 32768) { /* <= 128 MB */ - cli->cl_max_pages_per_rpc = PTLRPC_MAX_BRW_PAGES / 3; - cli->cl_max_rpcs_in_flight = OSC_MAX_RIF_DEFAULT / 3; + + if (num_physpages >> (20 - PAGE_SHIFT) <= 128) { /* <= 128 MB */ + cli->cl_max_pages_per_rpc = PTLRPC_MAX_BRW_PAGES / 4; + cli->cl_max_rpcs_in_flight = OSC_MAX_RIF_DEFAULT / 4; + } else if (num_physpages >> (20 - PAGE_SHIFT) <= 512) { /* <= 512 MB */ + cli->cl_max_pages_per_rpc = PTLRPC_MAX_BRW_PAGES / 2; + cli->cl_max_rpcs_in_flight = OSC_MAX_RIF_DEFAULT / 2; } else { cli->cl_max_pages_per_rpc = PTLRPC_MAX_BRW_PAGES; cli->cl_max_rpcs_in_flight = OSC_MAX_RIF_DEFAULT; -- 1.8.3.1