2012-03-29 05:42:56 +08:00
|
|
|
# Makefile for vm selftests
|
|
|
|
|
2012-12-12 08:01:36 +08:00
|
|
|
CFLAGS = -Wall
|
2015-04-24 02:21:41 +08:00
|
|
|
BINARIES = compaction_test
|
|
|
|
BINARIES += hugepage-mmap
|
|
|
|
BINARIES += hugepage-shm
|
|
|
|
BINARIES += map_hugetlb
|
|
|
|
BINARIES += thuge-gen
|
selftests/vm/transhuge-stress: stress test for memory compaction
This tool induces memory fragmentation via sequential allocation of
transparent huge pages and splitting off everything except their last
sub-pages. It easily generates pressure to the memory compaction code.
$ perf stat -e 'compaction:*' -e 'migrate:*' ./transhuge-stress
transhuge-stress: allocate 7858 transhuge pages, using 15716 MiB virtual memory and 61 MiB of ram
transhuge-stress: 1.653 s/loop, 0.210 ms/page, 9504.828 MiB/s 7858 succeed, 0 failed, 2439 different pages
transhuge-stress: 1.537 s/loop, 0.196 ms/page, 10226.227 MiB/s 7858 succeed, 0 failed, 2364 different pages
transhuge-stress: 1.658 s/loop, 0.211 ms/page, 9479.215 MiB/s 7858 succeed, 0 failed, 2179 different pages
transhuge-stress: 1.617 s/loop, 0.206 ms/page, 9716.992 MiB/s 7858 succeed, 0 failed, 2421 different pages
^C./transhuge-stress: Interrupt
Performance counter stats for './transhuge-stress':
1.744.051 compaction:mm_compaction_isolate_migratepages
1.014 compaction:mm_compaction_isolate_freepages
1.744.051 compaction:mm_compaction_migratepages
1.647 compaction:mm_compaction_begin
1.647 compaction:mm_compaction_end
1.744.051 migrate:mm_migrate_pages
0 migrate:mm_numa_migrate_ratelimit
7,964696835 seconds time elapsed
Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: Rafael Aquini <aquini@redhat.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-10 06:29:34 +08:00
|
|
|
BINARIES += transhuge-stress
|
2015-09-05 06:47:23 +08:00
|
|
|
BINARIES += userfaultfd
|
2012-03-29 05:42:56 +08:00
|
|
|
|
2013-07-04 06:09:18 +08:00
|
|
|
all: $(BINARIES)
|
2012-03-29 05:42:56 +08:00
|
|
|
%: %.c
|
2015-01-08 02:35:54 +08:00
|
|
|
$(CC) $(CFLAGS) -o $@ $^ -lrt
|
2015-09-05 06:47:23 +08:00
|
|
|
userfaultfd: userfaultfd.c
|
|
|
|
$(CC) $(CFLAGS) -O2 -o $@ $^ -lpthread
|
2012-03-29 05:42:56 +08:00
|
|
|
|
2015-03-11 12:05:59 +08:00
|
|
|
TEST_PROGS := run_vmtests
|
2015-03-11 12:06:00 +08:00
|
|
|
TEST_FILES := $(BINARIES)
|
2015-03-11 12:05:59 +08:00
|
|
|
|
|
|
|
include ../lib.mk
|
2012-03-29 05:42:56 +08:00
|
|
|
|
|
|
|
clean:
|
2013-07-04 06:09:18 +08:00
|
|
|
$(RM) $(BINARIES)
|