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