Whamcloud - gitweb
few changes for debug purposes in OSC:
authoryury <yury>
Mon, 22 Aug 2005 16:54:08 +0000 (16:54 +0000)
committeryury <yury>
Mon, 22 Aug 2005 16:54:08 +0000 (16:54 +0000)
- 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
lustre/ldlm/ldlm_lib.c
lustre/osc/osc_request.c

index 4b00043..0ec27fa 100644 (file)
@@ -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 {
index e16c61a..eb18c35 100644 (file)
@@ -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);
index 8fbfb61..8ef35b0 100644 (file)
@@ -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