From 0b9bce2772fd3b46736c805122cead0761cdaea5 Mon Sep 17 00:00:00 2001 From: yury Date: Mon, 22 Aug 2005 16:54:08 +0000 Subject: [PATCH] few changes for debug purposes in OSC: - increased number in flight requests by factor 2. Thus twise is increased cl_dirty_max (in fact cache size) - disabled check for in flight requests in osc_check_rpcs() - number of in flight RPCs is limited anyway by ->cl_dirty_max --- lustre/include/linux/obd.h | 6 +++--- lustre/ldlm/ldlm_lib.c | 6 ++++-- lustre/osc/osc_request.c | 6 ++++++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/lustre/include/linux/obd.h b/lustre/include/linux/obd.h index 4b00043..0ec27fa 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 e16c61a..eb18c35 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 8fbfb61..8ef35b0 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 -- 1.8.3.1