Package: numatop / 1.0.4-3

Metadata

Package Version Patches format
numatop 1.0.4-3 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
0000 hardening changes for makefile.patch | (download)

Makefile | 10 5 + 5 - 0 !
1 file changed, 5 insertions(+), 5 deletions(-)

---
0001 Use libnuma API to create memory on a specified node.patch | (download)

test/mgen/Makefile | 2 1 + 1 - 0 !
test/mgen/README | 7 4 + 3 - 0 !
test/mgen/mgen.c | 42 18 + 24 - 0 !
3 files changed, 23 insertions(+), 28 deletions(-)

 [patch 01/16] use libnuma api to create memory on a specified node
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

With latest Linux kernel, the memory pages gets migrated from the original node to
the one where it's now being accessed, then the RMA is changed to LMA.

This patch uses libnuma API to tell kernel it doesn't need to migrate the memory pages.

Signed-off-by: Jin Yao <yao.jin@linux.intel.com>

0002 Add cache monitoring and memory bandwidth monitoring.patch | (download)

common/cmd.c | 85 83 + 2 - 0 !
common/disp.c | 80 72 + 8 - 0 !
common/include/cmd.h | 30 28 + 2 - 0 !
common/include/disp.h | 9 9 + 0 - 0 !
common/include/lwp.h | 1 1 + 0 - 0 !
common/include/os/linux/perf_event.h | 342 297 + 45 - 0 !
common/include/os/os_cmd.h | 3 3 + 0 - 0 !
common/include/os/os_perf.h | 29 29 + 0 - 0 !
common/include/os/os_util.h | 19 15 + 4 - 0 !
common/include/os/pfwrapper.h | 8 8 + 0 - 0 !
common/include/os/plat.h | 1 1 + 0 - 0 !
common/include/perf.h | 28 25 + 3 - 0 !
common/include/proc.h | 4 4 + 0 - 0 !
common/include/types.h | 22 11 + 11 - 0 !
common/include/win.h | 81 77 + 4 - 0 !
common/lwp.c | 3 3 + 0 - 0 !
common/numatop.c | 10 10 + 0 - 0 !
common/os/os_cmd.c | 90 90 + 0 - 0 !
common/os/os_page.c | 40 39 + 1 - 0 !
common/os/os_perf.c | 262 254 + 8 - 0 !
common/os/os_util.c | 24 24 + 0 - 0 !
common/os/pfwrapper.c | 325 323 + 2 - 0 !
common/os/plat.c | 16 11 + 5 - 0 !
common/perf.c | 161 160 + 1 - 0 !
common/proc.c | 13 13 + 0 - 0 !
common/util.c | 1 1 + 0 - 0 !
common/win.c | 674 668 + 6 - 0 !
intel/wsm.c | 2 1 + 1 - 0 !
28 files changed, 2260 insertions(+), 103 deletions(-)

 [patch 02/16] add cache monitoring and memory bandwidth monitoring
 features
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

The feature is only supported on Intel Xeon V4 family.

Note that this feature requires kernel CQM/MBM patch but the patch
has not been upstreamed yet (target for 4.7). So please apply following
kernel patch before using numatop cache monitoring and memory bandwidth
monitoring features.

The link to kernel patch:
https://github.com/vshiva1/linux/tree/cqm_rcfix2

Signed-off-by: Jin Yao <yao.jin@linux.intel.com>

0003 Add a feature to show per Node QPI bandwidth.patch | (download)

common/cmd.c | 14 14 + 0 - 0 !
common/include/cmd.h | 5 4 + 1 - 0 !
common/include/os/node.h | 17 17 + 0 - 0 !
common/include/os/os_cmd.h | 1 1 + 0 - 0 !
common/include/os/os_perf.h | 5 5 + 0 - 0 !
common/include/os/os_util.h | 2 2 + 0 - 0 !
common/include/os/pfwrapper.h | 5 5 + 0 - 0 !
common/include/perf.h | 15 15 + 0 - 0 !
common/numatop.c | 2 2 + 0 - 0 !
common/os/node.c | 29 29 + 0 - 0 !
common/os/os_cmd.c | 39 34 + 5 - 0 !
common/os/os_page.c | 14 12 + 2 - 0 !
common/os/os_perf.c | 120 120 + 0 - 0 !
common/os/os_util.c | 29 29 + 0 - 0 !
common/os/os_win.c | 17 15 + 2 - 0 !
common/os/pfwrapper.c | 125 125 + 0 - 0 !
common/perf.c | 62 62 + 0 - 0 !
17 files changed, 491 insertions(+), 10 deletions(-)

 [patch 03/16] add a feature to show per-node qpi bandwidth
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Signed-off-by: Jin Yao <yao.jin@linux.intel.com>

