aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMel Gorman <mel@csn.ul.ie>2008-11-10 11:55:32 +0000
committerEric B Munson <ebmunson@us.ibm.com>2008-11-10 15:10:50 +0000
commitceb9193fadfa67d7afa7d9bdd1fc007b8dcd2bf1 (patch)
tree8e5dc11c0a6386b917cf82848c9c6574acee8009 /Makefile
parentb656d0829e4e6a8f6a8b7ecd326f6da9881955db (diff)
downloadlibhugetlbfs-ceb9193fadfa67d7afa7d9bdd1fc007b8dcd2bf1.tar.gz
Add get_hugepage_region() as a malloc-like interface that uses hugepages
The get_huge_pages() API is a close-to-kernel interface for the direct allocation of hugepages. This forces the caller to deal with alignment and fallback to base pages where suitable. For the casual user of hugepages that does not care for such things, this patch adds get_hugepage_region(). It allocates regions of memory that are backed by hugepages where possible but callers are not required to align their length and can request fallback to base pages. Signed-off-by: Mel Gorman <mel@csn.ul.ie> Acked-by: Adam Litke <agl@us.ibm.com> Acked-by: Eric B Munson <ebmunson@us.ibm.com> Signed-off-by: Eric B Munson <ebmunson@us.ibm.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 4554154..40c8c45 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,8 @@ BIN_OBJ_DIR=obj
INSTALL_BIN = hugectl hugeedit hugeadm pagesize
INSTALL_HEADERS = hugetlbfs.h
INSTALL_MAN1 = pagesize.1
-INSTALL_MAN3 = get_huge_pages.3 gethugepagesizes.3 getpagesizes.3
+INSTALL_MAN3 = get_huge_pages.3 get_hugepage_region.3 \
+ gethugepagesizes.3 getpagesizes.3
INSTALL_MAN7 = libhugetlbfs.7
INSTALL_MAN8 = hugectl.8 hugeedit.8 hugeadm.8
LDSCRIPT_TYPES = B BDT
@@ -379,7 +380,9 @@ install-man:
gzip -f $(DESTDIR)$(MANDIR3)/$$x; \
done
rm -f $(DESTDIR)$(MANDIR3)/free_huge_pages.3.gz
+ rm -f $(DESTDIR)$(MANDIR3)/free_hugepage_region.3.gz
ln -s get_huge_pages.3.gz $(DESTDIR)$(MANDIR3)/free_huge_pages.3.gz
+ ln -s get_hugepage_region.3.gz $(DESTDIR)$(MANDIR3)/free_hugepage_region.3.gz
for x in $(INSTALL_MAN7); do \
$(INSTALL) -m 444 man/$$x $(DESTDIR)$(MANDIR7); \
gzip -f $(DESTDIR)$(MANDIR7)/$$x; \