forked from analogdevicesinc/linux
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide new hugepages user APIs that are more suited to multiple hstates in sysfs. There is a new directory, /sys/kernel/hugepages. Underneath that directory there will be a directory per-supported hugepage size, e.g.: /sys/kernel/hugepages/hugepages-64kB /sys/kernel/hugepages/hugepages-16384kB /sys/kernel/hugepages/hugepages-16777216kB corresponding to 64k, 16m and 16g respectively. Within each hugepages-size directory there are a number of files, corresponding to the tracked counters in the hstate, e.g.: /sys/kernel/hugepages/hugepages-64/nr_hugepages /sys/kernel/hugepages/hugepages-64/nr_overcommit_hugepages /sys/kernel/hugepages/hugepages-64/free_hugepages /sys/kernel/hugepages/hugepages-64/resv_hugepages /sys/kernel/hugepages/hugepages-64/surplus_hugepages Of these files, the first two are read-write and the latter three are read-only. The size of the hugepage being manipulated is trivially deducible from the enclosing directory and is always expressed in kB (to match meminfo). [[email protected]: fix build] [[email protected]: hugetlb: hang off of /sys/kernel/mm rather than /sys/kernel] [[email protected]: hugetlb: remove CONFIG_SYSFS dependency] Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Nishanth Aravamudan <[email protected]> Signed-off-by: Nick Piggin <[email protected]> Cc: Dave Hansen <[email protected]> Signed-off-by: Nishanth Aravamudan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information
Showing
4 changed files
with
262 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
What: /sys/kernel/mm/hugepages/ | ||
Date: June 2008 | ||
Contact: Nishanth Aravamudan <[email protected]>, hugetlb maintainers | ||
Description: | ||
/sys/kernel/mm/hugepages/ contains a number of subdirectories | ||
of the form hugepages-<size>kB, where <size> is the page size | ||
of the hugepages supported by the kernel/CPU combination. | ||
|
||
Under these directories are a number of files: | ||
nr_hugepages | ||
nr_overcommit_hugepages | ||
free_hugepages | ||
surplus_hugepages | ||
resv_hugepages | ||
See Documentation/vm/hugetlbpage.txt for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters