Bug 103073

Summary: hugepage documentation incorrect...
Product: Red Hat Enterprise Linux 3 Reporter: Johnray Fuller <jrfuller>
Component: kernelAssignee: Jason Baron <jbaron>
Status: CLOSED CURRENTRELEASE QA Contact: Brian Brock <bbrock>
Severity: high Docs Contact:
Priority: medium    
Version: 3.0CC: knoel
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-09-26 16:30:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Johnray Fuller 2003-08-26 13:45:55 UTC
Description of problem:

The following documentation is incorrect:

/usr/src/linux-2.4/Documentation/vm/hugetlbpage.txt

It states that the kernel parameter to adjust for hugepages is
/proc/sys/vm/nr_hugepages. This file no longer exists. 

I believe the new file is:

/proc/sys/vm/hugetlb_pool

Please verify the accuracy of this file as it is really the only documentation
about in the distribution that explains this feature.

Thanks,
Johnray

Comment 1 Johnray Fuller 2003-08-26 14:24:33 UTC
This is also not how I understand it:

"Use the following command to dynamically allocate/deallocate hugepages:

	echo 20 > /proc/sys/vm/nr_hugepages

This command will try to configure 20 hugepages in the system."

I thought the value echoed is in megabytes and that this value is divided by the
size of the hugepages (2, 4 or 256 depending on the kernel) to determine the
total number of hugepages. So on an SMP x86 kernel, this command would create 10
hugepages. On a UP x86 kernel, this would create 5 hugepages, and on. 

Is my interpretation of this incorrect or is the documentation?

J

Comment 2 Jason Baron 2003-08-27 16:23:32 UTC
nr_hugepages is in 'page' units
hugetlb_page is in MB units...

for as3 we have the hugetlb_page interface

Comment 3 Johnray Fuller 2003-08-27 18:28:55 UTC
So /proc/sys/vm/hugetlb_pool and /proc/sys/vm/nr_hugepages are not synonymous
and function differently. But /proc/sys/vm/nr_hugepages is not present in Taroon.

Are their plans to add /proc/sys/vm/hugetlb_pool to this kernel document? As it
stands the inconsistency between the /proc chapter in the RG
(http://intranet.corp.redhat.com/docs/taroon/rhel-rg-en/ch-proc.html) and this
document are very confusing.

I reference this document because it is the only thing that explains how to set
up and use hugepages.

Also, does hugetlb_page = hugetlb_pool?

J



Comment 4 Jason Baron 2003-08-27 18:49:51 UTC
first, yes i mean hugetlb_pool, not hugetlb_page. i think generally the
Documentation directory in the kernel is understood to apply to the upstream
kernel, and is superceded by any Red Hat documentation. But, i'm not sure this
policy or understanding is explicitly laid out anywhere



Comment 5 Johnray Fuller 2003-08-27 21:05:46 UTC
So this document is not going to be updated or ammended?

We don't have the time to incorporate a Red Hat-specific version of this file
before deadline into the RG.

Is there any documentation online about the Red Hat implementation I can point
to by chance?

Finally, is everything else accurate in this document appart from the references
to nr_hugepages? If so, I can put a disclaimer in the proc chapter highlighting
that detail.

J

Comment 6 Jason Baron 2003-09-03 16:28:54 UTC
i don't think we're updating the the Documentation/vm/hugetlbpage.txt file. I
think everything there is correct w/respect to Red Hat's implementation, except
for the nr_hugepages, as you mentioned. 

Comment 7 Johnray Fuller 2003-09-08 21:14:58 UTC
The excerpt below is from the updated proc chapter, available online at the
following URL:

http://intranet.corp.redhat.com/docs/taroon/rhel-rg-en/s1-proc-directories.html#S3-PROC-SYS-VM

"Refer to /usr/src/linux-2.4/Documentation/vm/hugetlbpage.txt  for more
information about configuring hugepages.

Important
 

Despite being mentioned in hugetlbpage.txt, the file /proc/sys/vm/nr_hugepages
does not exist within Red Hat Enterprise Linux. Instead hugetlb_pool should be
used to configure the number of hugepages available for the system. Also, it is
important to remember that nr_hugepages uses hugepage units, while hugetlb_pool
configures hugepages in megabytes."

Is this sufficient?

Comment 8 Jason Baron 2003-09-26 16:30:54 UTC
looks fine, i'm closing this