Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hugepage: mention libhugetlbfs in doc

Explicitly mention/recommend using the libhugetlbfs test cases when
changing related kernel code. Developers that are unaware of the project
can easily miss this and introduce potential regressions that may or may
not be caught by community review.

Also do some cleanups that make the document visually easier to view at a
first glance.

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Davidlohr Bueso and committed by
Linus Torvalds
15610c86 2cad4018

+12 -13
+12 -13
Documentation/vm/hugetlbpage.txt
··· 165 165 166 166 167 167 Interaction of Task Memory Policy with Huge Page Allocation/Freeing 168 + =================================================================== 168 169 169 170 Whether huge pages are allocated and freed via the /proc interface or 170 171 the /sysfs interface using the nr_hugepages_mempolicy attribute, the NUMA ··· 230 229 of huge pages over all on-lines nodes with memory. 231 230 232 231 Per Node Hugepages Attributes 232 + ============================= 233 233 234 234 A subset of the contents of the root huge page control directory in sysfs, 235 235 described above, will be replicated under each the system device of each ··· 260 258 261 259 262 260 Using Huge Pages 261 + ================ 263 262 264 263 If the user applications are going to request huge pages using mmap system 265 264 call, then it is required that system administrator mount a file system of ··· 299 296 without MAP_HUGETLB. For an example of how to use mmap with MAP_HUGETLB see 300 297 map_hugetlb.c. 301 298 302 - ******************************************************************* 299 + Examples 300 + ======== 303 301 304 - /* 305 - * map_hugetlb: see tools/testing/selftests/vm/map_hugetlb.c 306 - */ 302 + 1) map_hugetlb: see tools/testing/selftests/vm/map_hugetlb.c 307 303 308 - ******************************************************************* 304 + 2) hugepage-shm: see tools/testing/selftests/vm/hugepage-shm.c 309 305 310 - /* 311 - * hugepage-shm: see tools/testing/selftests/vm/hugepage-shm.c 312 - */ 306 + 3) hugepage-mmap: see tools/testing/selftests/vm/hugepage-mmap.c 313 307 314 - ******************************************************************* 315 - 316 - /* 317 - * hugepage-mmap: see tools/testing/selftests/vm/hugepage-mmap.c 318 - */ 308 + 4) The libhugetlbfs (http://libhugetlbfs.sourceforge.net) library provides a 309 + wide range of userspace tools to help with huge page usability, environment 310 + setup, and control. Furthermore it provides useful test cases that should be 311 + used when modifying code to ensure no regressions are introduced.