From: alex Date: Thu, 24 Feb 2005 11:57:06 +0000 (+0000) Subject: - tuning ported from b1_4 X-Git-Tag: 1.3.4~119 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=1953af5737416c8ec7c73fad685e5c2663bb090a;p=fs%2Flustre-release.git - tuning ported from b1_4 --- 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;