0004 Add a feature to show per Node memory controller ban.patch | (download)

common/cmd.c | 6 3 + 3 - 0 !
common/include/os/node.h | 16 16 + 0 - 0 !
common/include/os/os_cmd.h | 2 1 + 1 - 0 !
common/include/os/os_perf.h | 10 5 + 5 - 0 !
common/include/os/os_util.h | 1 1 + 0 - 0 !
common/include/os/pfwrapper.h | 4 4 + 0 - 0 !
common/include/perf.h | 24 12 + 12 - 0 !
common/numatop.c | 1 1 + 0 - 0 !
common/os/node.c | 29 29 + 0 - 0 !
common/os/os_cmd.c | 11 5 + 6 - 0 !
common/os/os_page.c | 2 1 + 1 - 0 !
common/os/os_perf.c | 93 64 + 29 - 0 !
common/os/os_util.c | 29 29 + 0 - 0 !
common/os/os_win.c | 44 29 + 15 - 0 !
common/os/pfwrapper.c | 124 124 + 0 - 0 !
common/perf.c | 48 24 + 24 - 0 !
16 files changed, 348 insertions(+), 96 deletions(-)

 [patch 04/16] add a feature to show per-node memory controller
 bandwidth
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Signed-off-by: Jin Yao <yao.jin@linux.intel.com>

0005 common os fix null pointer dereference on nrec.patch | (download)

common/os/pfwrapper.c | 4 2 + 2 - 0 !
1 file changed, 2 insertions(+), 2 deletions(-)

 [patch 05/16] common/os: fix null pointer dereference on nrec
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

pf_profiling_record checks that nrec is NULL, however, a subsequent call
from this function to profiling_recbuf_update dereferences nrec by a read
and a write.  Fix this by checking if nrec is NULL and returning early
in profiling_recbuf_update to avoid the dereference bug.

Fixes warning from clang scan-build:

common/os/pfwrapper.c:380:6: warning: Dereference of null pointer (loaded from variable 'nrec')
        i = *nrec;
            ^~~~~

Signed-off-by: Colin Ian King <colin.king@canonical.com>

0006 Do not print garbage latency if lat_data_get fails t.patch | (download)

common/win.c | 17 11 + 6 - 0 !
1 file changed, 11 insertions(+), 6 deletions(-)

 [patch 06/16] do not print garbage latency if lat_data_get fails to
 get latency
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

It is possible for lat_data_get to not succeed in reading the latency,
in which case the latency contains a garbage value and this misleading
value is printed.  Instead, print "unknown" if we cannot fetch the latency
to indicate that it could not be read rather than emiting an incorrect
garbage value.

Signed-off-by: Colin Ian King <colin.king@canonical.com>

0007 Initialise nprocs to zero to avoid printing garbage .patch | (download)

common/win.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 [patch 07/16] initialise nprocs to zero to avoid printing garbage
 nprocs value
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

nprocs is not intialized, so we can call reg_scroll_show passing a
garbage value of nprocs from the stack.  Instead, initialize it to
zero so we don't have a random garbage value being emitted.

Fixes clang scan-build warning:

