Whamcloud - gitweb
- more debug info of pipe feeding on client
authoryury <yury>
Wed, 17 Aug 2005 12:45:22 +0000 (12:45 +0000)
committeryury <yury>
Wed, 17 Aug 2005 12:45:22 +0000 (12:45 +0000)
lustre/include/linux/obd.h
lustre/ldlm/ldlm_lib.c
lustre/osc/osc_request.c

index 2d7fb4d..767dca1 100644 (file)
@@ -362,6 +362,8 @@ struct client_obd {
         struct timeval           cl_last_write_time;
         long                     cl_write_gap_sum;
         long                     cl_write_gaps;
+        long                     cl_write_num;
+        long                     cl_read_num;
 };
 
 /* Like a client, with some hangers-on.  Keep mc_client_obd first so that we
index 0927476..7ad1d84 100644 (file)
@@ -258,6 +258,8 @@ int client_obd_setup(struct obd_device *obddev, obd_count len, void *buf)
                sizeof(cli->cl_last_write_time));
         cli->cl_write_gap_sum = 0;
         cli->cl_write_gaps = 0;
+        cli->cl_write_num = 0;
+        cli->cl_read_num = 0;
 
         if (num_physpages >> (20 - PAGE_SHIFT) <= 128) { /* <= 128 MB */
                 cli->cl_max_pages_per_rpc = PTLRPC_MAX_BRW_PAGES / 4;
@@ -380,8 +382,9 @@ int client_obd_cleanup(struct obd_device *obddev, int flags)
         cli->cl_import = NULL;
 
         if (cli->cl_write_gap_sum) {
-                CWARN("%s: %lu write gaps: %lu av. (usec), %lu total "
-                      "(usec)\n", obddev->obd_name, cli->cl_write_gaps,
+                CWARN("%s: (write num: %lu, read num: %lu): %lu write gaps: %lu "
+                      "av. (usec), %lu total (usec)\n", obddev->obd_name,
+                      cli->cl_write_num, cli->cl_read_num, cli->cl_write_gaps,
                       cli->cl_write_gap_sum / cli->cl_write_gaps,
                       cli->cl_write_gap_sum);
         }
index 79b0a31..9ce88ea 100644 (file)
@@ -1630,10 +1630,13 @@ static int osc_send_oap_rpc(struct client_obd *cli, struct lov_oinfo *loi,
                 }
         }        
 
-        if (cmd == OBD_BRW_READ)
+        if (cmd == OBD_BRW_READ) {
                 cli->cl_r_in_flight++;
-        else
+                cli->cl_read_num++;
+        } else {
                 cli->cl_w_in_flight++;
+                cli->cl_write_num++;
+        }
         
         /* queued sync pages can be torn down while the pages
          * were between the pending list and the rpc */