Whamcloud - gitweb
- returned back OSC dirty size.
authoryury <yury>
Wed, 24 Aug 2005 14:05:51 +0000 (14:05 +0000)
committeryury <yury>
Wed, 24 Aug 2005 14:05:51 +0000 (14:05 +0000)
- enabled filter_tally_write() to have brw_stats on OST

lustre/include/linux/obd.h
lustre/ldlm/ldlm_lib.c
lustre/obdfilter/filter_io_26.c
lustre/osc/osc_request.c

index 09e1902..4e49a07 100644 (file)
@@ -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 */
index d4f2ee3..8d1fd6f 100644 (file)
@@ -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);
index 7b86092..8c1eb35 100644 (file)
@@ -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, 
index 0f0cbe1..22297e8 100644 (file)
@@ -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