common/win.c:3403:2: warning: Function call argument is an uninitialized value
        reg_scroll_show(data_reg, (void *)lines, nprocs,

Signed-off-by: Colin Ian King <colin.king@canonical.com>

0008 Fix some discarded const qualifiers on pointer targe.patch | (download)

common/lwp.c | 4 2 + 2 - 0 !
common/os/map.c | 4 2 + 2 - 0 !
common/os/os_win.c | 8 4 + 4 - 0 !
common/os/sym.c | 8 4 + 4 - 0 !
common/proc.c | 20 10 + 10 - 0 !
common/win.c | 4 2 + 2 - 0 !
6 files changed, 24 insertions(+), 24 deletions(-)

 [patch 08/16] fix some discarded 'const' qualifiers on pointer target
 type
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Building with -Wcast-qual shows that there are several occurrances
where const pointer target types are being cast to non-const. Fix
this minor issue by adding appropriate constifications.

Signed-off-by: Colin Ian King <colin.king@canonical.com>

0009 Remove duplicate declaration of dump_ctl.patch | (download)

common/util.c | 1 0 + 1 - 0 !
1 file changed, 1 deletion(-)

 [patch 09/16] remove duplicate declaration of dump_ctl
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Signed-off-by: Colin Ian King <colin.king@canonical.com>

0010 Put g_scr_height and g_scr_width into reg.h.patch | (download)

common/include/page.h | 3 0 + 3 - 0 !
common/include/reg.h | 4 4 + 0 - 0 !
common/include/win.h | 4 0 + 4 - 0 !
3 files changed, 4 insertions(+), 7 deletions(-)

 [patch 10/16] put g_scr_height and g_scr_width into reg.h
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

g_scr_height and g_scr_width belong to reg.c so it makes sense
to add their extern declarations in reg.h and remove the duplication
of these from page.h and win.h

Signed-off-by: Colin Ian King <colin.king@canonical.com>

0011 Put g_precise g_ncpus and g_sortkey into numatop.h.patch | (download)

common/cmd.c | 1 1 + 0 - 0 !
common/include/cmd.h | 2 0 + 2 - 0 !
common/include/numatop.h | 48 48 + 0 - 0 !
common/include/os/pfwrapper.h | 3 1 + 2 - 0 !
common/include/perf.h | 2 0 + 2 - 0 !
common/include/util.h | 1 0 + 1 - 0 !
common/include/win.h | 6 0 + 6 - 0 !
common/os/node.c | 1 1 + 0 - 0 !
common/os/os_util.c | 3 2 + 1 - 0 !
common/win.c | 1 1 + 0 - 0 !
10 files changed, 54 insertions(+), 14 deletions(-)

 [patch 11/16] put g_precise, g_ncpus and g_sortkey into numatop.h
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

g_precise, g_ncpus and g_sortkey belong to numatop.c so it makes
sense to add their extern declarations into numatop.h and remove the
duplication of these from node.c, os_util.c, win.c

Signed-off-by: Colin Ian King <colin.king@canonical.com>

0012 Make bufdesc_cut a static function.patch | (download)

common/win.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 [patch 12/16] make bufdesc_cut a static function
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

This function is only referenced in win.c, so make it static

Signed-off-by: Colin Ian King <colin.king@canonical.com>

0013 Make llrec_add a static function.patch | (download)

common/os/os_perf.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 [patch 13/16] make llrec_add a static function
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

This function is only referenced in os_perf.c, so make it static

Signed-off-by: Colin Ian King <colin.king@canonical.com>

0014 Make countval_sum a static function.patch | (download)

common/os/node.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 [patch 14/16] make countval_sum a static function
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

This function is only referenced in node.c, so make it static

Signed-off-by: Colin Ian King <colin.king@canonical.com>

0015 Don t compare a double with 0.0.patch | (download)

common/os/os_util.c | 3 2 + 1 - 0 !
1 file changed, 2 insertions(+), 1 deletion(-)

 [patch 15/16] don't compare a double with 0.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Compiling with -Wfloat-equal picks up a potential unsafe comparison
with 0.0:

common/os/os_util.c:228:11: warning: comparing floating point
  with == or != is unsafe [-Wfloat-equal]

instead, compare to see if it is less than a very small value.

Signed-off-by: Colin Ian King <colin.king@canonical.com>

0016 Add SKX supporting.patch | (download)

Makefile | 2 1 + 1 - 0 !
common/include/types.h | 5 3 + 2 - 0 !
common/os/plat.c | 12 9 + 3 - 0 !
common/util.c | 3 3 + 0 - 0 !
intel/include/skl.h | 50 50 + 0 - 0 !
intel/skl.c | 72 72 + 0 - 0 !
6 files changed, 138 insertions(+), 6 deletions(-)

 [patch 16/16] add skx supporting
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Signed-off-by: Jin Yao <yao.jin@linux.intel.com>