### This a benchmark that stresses THP allocations in a specific manner.
### It first creates a file, maps it and creats a large anonymous mapping.
### In then punches holes in the file mapping that are naturally aligned
### and half the size of a THP. It then allocates a new large region. This
### forces THP allocations to use compaction. The overall size of the
### workload is such that it should fit in memory. It uses between
### 2 and 32 threads to allocate the final region and measures fault latency
### and whether base pages or THPs were used.

# MM Test Parameters
export MMTESTS="thpscale"

# Test disk to setup (optional)
#export TESTDISK_RAID_DEVICES=
#export TESTDISK_RAID_MD_DEVICE=/dev/md0
#export TESTDISK_RAID_OFFSET=63
#export TESTDISK_RAID_SIZE=250019532
#export TESTDISK_RAID_TYPE=raid0
#export TESTDISK_PARTITION=/dev/sda6
#export TESTDISK_FILESYSTEM=xfs
#export TESTDISK_MKFS_PARAM="-f -d agcount=8"
#export TESTDISK_MOUNT_ARGS=inode64,delaylog,logbsize=262144,nobarrier

# List of monitors
export RUN_MONITOR=yes
export MONITORS_ALWAYS=
export MONITORS_GZIP="proc-vmstat top"
export MONITORS_WITH_LATENCY="vmstat"
export MONITOR_UPDATE_FREQUENCY=10

# thpscale
export THPSCALE_MIN_THREADS=1
export THPSCALE_MAX_THREADS=$((NUMCPUS*4))
if [ $THPSCALE_MAX_THREADS -gt 32 ]; then
	export THPSCALE_MAX_THREADS=32
fi
export THPSCALE_MAPSIZE=$((MEMTOTAL_BYTES*8/10))
export THPSCALE_MADV_HUGEPAGE=yes
