You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In AIX the page size can vary from process to process. AIX supports multiple page sizes (typically 4 KB and 16 KB, but it can also support larger page sizes in specific configurations, such as 64 KB, 1 MB, or 16 MB depending on hardware and OS configuration). Therefore e.g. to calculate the resident set size (RSS) accurately, you need to retrieve the page size specific to each process.
So in my opinion this line is problematic:
(int)procs[i].pi_size4, / convert pages to KBytes */
The text was updated successfully, but these errors were encountered:
Hi,
Interesting question - here are my comments.
First. a single process can have multiple pages sizes and the kernel can migrate between the page sizes on the fly.
Second, the getprocs() and getproces64() system calls pre-date AIX having multiple page sizes by many years, so this is not reflected in the data returned by these functions.
The pi_size from the hearer file:
unsigned long pi_size; /* size of image (pages) */
is in number of 4KB pages. A bit of a shame it does not actually state that but then the C comment pre-dates any ideas of multiple page sizes.
I would expect the functions to to the maths for us to return the 4KB page count.
This is so that older programs using the data structure do not have to change and will not fail on news AIX releases.
If you doubt that then you could raise an AIX support case.
Hi Nigel, thank you very much for your reply. I believe you are correct in your assessment regarding the functions to match for us to return the 4KB page number. Based on your reasoning, this seems perfectly logical to me and very well-founded.
In AIX the page size can vary from process to process. AIX supports multiple page sizes (typically 4 KB and 16 KB, but it can also support larger page sizes in specific configurations, such as 64 KB, 1 MB, or 16 MB depending on hardware and OS configuration). Therefore e.g. to calculate the resident set size (RSS) accurately, you need to retrieve the page size specific to each process.
So in my opinion this line is problematic:
(int)procs[i].pi_size4, / convert pages to KBytes */
The text was updated successfully, but these errors were encountered: