usnic: add completion stats
This should probably not go to the v2.x branch, since it changes the output format of the usnic stats. Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Этот коммит содержится в:
родитель
706f53bb01
Коммит
b980e334dc
@ -1159,6 +1159,8 @@ static int usnic_component_progress(void)
|
||||
if (OPAL_LIKELY(OPAL_BTL_USNIC_SEG_RECV ==
|
||||
rseg->rs_base.us_type)) {
|
||||
opal_btl_usnic_recv_fast(module, rseg, channel);
|
||||
++module->stats.num_seg_total_completions;
|
||||
++module->stats.num_seg_recv_completions;
|
||||
fastpath_ok = false; /* prevent starvation */
|
||||
return 1;
|
||||
} else {
|
||||
@ -1188,6 +1190,8 @@ static int usnic_handle_completion(
|
||||
seg = (opal_btl_usnic_segment_t*)completion->op_context;
|
||||
rseg = (opal_btl_usnic_recv_segment_t*)seg;
|
||||
|
||||
++module->stats.num_seg_total_completions;
|
||||
|
||||
/* Make the completion be Valgrind-defined */
|
||||
opal_memchecker_base_mem_defined(seg, sizeof(*seg));
|
||||
|
||||
@ -1198,6 +1202,7 @@ static int usnic_handle_completion(
|
||||
|
||||
/**** Send ACK completions ****/
|
||||
case OPAL_BTL_USNIC_SEG_ACK:
|
||||
++module->stats.num_seg_ack_completions;
|
||||
opal_btl_usnic_ack_complete(module,
|
||||
(opal_btl_usnic_ack_segment_t *)seg);
|
||||
break;
|
||||
@ -1205,6 +1210,7 @@ static int usnic_handle_completion(
|
||||
/**** Send of frag segment completion (i.e., the MPI message's
|
||||
one-and-only segment has completed sending) ****/
|
||||
case OPAL_BTL_USNIC_SEG_FRAG:
|
||||
++module->stats.num_seg_frag_completions;
|
||||
opal_btl_usnic_frag_send_complete(module,
|
||||
(opal_btl_usnic_frag_segment_t*)seg);
|
||||
break;
|
||||
@ -1212,12 +1218,14 @@ static int usnic_handle_completion(
|
||||
/**** Send of chunk segment completion (i.e., part of a large MPI
|
||||
message is done sending) ****/
|
||||
case OPAL_BTL_USNIC_SEG_CHUNK:
|
||||
++module->stats.num_seg_chunk_completions;
|
||||
opal_btl_usnic_chunk_send_complete(module,
|
||||
(opal_btl_usnic_chunk_segment_t*)seg);
|
||||
break;
|
||||
|
||||
/**** Receive completions ****/
|
||||
case OPAL_BTL_USNIC_SEG_RECV:
|
||||
++module->stats.num_seg_recv_completions;
|
||||
opal_btl_usnic_recv(module, rseg, channel);
|
||||
break;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2016 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2013-2017 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -60,6 +60,12 @@ static inline void usnic_stats_reset(opal_btl_usnic_module_t *module)
|
||||
module->stats.pml_module_sends =
|
||||
module->stats.pml_send_callbacks =
|
||||
|
||||
module->stats.num_seg_total_completions =
|
||||
module->stats.num_seg_ack_completions =
|
||||
module->stats.num_seg_frag_completions =
|
||||
module->stats.num_seg_chunk_completions =
|
||||
module->stats.num_seg_recv_completions =
|
||||
|
||||
0;
|
||||
|
||||
for (i=0; i<USNIC_NUM_CHANNELS; ++i) {
|
||||
@ -82,7 +88,7 @@ void opal_btl_usnic_print_stats(
|
||||
char tmp[128], str[2048];
|
||||
|
||||
/* The usuals */
|
||||
snprintf(str, sizeof(str), "%s:MCW:%3u, %s, ST(P+D)/F/C/R(T+F)/A:%8lu(%8u+%8u)/%8lu/%8lu/%4lu(%4lu+%4lu)/%8lu, RcvTot/Chk/F/C/L/H/D/BF/A:%8lu/%c%c/%8lu/%8lu/%4lu+%2lu/%4lu/%4lu/%6lu OA/DA %4lu/%4lu CRC:%4lu ",
|
||||
snprintf(str, sizeof(str), "%s:MCW:%3u, %s, ST(P+D)/F/C/R(T+F)/A:%8lu(%8u+%8u)/%8lu/%8lu/%4lu(%4lu+%4lu)/%8lu, RcvTot/Chk/F/C/L/H/D/BF/A:%8lu/%c%c/%8lu/%8lu/%4lu+%2lu/%4lu/%4lu/%6lu Comp:T(A/F/C/R) %8lu(%8lu/%8lu/%8lu/%8lu), OA/DA %4lu/%4lu CRC:%4lu ",
|
||||
prefix,
|
||||
opal_proc_local_get()->proc_name.vpid,
|
||||
|
||||
@ -118,6 +124,12 @@ void opal_btl_usnic_print_stats(
|
||||
module->stats.num_badfrag_recvs,
|
||||
module->stats.num_ack_recvs,
|
||||
|
||||
module->stats.num_seg_total_completions,
|
||||
module->stats.num_seg_ack_completions,
|
||||
module->stats.num_seg_frag_completions,
|
||||
module->stats.num_seg_chunk_completions,
|
||||
module->stats.num_seg_recv_completions,
|
||||
|
||||
module->stats.num_old_dup_acks,
|
||||
module->stats.num_dup_acks,
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2013-2017 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -56,6 +56,12 @@ typedef struct opal_btl_usnic_module_stats_t {
|
||||
uint64_t pml_module_sends;
|
||||
uint64_t pml_send_callbacks;
|
||||
|
||||
uint64_t num_seg_total_completions;
|
||||
uint64_t num_seg_ack_completions;
|
||||
uint64_t num_seg_frag_completions;
|
||||
uint64_t num_seg_chunk_completions;
|
||||
uint64_t num_seg_recv_completions;
|
||||
|
||||
opal_event_t timer_event;
|
||||
struct timeval timeout;
|
||||
} opal_btl_usnic_module_stats_t;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user