Bug 1985519

Summary: [RFE] Don't monitor DMA or DMA32 zones when the zone is not in Node 0
Product: Red Hat Enterprise Linux 8 Reporter: Charles Haithcock <chaithco>
Component: pcpAssignee: Nathan Scott <nathans>
Status: CLOSED ERRATA QA Contact: Jan Kurik <jkurik>
Severity: medium Docs Contact: Apurva Bhide <abhide>
Priority: medium    
Version: 8.6CC: agerstmayr, jkurik, nathans, patrickm
Target Milestone: betaKeywords: FutureFeature, Triaged
Target Release: 8.6Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: pcp-5.3.5-1.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-10 13:30:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Charles Haithcock 2021-07-23 19:19:19 UTC
Description of problem:

PCP by default monitors /proc/zoneinfo and collects everything there. However, DMA and DMA32 zones will never have memory in them beyond Node 0. These zones are (mostly) dedicated to device IO and must reside on the lowest addresses in NUMA Node 0, as devices can use 8 and 16 bit addressing. Similarly, the kernel hardcodes the upper limits of physical memory address ranges for those two zone types. The kernel simply lazily enumerates them for other NUMA nodes as well for code efficiency but does not put memory into them. 

PCP should not monitor DMA or DMA32 for NUMA Nodes above Node 0 as it will never be useful. Doing so will help reduce the amount of data collected and should see a small reduction in pmlogger sizes (which will be more noticable on considerably larger systems with many many NUMA nodes, this will be a negligible change for systems with much fewer Nodes).


Version-Release number of selected component (if applicable):

 $ grep -e ^pcp -e ^pm installed-rpms 
pcp-5.2.5-4.el8.x86_64                                      Tue Jun 15 22:23:52 2021
pcp-conf-5.2.5-4.el8.x86_64                                 Tue Jun 15 22:23:51 2021
pcp-libs-5.2.5-4.el8.x86_64                                 Tue Jun 15 22:23:51 2021


How reproducible:

100%


Steps to Reproduce:
1. 
2.
3.

Actual results:

Tracking guaranteed 0s for DMA and DMA32 zones for NUMA nodes above node 0

Expected results:

Those metrics are never tracked to begin with 

Additional info:

From the customer's pcp data (as an example):

 $ pminfo -tf -a 20210519.0.xz mem.zoneinfo.spanned

mem.zoneinfo.spanned [spanned space in each zone for each NUMA node]
    inst [0 or "DMA::node0"] value 16380
    inst [1 or "Normal::node0"] value 99221504
    inst [2 or "Normal::node1"] value 102760448
    inst [3 or "Device::node1"] value 0
    inst [4 or "DMA32::node0"] value 4177920
    inst [5 or "Movable::node0"] value 0
    inst [6 or "Device::node0"] value 0
    inst [7 or "DMA::node1"] value 0         <---
    inst [8 or "DMA32::node1"] value 0       <---
    inst [9 or "Movable::node1"] value 0

Comment 13 errata-xmlrpc 2022-05-10 13:30:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (pcp bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:1765