### This benchmark simply consumes memory in a loop. In some cases it can be
### used to highlight reclaim-related problems. In this case, the configuration
### on NUMA machines may trigger premature swapping and reclaim.

export MMTESTS="usemem"

# List of monitors
export MONITOR_FTRACE_EVENTS="
	compaction/mm_compaction_begin
	compaction/mm_compaction_defer_compaction
	compaction/mm_compaction_deferred
	compaction/mm_compaction_defer_reset
	compaction/mm_compaction_end
	compaction/mm_compaction_finished
	compaction/mm_compaction_isolate_freepages
	compaction/mm_compaction_isolate_migratepages
	compaction/mm_compaction_kcompactd_sleep
	compaction/mm_compaction_kcompactd_wake
	compaction/mm_compaction_migratepages
	compaction/mm_compaction_suitable
	compaction/mm_compaction_try_to_compact_pages
	compaction/mm_compaction_wakeup_kcompactd
	kmem/mm_page_alloc_extfrag"
export RUN_MONITOR=yes
export MONITORS_ALWAYS=
export MONITORS_GZIP="proc-vmstat proc-buddyinfo proc-pagetypeinfo mpstat"
export MONITORS_WITH_LATENCY="vmstat"
export MONITOR_UPDATE_FREQUENCY=10

# Memory consumer. 80% of memory will stress compaction on 2-socket and
# larger machines when defrag is set to always
echo always > /sys/kernel/mm/transparent_hugepage/defrag
export USEMEM_WORKLOAD_SIZE=$((MEMTOTAL_BYTES*4/5))
export USEMEM_PERCENTAGE_ANON=100
export USEMEM_LOOPS=60
export USEMEM_ITERATIONS=7
export USEMEM_MIN_THREADS=1
export USEMEM_MAX_THREADS=4
