Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1131498

Summary: E.2.1. /proc/buddyinfo contains and error
Product: Red Hat Enterprise Linux 6 Reporter: Elie De Brauwer <eliedebrauwer>
Component: doc-Deployment_GuideAssignee: Jaromir Hradilek <jhradile>
Status: CLOSED CURRENTRELEASE QA Contact: ecs-bugs
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.6Keywords: Documentation, EasyFix
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-17 12:29:31 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 Elie De Brauwer 2014-08-19 12:29:13 UTC
Description of problem:


The formula used to express the chunk size expressed in /proc/buddyinfo is wrong. The current page and examples state that the size of chunk is  2^(order*PAGE_SIZE) byte large chunk. This is incorrect, the correct formule is (2^order)*PAGE_SIZE.  PAGE_SIZE is typically 4096, hence it's obvious that even for small orders (>0) this value will explode.

To quote the linux kernel documentation (e.g. http://lxr.missinglinkelectronics.com/#linux+v3.16/Documentation/filesystems/proc.txt#L697 ) where they state "2^0*PAGE_SIZE" obviously this is (2^0)*PAGE_SIZE and not 2^(0*PAGE_SIZE) as in the deployment guide.


Direct link to the affecting page: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6-Beta/html/Deployment_Guide/s1-proc-topfiles.html#s2-proc-buddyinfo

Version-Release number of selected component (if applicable): 6.6 Beta, but also in older versions of the document covering the same material.


How reproducible: Read the docs.

Comment 2 Jaromir Hradilek 2014-08-19 15:30:55 UTC
Thank you very much for taking the time to report this issue.

Comment 3 Jaromir Hradilek 2014-08-19 16:54:32 UTC
Hi Elie,

I have corrected the formula and edited the description a little to make it easier to read and understand. As a consequence, the updated section now reads:

  E.2.1. /proc/buddyinfo

  This file is used primarily for diagnosing memory fragmentation
  issues. The following is an example of a typical /proc/buddyinfo
  file:

    Node 0, zone      DMA     90      6      2      1      1      ...
    Node 0, zone   Normal   1650    310      5      0      0      ...
    Node 0, zone  HighMem      2      0      0      1      1      ...

  Using the buddy algorithm, each column represents the number of
  pages of a certain order (a certain size) that are available at any
  given time. For example, for zone direct memory access (DMA), there
  are 90 of (2^0)*PAGE_SIZE chunks of memory. Similarly, there are 6
  of (2^1)*PAGE_SIZE chunks, and 2 of (2^2)*PAGE_SIZE chunks of memory
  available.

  The DMA row references the first 16 MB of memory on the system, the
  HighMem row references all memory greater than 4 GB on the system,
  and the Normal row references the memory in between.

When you have a moment, could you please take a look at this updated section and let me know if this resolves your issue or if there is anything else you would like me to change? I can see that the description of available rows needs to be updated too (on my 64-bit system, I also have DMA32 and don't have HighMem at all), but I will open a separate bug for that.

Thank you,
Jaromir Hradilek

Comment 4 Jaromir Hradilek 2014-08-19 17:24:02 UTC
> I can see that the description of available rows needs to be updated too
> (on my 64-bit system, I also have DMA32 and don't have HighMem at all),
> but I will open a separate bug for that.

Created bug 1131631.

Comment 5 Elie De Brauwer 2014-08-20 08:31:07 UTC
Jaromir,

Thanks for looking so quickly at this. The only thing I would add is an indication of the units, since you are essentialy using the order to calculate the size of these chunks. The reason why I bumped in this page was to figure out that 'order 11' implied chunks of 8 megabyte large. So I would change (imagine you replace the formula by the actual size)

... are 90 of 4096 chunks of memory. 

And replace it by something like 

... are 90 of (2^0)*PAGE_SIZE _bytes large_ chunks of memory.

What do you think ? 


my 2 cents
E.

Comment 6 Jaromir Hradilek 2014-08-20 15:00:19 UTC
That is a very good point. How about something like this:

  Using the buddy algorithm, each column represents the number of pages of
  a certain order (a certain size) that are available at any given time. In
  the example above, for zone DMA, there are 90 of (2^0)*PAGE_SIZE bytes
  large chunks of memory. Similarly, there are 6 of (2^1)*PAGE_SIZE chunks,
  and 2 of (2^2)*PAGE_SIZE chunks of memory available.

I do not want to repeat the "bytes large chunks of memory" part every time,
because it makes the sentence a little too complicated, I think.

Thank you,
Jaromir

Comment 7 Elie De Brauwer 2014-08-20 15:17:47 UTC
Fine for me !

Comment 9 Jaromir Hradilek 2014-08-22 18:57:08 UTC
Hi Elie,

I have published a new version of the book on the Customer Portal so that you can find the corrected section here:

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6-Beta/html/Deployment_Guide/s1-proc-topfiles.html#s2-proc-buddyinfo

Thank you,
Jaromir