Bug 1285709

Summary: Entries in /proc/meminfo explained incorrectly
Product: Red Hat Enterprise Linux 6 Reporter: Jana Heves <jsvarova>
Component: doc-Deployment_GuideAssignee: Maxim Svistunov <msvistun>
Status: CLOSED CURRENTRELEASE QA Contact: ecs-bugs
Severity: unspecified Docs Contact:
Priority: high    
Version: 6.8CC: aquini, mflitter, mrdest, msvistun, poros, rfreire, rhel-docs, riel
Target Milestone: rcKeywords: Documentation
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-30 08:57:10 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 Jana Heves 2015-11-26 10:29:26 UTC
Document URL: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html-single/Deployment_Guide/

Section Number and Name: E.2.18. /proc/meminfo
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html-single/Deployment_Guide/index.html#s2-proc-meminfo

Describe the issue: 
The guide states that High Memory and Low Memory are "the kernel memory space".
Namely, the following lines in the guide are incorrect:

HighTotal and HighFree — The total and free amount of memory, in kilobytes, that is not directly mapped into kernel space. The HighTotal value can vary based on the type of kernel used. 

LowTotal and LowFree — The total and free amount of memory, in kilobytes, that is directly mapped into kernel space. The LowTotal value can vary based on the type of kernel used. 

Suggestions for improvement: 
rephrase the lines as follows:

HighTotal:  The total amount of memory in the high memory region.
HighFree: The amount of free memory of the high memory region.
High memory areas are for use by userspace programs, or for the pagecache. Highmem is all memory above (approx) 860MB of physical RAM, usually including data cache. The kernel can access the high memory region. 

LowTotal: The total amount of memory in the low memory region.
LowFree: The amount of free memory of the low memory region. 
The low memory region can be accessed by the kernel directly. All kernel datastructures need to go into low memory.

Additional information: 
Ask politely Sumanto Chakraborty <schakraborty> to help review the suggestions for improvement and update the section accordingly.

Comment 2 Jana Heves 2015-11-26 10:32:50 UTC
Dear Sumanto,

Thank you very much for drawing our attention to incorrect documentation of entries in /proc/meminfo.

Could you please review my suggestions for improvement? I tried to provide new definitions for the four entries.

Any help is much appreciated.
Thanks,
jana

Comment 8 Alex Juncu 2016-04-08 12:39:20 UTC
Hi!

From the kernel code, it looks like the values are not in kB (kilobytes) but in kibibytes (KiB) because they are multiples of pages (which is usually 4096B = 4KiB).

Getting the correct definitions of the values might be a little tricky, but the starting point should be:

http://git.app.eng.bos.redhat.com/git/rhel6.git/tree/Documentation/filesystems/proc.txt

If that documentation is not accurate, you should get in touch with Kernel Engineers (devs) to provide more details.

Thanks!

Comment 10 Alex Juncu 2016-04-11 07:27:55 UTC
Following the discussion with Maxim, I submitted an RFC to kernel upstream about the kB/KiB.

I think we should document this thing: the values are in fact kibibytes.
So even if the output is 'kB', it should be considered to be 'KiB'.

It would probably be useful to:
1) do a mention that the output is technically incorrect. Explain that due to legacy issues the hardcoded 'kB' cannot be changed the meaning of 'kB' is actually 1024 bytes which is KiB (kibibyte).

2) Use the correct terms in our documentation (I am working to push some update to upstream documentation about this). When explaining each term instead of 'kilobyes' used the correct term of 'kibibytes'.

Thanks!

Comment 16 Rik van Riel 2016-05-23 14:01:41 UTC
The Linux developers (including me) have written some documentation on /proc/meminfo already.

Please start reading here:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/filesystems/proc.txt#n831

Comment 23 Maxim Svistunov 2016-05-30 08:57:10 UTC
The extensively changed appendix section /proc/meminfo is now available at:

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s2-proc-meminfo.html

Thanks everybody for help!