aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/ABI
diff options
context:
space:
mode:
authorNishanth Aravamudan <nacc@us.ibm.com>2008-07-24 00:27:44 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 13:47:17 -0400
commita3437870160cf2caaac6bdd76c7377a5a4145a8c (patch)
tree6d3c8ddd442e4cd96f1f8bdcf59fcaef72f4edc9 /Documentation/ABI
parenta137e1cc6d6e7d315fef03962a2a5a113348b13b (diff)
hugetlb: new sysfs interface
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). [dave@linux.vnet.ibm.com: fix build] [nacc@us.ibm.com: hugetlb: hang off of /sys/kernel/mm rather than /sys/kernel] [nacc@us.ibm.com: hugetlb: remove CONFIG_SYSFS dependency] Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: Dave Hansen <dave@linux.vnet.ibm.com> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/ABI')
-rw-r--r--Documentation/ABI/testing/sysfs-kernel-mm-hugepages15
1 files changed, 15 insertions, 0 deletions
diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-hugepages b/Documentation/ABI/testing/sysfs-kernel-mm-hugepages
new file mode 100644
index 00000000000..e21c00571cf
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-kernel-mm-hugepages
@@ -0,0 +1,15 @@
1What: /sys/kernel/mm/hugepages/
2Date: June 2008
3Contact: Nishanth Aravamudan <nacc@us.ibm.com>, hugetlb maintainers
4Description:
5 /sys/kernel/mm/hugepages/ contains a number of subdirectories
6 of the form hugepages-<size>kB, where <size> is the page size
7 of the hugepages supported by the kernel/CPU combination.
8
9 Under these directories are a number of files:
10 nr_hugepages
11 nr_overcommit_hugepages
12 free_hugepages
13 surplus_hugepages
14 resv_hugepages
15 See Documentation/vm/hugetlbpage.txt for details.