This patch adds a basic manual page for hugectl. Signed-off-by: Mel Gorman <[EMAIL PROTECTED]> --- Makefile | 7 ++++ man/hugectl.8 | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 112 insertions(+), 0 deletions(-) create mode 100644 man/hugectl.8
diff --git a/Makefile b/Makefile index a531072..1ed2e7a 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ BIN_OBJ_DIR=obj INSTALL_BIN = hugectl hugeedit INSTALL_HEADERS = hugetlbfs.h INSTALL_MAN7 = libhugetlbfs.7 +INSTALL_MAN8 = hugectl.8 LDSCRIPT_TYPES = B BDT LDSCRIPT_DIST_ELF = elf32ppclinux elf64ppc elf_i386 elf_x86_64 INSTALL_OBJSCRIPT = ld.hugetlbfs @@ -110,6 +111,7 @@ BINDIR = $(PREFIX)/share/libhugetlbfs EXEDIR = $(PREFIX)/bin DOCDIR = $(PREFIX)/share/doc/libhugetlbfs MANDIR7 = $(PREFIX)/man/man7 +MANDIR8 = $(PREFIX)/man/man8 ifdef LIB32 LIBPATHS += -DLIB32='"$(LIB32)"' -DLIBDIR32='"$(LIBDIR32)"' @@ -286,6 +288,7 @@ install: libs tools $(OBJDIRS:%=%/install) $(INSTALL_OBJSCRIPT:%=objscript.%) $(INSTALL) -d $(DESTDIR)$(LDSCRIPTDIR) $(INSTALL) -d $(DESTDIR)$(HEADERDIR) $(INSTALL) -d $(DESTDIR)$(MANDIR7) + $(INSTALL) -d $(DESTDIR)$(MANDIR8) $(INSTALL) -m 644 -t $(DESTDIR)$(HEADERDIR) $(INSTALL_HEADERS) $(INSTALL) -m 644 $(INSTALL_LDSCRIPTS:%=ldscripts/%) $(DESTDIR)$(LDSCRIPTDIR) $(INSTALL) -d $(DESTDIR)$(BINDIR) @@ -300,6 +303,10 @@ install: libs tools $(OBJDIRS:%=%/install) $(INSTALL_OBJSCRIPT:%=objscript.%) $(INSTALL) -m 444 man/$$x $(DESTDIR)$(MANDIR7); \ gzip -f $(DESTDIR)$(MANDIR7)/$$x; \ done + for x in $(INSTALL_MAN8); do \ + $(INSTALL) -m 444 man/$$x $(DESTDIR)$(MANDIR8); \ + gzip -f $(DESTDIR)$(MANDIR8)/$$x; \ + done cd $(DESTDIR)$(BINDIR) && ln -sf ld.hugetlbfs ld install-docs: diff --git a/man/hugectl.8 b/man/hugectl.8 new file mode 100644 index 0000000..8009089 --- /dev/null +++ b/man/hugectl.8 @@ -0,0 +1,105 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH HUGECTL 7 "October 8, 2008" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp <n> insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +hugectl \- Control policy for backing text, data and malloc() with hugepages +.SH SYNOPSIS +.B hugectl [options] command {arguments} +.SH DESCRIPTION + +\fBhugectl\fP runs processes with a specific policy for backing memory regions +with hugepages. The use of hugepages benefit applications that use large +amounts of address space and suffer a performance hit due to TLB misses. +Policy is enforced by \fBlibhugetlbfs\fP and \fBhugectl\fP configures the +environment based on the options provided. Wall-clock time or oprofile can +be used to determine if there is a performance benefit from using hugepages +or not. + +To effectively back text/data, the target process must be relinked to align +the ELF segments on a hugepage boundary. The library also supports more options +for the control of memory regions than are exposed by the \fBhugectl\fP +utility. See the \fBlibhugetlbfs\fP manual page for more details. + +The following options affect what memory regions are backed by hugepages. + +.TP +.B --text,--data,--bss +Back the text, data or BSS segments with hugepages. To be effective, the +process must be relinked as described in the HOWTO to align the ELF segments. +It is possible to partially back segments using the HUGETLB_FORCE_ELMAP +environment variable as described in the \fBlibhugetlbfs\fP manual page. + +.TP +.B --heap +Use the glibc morecore hook to back malloc() with hugepages. Note that this +does not affect brk() segments and applications that use custom allocators +potentially do not use hugepages for their heap even with this option +specified. + +.TP +.B --shm +This option overrides shmget() to back shared memory regions with hugepages +if possible. Segment size requests will be aligned to fit to the default +hugepage size region. + +.PP +The following options affect how \fBhugectl\fP behaves. + +.TP +.B --no-preload +Disable any pre-loading of the \fBlibhugetlbfs\fP library. This may be necessary +if only the heap is being backed by hugepages and the application is already +linked against the library. \fBhugectl\fP may pre-load the library by mistake +and this option prevents that. + +.TP +.B --dry-run +Instead of running the process, the \fBhugectl\fP utility will describe what +environment variables it set for \fBlibhugetlbfs\fP. This is useful if +additional environment variables are to be set and a launcher shell script is +being developed. + +.TP +.B --library-use-path +By default, \fBhugectl\fP will use the version of \fBlibhugetlbfs\fP it was +installed with, even if this is not in the LD_LIBRARY_PATH environment. Using +this option forces \fBhugectl\fP to use the version of \fBlibhugetlbfs\fP +installed in the library system path. + +.TP +.B --library-path <path> +This option forces \fBhugectl\fP to use the \fBlibhugetlbfs\fP libraries within +the given prefix. + +.PP +The following options affect the verbosity of libhugetlbfs. + +.TP +.B --verbose <level>, -v +The default value for the verbosity level is 1 and the range of the value can +be set with --verbose from 0 to 99. The higher the value, the more verbose the +library will be. 0 is quiet and 3 will output much debugging information. The +verbosity level is increased by one each time -v is specified. + +.SH SEE ALSO +.I oprofile(1), +.I libhugetlbfs(7) +.br +.SH AUTHORS +libhugetlbfs was written by various people on the libhugetlbfs-devel +mailing list. + -- 1.5.6.5 ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Libhugetlbfs-devel mailing list Libhugetlbfs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel