Skip to content

Commit 8c3b1c9

Browse files
rstorozhrkanagar
authored andcommitted
lib: Fix MBR value for non-SNC machines
There is an issue in counting remote traffic for non-SNC machines, it is always 0. Example: There is a 2-socket non-SNC machine having the following CPU mapping: NUMA node0 CPU(s): 0-47,96-143 NUMA node1 CPU(s): 48-95,144-191 Let's generate remote traffic in a terminal 1: 1. From node 0 to node 1 numactl --membind=1 membw -c 1 -b 200 --write 2. From node 1 to node 0 numactl --membind=0 membw -c 49 -b 200 --write Let's check 'MBR' value for each of the cases in a terminal 2: $ sudo LD_LIBRARY_PATH=lib ./pqos/pqos --iface=os -m "llc:1,49;mbl:1,49;mbr:1,49;mbt:1,49" It will show that MBR is always zero. This is wrong. Remove the wrong calculation that doesn't affect the results for SNC machines and zeroes MBR values for non-SNC ones. Signed-off-by: Roman Storozhenko <[email protected]>
1 parent 1d30d47 commit 8c3b1c9

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

lib/monitoring.c

-6
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,6 @@ pqos_mon_poll_events(struct pqos_mon_data *group)
201201
* Calculate values of virtual events
202202
*/
203203
if (group->event & PQOS_MON_EVENT_RMEM_BW) {
204-
const struct pqos_capability *cap_mon =
205-
_pqos_cap_get_type(PQOS_CAP_TYPE_MON);
206204
const struct pqos_cap *cap = _pqos_get_cap();
207205
const struct pqos_monitor *pmon;
208206
uint64_t max_value = 0;
@@ -214,10 +212,6 @@ pqos_mon_poll_events(struct pqos_mon_data *group)
214212
group->values.mbm_total_delta -
215213
group->values.mbm_local_delta;
216214

217-
if (cap_mon->u.mon->snc_mode == PQOS_SNC_LOCAL)
218-
group->values.mbm_remote_delta *=
219-
cap_mon->u.mon->snc_num;
220-
221215
ret = pqos_cap_get_event(cap, PQOS_MON_EVENT_RMEM_BW, &pmon);
222216
if (ret == PQOS_RETVAL_OK)
223217
max_value = 1LLU << pmon->counter_length;

0 commit comments

Comments
 (0)