Calculating private and shared memory for processes

2023-02-10 Thread Rahul Gore (Nokia)
Hi,

I'm trying to find private and shared memory usage of each process in Linux. 
One answer on Stack Overflow suggested using 'smem' utility (it reads 
/proc//smap). However, the sum of all PSS values in 'smem' output is not 
equal to Used value of the 'free' utility (it reads /proc/meminfo).

CLI output:

$ sudo smem -t | tail -n 5
2950301 1002 gfstandalone_1_0 --test hw/0  1427244  1435899  1453060
2950368 1002 gfstandalone_1_1 --test hw/0  1432172  1440818  1457588
3012185 rgorejava -classpath /home/rgore0  2159256  2159348  2163268
---
  537 23 702168 2474 26865451 62093364
$ free -w
   totalusedfree  shared buffers   
cache   available
Mem:6562503626415500  511020  351372 1541640
3715687638119868
Swap:2097148  726148 1371000


So, I doubt the accuracy of the values in /proc//smap. Is there a more 
reliable alternative?

Regards,
Rahul
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Use of "iommu-map-mask" for PCIe root complex device tree node, does it make actual requester ID ignored?

2023-02-10 Thread Chan Kim
Hello all,

For pcie RC's iommu, (this iommu translates address for each PCI device dma
masters when they access memory or io in the system), we can set "iommus"
specifier in the device tree node for the PCIe RC. The "iommus" property
generally tells for a bus master devices which iommu device's master
interface it is connected to. (iommu device sits between the interconnect
and the dma master device). For PCIe RC case, we can use RID(requester ID)
from the PCIe device in the iommu processing so that the PCIe devices can
use their own address translation table in the iommu.  

I briefly saw 'of_iommu_configure_dev_id' and 'of_map_id' functions and
guessed even if the hardware connects the RID from the PCIe to the iommu
device, if I set 'iommu-map-mask' value to zero, the software sets the iommu
translation table so that the actual RID is not used in the processing. But
I'm not sure if my guess is correct. 

Can any one tell me what the case is?

Thank you.

Chan Kim





___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies