diff --git a/lustre/include/linux/obd.h b/lustre/include/linux/obd.h index 4b00043f322599641f0497bba025db6b9db59836..0ec27fa4a992b4c539e0ff96c87861570e5b466e 100644 --- a/lustre/include/linux/obd.h +++ b/lustre/include/linux/obd.h @@ -297,10 +297,10 @@ struct filter_obd { struct mds_server_data; -#define OSC_MAX_RIF_DEFAULT 8 +#define OSC_MAX_RIF_DEFAULT 16 #define OSC_MAX_RIF_MAX 64 -#define OSC_MAX_DIRTY_DEFAULT (4*OSC_MAX_RIF_DEFAULT*PTLRPC_MAX_BRW_SIZE>>20) -#define OSC_MAX_DIRTY_MB_MAX 512 /* totally arbitrary */ +#define OSC_MAX_DIRTY_DEFAULT (4*OSC_MAX_RIF_DEFAULT*PTLRPC_MAX_BRW_SIZE>>20) +#define OSC_MAX_DIRTY_MB_MAX 512 /* totally arbitrary */ struct mdc_rpc_lock; struct client_obd { diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index e16c61a7cbeddf19bffce882e5eced16817ab2e4..eb18c35cb11943b1f44ed81a98cd78130fbbac8a 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -239,10 +239,12 @@ int client_obd_setup(struct obd_device *obddev, obd_count len, void *buf) cli->cl_dirty = 0; cli->cl_avail_grant = 0; + /* XXX: making ->cl_dirty_max twice bigger for debug purposes! */ /* FIXME: should limit this for the sum of all cl_dirty_max */ cli->cl_dirty_max = OSC_MAX_DIRTY_DEFAULT * 1024 * 1024; - if (cli->cl_dirty_max >> PAGE_SHIFT > num_physpages / 8) - cli->cl_dirty_max = num_physpages << (PAGE_SHIFT - 3); + if (cli->cl_dirty_max >> PAGE_SHIFT > num_physpages / 4) + cli->cl_dirty_max = num_physpages << (PAGE_SHIFT - 2); + INIT_LIST_HEAD(&cli->cl_cache_waiters); INIT_LIST_HEAD(&cli->cl_loi_ready_list); INIT_LIST_HEAD(&cli->cl_loi_write_list); diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 8fbfb614dbb9ddda7d1928721356dd33012c8402..8ef35b02627f06cb8c530364093a9eada7b3de68 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -1783,8 +1783,14 @@ static void osc_check_rpcs(struct client_obd *cli) LOI_DEBUG(loi, "%lu in flight\n", rpcs_in_flight(cli)); LASSERT(loi->loi_ost_idx != LL_POISON); +#if 0 + /* XXX: disabling this check for debug purposes! Also it seem + * does not make a big meaning because there will not be more + * than ->cl_max_rpcs_in_flight RPCs in flight as ->cl_dirty_max + * will limit it in osc_enter_cache(). */ if (rpcs_in_flight(cli) >= cli->cl_max_rpcs_in_flight) break; +#endif /* attempt some read/write balancing by alternating between * reads and writes in an object. The makes_rpc checks here