From be360dd22df95923fec1cafff61d95254e91ce43 Mon Sep 17 00:00:00 2001 From: yury Date: Wed, 17 Aug 2005 12:45:22 +0000 Subject: [PATCH] - more debug info of pipe feeding on client --- lustre/include/linux/obd.h | 2 ++ lustre/ldlm/ldlm_lib.c | 7 +++++-- lustre/osc/osc_request.c | 7 +++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/lustre/include/linux/obd.h b/lustre/include/linux/obd.h index 2d7fb4d..767dca1 100644 --- a/lustre/include/linux/obd.h +++ b/lustre/include/linux/obd.h @@ -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 diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 0927476..7ad1d84 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -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); } diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 79b0a31..9ce88ea 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -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 */ -- 1.8.3.1