Blob Blame History Raw
From ffbc7a05e1777f4a2b3096483519fe5096ecc716 Mon Sep 17 00:00:00 2001
From: Sanskriti Sharma <sansharm@redhat.com>
Date: Tue, 20 Nov 2018 10:22:06 -0500
Subject: [PATCH] memhog: add man page

Signed-off-by: Sanskriti Sharma <sansharm@redhat.com>
---
 memhog.8 | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 memhog.8

diff --git a/memhog.8 b/memhog.8
new file mode 100644
index 0000000..e28e784
--- /dev/null
+++ b/memhog.8
@@ -0,0 +1,68 @@
+.TH MEMHOG 8 "2003,2004" "SuSE Labs" "Linux Administrator's Manual"
+.SH NAME
+memhog \- Allocates memory with policy for testing
+.SH SYNOPSIS
+.B memhog 
+[
+.B \-r<NUM>
+] [
+.B size kmg
+] [
+.B policy nodeset
+] [
+.B \-f<filename>
+]
+.SH DESCRIPTION
+.B memhog 
+mmaps a memory region for a given size and sets the numa policy (if specified). 
+It then updates the memory region for the given number of iterations using memset.
+.TS
+tab(|);
+l l.
+-r<num>|Repeat memset NUM times
+-f<file>|Open file for mmap backing
+-H|Disable transparent hugepages
+-size|Allocation size in bytes, may have case-insensitive order 
+|suffix (G=gigabyte, M=megabyte, K=kilobyte)
+.TE
+
+Supported numa-policies:
+.TP
+.B interleave 
+Memory will be allocated using round robin on nodes. When
+memory cannot be allocated on the current interleave, target fall back 
+to other nodes.  Multiple nodes may be specified.
+.TP
+.B membind 
+Only  allocate  memory  from  nodes. Allocation will fail 
+when there is not enough memory available on these nodes. Multiple 
+nodes  may be specified.
+.TP
+.B preferred 
+Preferably allocate memory on node, but if memory cannot be
+allocated  there  fall  back  to other nodes.  This option takes only a 
+single node number.
+.TP
+.B default 
+Memory will be allocated on the local node (the node the 
+thread is running on)
+
+.SH EXAMPLES
+.TP
+# Allocate a 1G region, mmap backed by memhog.mmap file, membind to node 0, repeat test 6 times
+memhog -r6 1G --membind 0 -fmemhog.mmap
+.TP
+# Allocate a 1G region, iterleave across nodes 0,1,2,3, repeat test 4 times
+memhog -r4 1G --interleave 0-3
+.TP
+# Allocate a 1G region, (implicit) default policy, repeat test 8 times
+memhog -r8 1G
+
+.SH AUTHORS
+Andi Kleen (ak@suse.de)
+
+.SH LICENSE
+GPL v2
+
+.SH SEE ALSO
+.I mmap(2), memset(3), numactl(8), numastat(8)
-- 
2.7.5