From: yury Date: Wed, 24 Aug 2005 14:05:51 +0000 (+0000) Subject: - returned back OSC dirty size. X-Git-Tag: 1.4.10~654 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=b3dda618c4edcb61715429b0eb69b5c410dec2b9;p=fs%2Flustre-release.git - returned back OSC dirty size. - enabled filter_tally_write() to have brw_stats on OST --- diff --git a/lustre/include/linux/obd.h b/lustre/include/linux/obd.h index 09e1902..4e49a07 100644 --- a/lustre/include/linux/obd.h +++ b/lustre/include/linux/obd.h @@ -297,7 +297,7 @@ struct filter_obd { struct mds_server_data; -#define OSC_MAX_RIF_DEFAULT 16 +#define OSC_MAX_RIF_DEFAULT 8 #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 */ diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index d4f2ee3..8d1fd6f 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -239,11 +239,10 @@ 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 / 4) - cli->cl_dirty_max = num_physpages << (PAGE_SHIFT - 2); + if (cli->cl_dirty_max >> PAGE_SHIFT > num_physpages / 8) + cli->cl_dirty_max = num_physpages << (PAGE_SHIFT - 3); INIT_LIST_HEAD(&cli->cl_cache_waiters); INIT_LIST_HEAD(&cli->cl_loi_ready_list); diff --git a/lustre/obdfilter/filter_io_26.c b/lustre/obdfilter/filter_io_26.c index 7b86092..8c1eb35 100644 --- a/lustre/obdfilter/filter_io_26.c +++ b/lustre/obdfilter/filter_io_26.c @@ -380,13 +380,10 @@ int filter_direct_io(int rw, struct dentry *dchild, void *iobuf, if (rw == OBD_BRW_WRITE) { if (rc == 0) { -#if 0 - filter_tally_write(&obd->u.filter, - dreq->dr_pages, - dreq->dr_page_idx, - dreq->dr_blocks, + int blocks_per_page = PAGE_SIZE >> inode->i_blkbits; + filter_tally_write(&obd->u.filter, dreq->dr_pages, + dreq->dr_npages, dreq->dr_blocks, blocks_per_page); -#endif if (attr->ia_size > inode->i_size) attr->ia_valid |= ATTR_SIZE; rc = fsfilt_setattr(obd, dchild, diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 0f0cbe1..22297e8 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -1793,14 +1793,8 @@ 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