aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2022-03-03case-truncate-seq: truncate sequentiallyHEADmasterAaron Lu1-0/+21
Mel Gorman suggested LKP to cover a case where sparsefiles are removed sequentially so add a case based on case-truncate, which did the remove concurrently. In the meantime, this script will also report faultin time. Note the example script provided by Mel in the below link has a 'sync' after reading of the sparsefile and before removing of it. I failed to understand the intent of the 'sync' so I omitted. LINK: https://lore.kernel.org/linux-mm/20220217093113.GU3366@techsingularity.net/ Suggested-by: Mel Gorman <mgorman@techsingularity.net> Signed-off-by: Aaron Lu <aaron.lu@intel.com>
2022-03-03case-truncate: use cat for sparsefile to consume memoryAaron Lu1-1/+1
The intent of "cp sparsefile /dev/null" is to fill page cache with sparsefile's content, but since cp will recognize the src file being sparse and skip doing any read of it but just writing zeros to /dev/null, it kind of failed the purpose. Fix this by using 'cat sparsefile > /dev/null'. Signed-off-by: Aaron Lu <aaron.lu@intel.com>
2021-05-01usemem: Update the usage of touch-allocHui Zhu1-1/+1
The touch-alloc was updated to write memory in commit 3f9c6c227120db43873d1af20cea3f374eb99592. This commit updates the usage of touch-alloc. Signed-off-by: Hui Zhu <teawater@antfin.com> Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn>
2021-04-16usemem: Output a message after punch holes doneHui Zhu1-0/+2
When I use punch holes to setup a test page fragmentation environment, I didn't know when the punch holes done. I can only get this information through top or something else. This commit add code to output a message after punch holes done to handle this issue. Signed-off-by: Hui Zhu <teawater@antfin.com> Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn>
2021-04-10usemem: Add code for touch-allocHui Zhu1-12/+22
Add code for touch-alloc. And Change read memory to write memory to avoid use the zero-page for reads in do_anonymous_page. Signed-off-by: Hui Zhu <teawater@gmail.com>
2021-01-21usemem: Remove the duplicate do_accessHui Zhu1-12/+0
Got following error when build usemem: gcc -O -c -Wall -g usemem.c -o usemem.o usemem.c:451:15: error: redefinition of ‘do_access’ unsigned long do_access(unsigned long *p, unsigned long idx, int read) ^~~~~~~~~ usemem.c:332:15: note: previous definition of ‘do_access’ was here unsigned long do_access(unsigned long *p, unsigned long idx, int read) ^~~~~~~~~ make: *** [usemem.o] Error 1 Remove the duplicate do_access to fix this error. Signed-off-by: Hui Zhu <teawaterz@linux.alibaba.com>
2020-12-18usemem: Add option touch-allocHui Zhu1-0/+15
Some environment will not fault in memory even if MAP_POPULATE is set. So add option touch-alloc to read memory after allocate it to make sure the pages is fault in. Signed-off-by: Hui Zhu <teawaterz@linux.alibaba.com>
2020-12-18usemem: Add option init-timeHui Zhu1-2/+27
Add a new option init-time to remove the initialization time from the run time and show the initialization time. Signed-off-by: Hui Zhu <teawaterz@linux.alibaba.com>
2020-03-05usemem: minor cleanupsFengguang Wu1-5/+4
Change pagesize to "unsigned long" since it's used in comparison with other unsigned long variables. Signed-off-by: Fengguang Wu <wufengguang@huawei.com>
2020-03-05usemem: Add new option --punch-holes for generating fragmented pagesHui Zhu1-1/+45
Hi Fengguang, Thanks for your review. This is the new version that was updated according to you comments. This commit adds new option --punch-holes. usemem will free every other page after allocation. Then it will generate size/2/pagesize fragmented pages with this option. Its implementation is to use madvise to release a page every other page. For example: usemem --punch-holes -s -1 400m Ideally, this command will generate 200m fragmented pages in the system. This command can help test anti-fragmentation function and other features that are affected by fragmentation issues of the Linux kernel. Signed-off-by: Hui Zhu <teawaterz@linux.alibaba.com> Signed-off-by: Fengguang Wu <wufengguang@huawei.com>
2020-03-04Makefile: Add static build optionHui Zhu1-10/+17
Sometimes vm-scalability needs to work in an environment without an libraries. Supporting static build is helpful. This commit add static build option: make STATIC=1 Signed-off-by: Hui Zhu <teawaterz@linux.alibaba.com> Signed-off-by: Fengguang Wu <wufengguang@huawei.com>
2019-12-25usemem: Fix the build warningHui Zhu1-1/+2
Got: gcc -O -c -Wall -g usemem.c -o usemem.o usemem.c: In function ‘output_statistics’: usemem.c:638:2: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result] write(1, buf, len); This commit fixes this warning. Signed-off-by: Hui Zhu <teawaterz@linux.alibaba.com>
2019-11-29usemem.c: Add missing opt_repeatXiao Yang1-2/+2
Fix the following compiler error: ---------------------------------------- usemem.c:711:17: error: too many arguments to function ‘do_rw_once’ rw_bytes += do_rw_once(ptrs[i], lens[i], &rand_data, 1, &rep, opt_repeat); ^~~~~~~~~~ ... usemem.c:763:16: error: too many arguments to function ‘do_rw_once’ unit_bytes = do_rw_once(buffer, opt_bytes, &rand_data, 1, NULL, 0); ^~~~~~~~~~ usemem.c:463:22: note: declared here static unsigned long do_rw_once(unsigned long *p, unsigned long bytes, ^~~~~~~~~~ ---------------------------------------- Fixes: 4b12da9("usemem: rename reps to opt_repeat") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Xiao Yang <xiaox.yang@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2019-09-14usemem: rename reps to opt_repeatFengguang Wu1-8/+8
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2019-09-14usemem: Add new option -Z|--read-againHui Zhu1-6/+40
usemem will read memory again after access the memory with this option. It can help test the speed that load page from swap to memory. Signed-off-by: Hui Zhu <teawaterz@linux.alibaba.com>
2018-12-24usemem: mlock after rw and detachFengguang Wu1-8/+24
This fixes the seemingly mlock() does not take effect issue. - mlock() only takes effect for existing pages - fork() will auto unlock them Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2018-12-24usemem: actually parse --hugetlbFengguang Wu1-0/+1
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2018-12-24usemem: warn on invalid option combinationsFengguang Wu1-0/+12
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2018-12-19usemem: quiet "may be used uninitialized" warningsFengguang Wu1-2/+3
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2018-12-19usemem: add sleep_secs checksFengguang Wu1-2/+5
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2018-12-18Revert "Avoid memory allocation/sync time when calculate throughput"Fengguang Wu1-8/+1
This reverts commit fe0353b13482d879c48d3841d15457a0fd5eca2c.
2018-12-18usemem: exactly detach before sleepingFengguang Wu1-67/+2
This fixes blocked parent usemem when child is OOM killed. Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2018-12-18Add break when parse -O optionyuanyao1-0/+1
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2018-12-16usemem: avoid unnecessary nr_cpu queryFengguang Wu1-16/+21
openat(AT_FDCWD, "/sys/devices/system/cpu/online", O_RDONLY|O_CLOEXEC) = 11 read(11, "0-3\n", 8192) = 4 Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2018-12-04usemem: use more robust MAP_LOCKEDFengguang Wu1-6/+7
mlock() tend to fail on large allocations. Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2018-10-11case-swap-w-seq: fix ignored --random, keep swap cases dedup'edDaniel Jordan1-1/+1
case-swap-w-seq tests for the string -rand in the testcase name to enable usemem's --random option, but the test breaks when -rand doesn't appear last, so case-swap-w-rand-mt isn't actually random. Just change the way we search the testcase name, which keeps case-swap-* deduplicated. Fixes: f35dd1388bfb ("case-swap: add multithreaded test case for case-swap-w-seq/rand") Cc: Aaron Lu <aaron.lu@intel.com> Cc: Ying Huang <ying.huang@intel.com> Suggested-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com>
2018-10-11Revert "case-swap-w-seq: fix ignored --random in case-swap-w-rand-mt"Daniel Jordan4-37/+17
This reverts commit 203658fb11d324e83c93550970fc6365a2ccc9d6. Others prefer to keep the duplication down, and I'm all for that. Let's fix it a different way. Cc: Aaron Lu <aaron.lu@intel.com> Cc: Ying Huang <ying.huang@intel.com> Cc: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com>
2018-10-09case-swap-w-seq: fix ignored --random in case-swap-w-rand-mtDaniel Jordan4-17/+37
case-swap-w-seq tests for the string -rand in the testcase name to enable usemem's --random option, but the test breaks when -rand doesn't appear last, so case-swap-w-rand-mt isn't actually random. We could search for -rand inside the string, but let's just duplicate testcase code to avoid similar breakage in the future as more test cases are added. Fixes: f35dd1388bfb ("case-swap: add multithreaded test case for case-swap-w-seq/rand") Acked-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com>
2018-10-03usemem: add --offset option for mmapDaniel Jordan1-2/+8
usemem hardcodes 0 as the offset for mmap, so add an option to specify this. Use bytes for consistency with what mmap accepts. How to parse the offset? The POSIX standard is vague about off_t ("Signed integer type used for file sizes."), but in the absence of a strtoofft, it seems reasonably safe to use strtol. On 64-bit Arch and Oracle Linux systems, off_t is the same size as long when compiling in both 32-bit and 64-bit modes. Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com>
2018-10-03usemem: fix warning about unused ptr variableDaniel Jordan1-2/+1
gcc rightly complains, usemem.c: In function ‘main’: usemem.c:1183:18: warning: variable ‘ptr’ set but not used [-Wunused-but-set-variable] unsigned char *ptr; ^ Simply remove ptr to silence the warning. Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com>
2018-06-08usemem: fix build on systems with old glibc'sDaniel Jordan1-3/+3
Headers from old versions of glibc don't have MAP_HUGE_SHIFT, which leads to this: usemem.c:60:32: error: 'MAP_HUGE_SHIFT' undeclared (first use in this function) #define MAP_HUGE_2MB (21 << MAP_HUGE_SHIFT) With newer glibc's, MAP_HUGE_SHIFT is pulled in thusly: usemem.c sys/mman.h bits/mman.h bits/mman-linux.h # define MAP_HUGE_SHIFT 26 As a workaround, define MAP_HUGE_SHIFT manually just as usemem does with MAP_HUGE_2MB. While we're at it, remove the unused definition of MAP_HUGE_1GB. Tested on arch, debian, and oracle linux with ./usemem -UO $((2**21)). Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2018-06-05mmap-pread-seq: limit page table consumptionAaron Lu1-1/+1
commit f11b2901356f("hw_vars: limit pagetable to half available memory") has calculated the biggest possible ROTATE_BYTES value that will limit page table consumption under 1/2 of MemAvail. For multi-process test, each process will have its own page table setup so we need to divide nr_task from ROTATE_BYTES. Reported-by: Rong Chen <rongx.a.chen@intel.com> Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2018-05-24small-allocs-common: update namingAaron Lu2-2/+2
On Mon, Apr 02, 2018 at 12:37:36PM +0800, Fengguang Wu wrote: > On Mon, Apr 02, 2018 at 12:26:47PM +0800, Aaron Lu wrote: > > On Mon, 2018-04-02 at 12:19 +0800, Fengguang Wu wrote: > > > > case-small-allocs | 20 +------------------- > > > > case-small-allocs-common | 21 +++++++++++++++++++++ > > > > case-small-allocs-mt | 7 ++----- > > > > > > Applied. It may be better to rename the -common script > > > so that case-* won't match it -- it's not a real test case, > > > after all. Do you have a better file name in mind? > > > > What about removing the case prefix and name it as small-allocs-common? > > OK, I just renamed the file and deployed. Turnes out there are other places need updating too to reflect the file's name change. From f3369cb9e8e594b55946ac54c5ab6a7efe703faf Mon Sep 17 00:00:00 2001 From: Aaron Lu <aaron.lu@intel.com> Date: Thu, 24 May 2018 10:39:46 +0800 Subject: [PATCH] small-allocs-common: fix mis naming I used to name the common file as case-small-allocs-common but decided to use the name of small-allocs-common in the end after talking to Fengguang. The file is renamed but other scripts that call it didn't see the update so this patch fix it or an error: stderr: ./case-small-allocs-mt: 3: .: Can't open ./case-small-allocs-common would occur. Reported-by: Hailin Gu <hailinx.gu@intel.com> Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2018-05-11Add some hugetlb casesHuang Ying5-0/+40
Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2018-05-11usemem: Support allocate hugetlbfs memoryHuang Ying1-2/+14
Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2018-05-11usemem: Support MAP_ANONYMOUS flagsHuang Ying1-2/+9
To support MAP_HUGETLB. Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2018-04-02hw_vars: comment how PTE_LIMIT is calculatedAaron Lu1-1/+5
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
2018-04-02hw_vars: limit pagetable to half available memoryAaron Lu1-3/+4
We used to use half memory to limit page table, this is OK for setup that doesn't have other unreclaimable memory consumptions, but consider if rootfs is hosted on ram and there is no swap, the rootfs consumed memory is also unreclaimable and can be huge. That can cause some test OOM. Solve this by using MemAvailable from /proc/meminfo instead of the previous MemTotal. This also impacts PTE_LIMIT. Signed-off-by: Aaron Lu <aaron.lu@intel.com>
2018-04-02case-small-allocs: restrict slab usageAaron Lu3-24/+24
commit c079cd0e70ad("small-allocs: restrict vm_area_struct slab memory usage") fixed the excessive slab size problem but didn't handle -mt case. This commit fixes the same problem for -mt case. We may want to tune the limited size in future, to avoid changing two files, make the restrict_slab_size part a common file and include it for both test cases. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2018-03-29case-anon-cow-*: adjust per task test sizeAaron Lu2-2/+2
Due to --prealloc, the main process will also consume one share of memory so each process' test size should be unit_size/(nr_task+1) or OOM could occur. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2018-03-28case-shm-pread: use unit_size to control working setAaron Lu4-4/+8
For multi-threaded case, when it needs to exit, these threads will need to free their memories. Due to the global mmap_sem, the free has to be done one by one in serial mode. On large servers, due to the high number of CPU, the free can take more than 1 hour. To avoid this problem, limit the workingset by letting user to specify the size. The non-mt case does not need this but it doesn't hurt(the default size keeps the same as before if unit_size isn't specified). Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2017-12-13anon-cow-*-mt: reduce unit_size to 1/4 memAaron Lu2-2/+2
Though this is a thread test, we will still fork once: the main process will prealloc and prefault unit_size memory and then fork a child to create threads. Then the child process will pthread_create() multiple threads and consume another unit_size memory. So if unit_size is 1/2 mem, the main process and its child process will consume all memory, which will easily cause OOM. Fix this by reducing default unit_size to 1/4 memory. Reported-by: Philip Li <philip.li@intel.com> Reported-by: Li Zhijian <zhijianx.li@intel.com> Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2017-08-03case-migrate: ignore error message from 'cat /proc/$pid/comm'Aaron Lu1-1/+1
The process could be gone when we cat it, so ignore its error message or we will have an useless stderr file: ==> /tmp/stderr <== cat: /proc/10465/comm: No such file or directory Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2017-05-24case-migrate test did not migrate back from last nodeNadav Amit1-3/+3
The case-migrate test did not migrate back from the last node to the first node. In addition, the counter of the migrations did not advance. Acked-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Nadav Amit <namit@vmware.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2017-04-27usemem: Support synchronize before freeing memoryHuang Ying2-18/+43
To measure lock contention during memory freeing. Signed-off-by: Huang Ying <ying.huang@intel.com>
2017-04-27Fix tasks synchronization when nr_thread == 0Huang Ying1-1/+2
nr_thread may be zero, which makes tasks synchronization not work for process running mode. Signed-off-by: Huang Ying <ying.huang@intel.com>
2017-04-18usemem_remap: use unsigned long for pagesizeAaron Lu1-2/+2
There are several places for pagesize doing arithmetic operations and due to its int type, the result could overflow and yielding strange result like end is calculated with a smaller value than start, etc. The subsequent file_remap_pages will then fail with -EINVAL. I also changed the type of no_of_pages from int to unsigned long for similar reasons(although it's not required for this fix). https://jira01.devtools.intel.com/browse/OLT-1605 Reported-by: Philip Li <philip.li@intel.com> Signed-off-by: Aaron Lu <aaron.lu@intel.com>
2017-04-12Avoid memory allocation/sync time when calculate throughputHuang Ying1-1/+8
The start time is changed to after allocate memory and sync between tasks. Signed-off-by: Huang Ying <ying.huang@intel.com>
2017-04-12Fix free memory sizeHuang Ying1-5/+9
The original free memory size is incorrect, fixed via using unit size and last unit size. Signed-off-by: Huang Ying <ying.huang@intel.com>
2017-04-11usemem: Support timing free memoryHuang Ying1-2/+39
To measure time taken to free memory. Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2017-04-07case-swap: add multithreaded test case for case-swap-w-seq/randAaron Lu2-0/+2
The existing case-swap-seq can handle both process and thread modes but we need to have the case file available. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2017-04-07case-anon-*w*: use unit_size instead of fixed mem/2Aaron Lu9-9/+18
Like commit 195e6559d20e ("case-anon-w-rand: use unit_size instead of fixed $((mem / 2))"), this patch converts all anon write cases to respect unit_size environment variable. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2017-04-07case-anon-cow-rand-mt: remove the /N for thread caseAaron Lu1-1/+1
As with commit 37f440c6eb71("case-anon-cow-seq-mt: remove the /N for thread case"), we do not need to decide the size by nr_task since this is a thread mode test. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2017-02-07case-mremap-xread-rand-mt: correct the sparse file name to be removedAaron Lu1-1/+1
The sparse file we created in this case does not have any -$index so we shouldn't add that part when removing sparse files. Fix it. /result/vm-scalability/300s-mremap-xread-rand-mt-performance/lkp-hsw-4ep1/debian-x86_64-2016-08-31.cgz/x86_64-rhel-7.2/gcc-6/v4.8/1 stderr: rm: cannot remove '/tmp/vm-scalability-tmp/vm-scalability/sparse-mremap-xread-rand-mt-*': No such file or directory Buglink: https://jira01.devtools.intel.com/browse/OLT-1554 Reported-by: Philip Li <philip.li@intel.com> Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2017-02-06hw_vars: Fix a typo about DELAY parameterHuang Ying1-1/+1
Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2017-01-26Support to add some delay when accessing each pageHuang Ying2-6/+73
To simulate CPU intensive work done between memory accessing. This is useful for readahead testing. Changelog: v2: - Keep accessing the page during delay to avoid the page be reclaimed during delay. Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2017-01-16hw_vars: Support specify repeat count for usemem testHuang Ying1-0/+1
Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2016-12-28Support binding tasks to CPUHuang Ying2-6/+63
Signed-off-by: "Huang, Ying" <ying.huang@intel.com> Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2016-12-28Add option to synchronize between tasks after allocating memoryHuang Ying2-2/+21
For some test cases, what we care about is the read/write operation speed after allocation, so add a option to synchronize between tasks after allocating memory to avoid timing issue between tasks because of memory allocation. Signed-off-by: "Huang, Ying" <ying.huang@intel.com> Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2016-12-28Synchronize between control task and worker tasksHuang Ying1-3/+47
Signed-off-by: "Huang, Ying" <ying.huang@intel.com> Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2016-12-28Add .gitignoreHuang Ying1-0/+8
Signed-off-by: "Huang, Ying" <ying.huang@intel.com> Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2016-10-12mremap-xread-rand-mt: correct thread numberAaron Lu1-6/+2
I believe we should start nr_task thread number instead of nr_task*nr_task thread number. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2016-10-12Base random seed on thread ID instead on PIDNadav Amit1-1/+3
The random seed was previously based on process ID. This caused the random multi-threaded benchmarks to mostly practice very strange behavior, in which all threads access the same memory, in some benchmarks in a lockstep behavior. Changing the getpid to gettid to get the expected behavior, which is also in line with the multi-process benchmarks. Signed-off-by: Nadav Amit <namit@vmware.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2016-10-12case-swapin: add swapin test caseAaron Lu1-0/+51
Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2016-10-08usemem: add write-signal-read modeAaron Lu1-11/+38
As suggested by Ying, a new switch is added to usemem: -W|--write-signal-read Let processes do read when received a signal after write. usemem should be started as: usemem -n $nr_task -W -d -p pidfile $memsize -d to detach and -W to specify these detached processes need to do read when received the SIGUSR1 signal after the normal write. -p to specify where to save these detached process IDs so that they can be signalled later. With the above added switch, the swap in case can be done as: 1 start N processes to do write and then detach and wait for signal to resume to do read; 2 start N processes to do write to push the memory occupided in 1) to swap space. When done, send SIGUSR1 with kill to those detached processes to resume them to do read(hence, causing swap in). Note that for swap in case, the start time has to be set after the detached processes got the resume signal SIGUSR1. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2016-10-08usemem: introduce output_statisticsAaron Lu1-17/+21
The code to output statistics is useful later so make a new function for it. There should be no functional change. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2016-10-08usemem: introduce do_rw_onceAaron Lu1-32/+42
The code to do RW for one rep is useful later so extract it to make a new function named do_rw_once. There should be no functionality change. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2016-10-08usemem: do not pass opt_bytes to do_unitsAaron Lu1-3/+4
The param bytes in function do_units serves two purpose: 1 As the passed param to tell the function how many bytes need to be processed; 2 As a local variable that gets decremented each time a unit is processed and break the loop once it gets zero. Since do_units is always called with the global opt_bytes as its param, the 1st purpose isn't much useful as we can always get the value from the global opt_bytes. For purpose 2, we probably should be using a local variable instead. There should be no functionality change. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2016-10-08usemem: rename the global bytes variable to opt_bytesAaron Lu1-22/+22
The variable bytes is defined as a global one, but some function also use it as their param. It's difficult to tell if it is the global one or the local one when one sees bytes. To avoid confusion, rename the global bytes to opt_bytes. There should be no functionality change. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2016-09-21small-allocs: restrict vm_area_struct slab memory usageAaron Lu1-1/+16
For this small allocs test, a lot of vma will be allocated. Each vma will need a vm_area_struct slab object and these objects will fill up all memory and then OOM. These slabs are unreclaimable. Restrict the memory consumption by this slab to 1/3 MemTotal. Jira-link: https://jira01.devtools.intel.com/browse/OLT-1479 Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2016-08-03case-swap-w-seq: Rename pass_size to unit_sizeHuang Ying1-3/+2
To be consistent with other test cases. Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2016-07-29ROTATE_BYTES: prevent OOM due to page table size too largeAaron Lu3-6/+2
Cases that use ROTATE_BYTES as its unit_size use all the memory as file backed read only memory and are easily reclaimed; but the memory consumed by page table is not reclaimable and could cause OOM since ROTATE_BYTES is pretty large. Refine ROTATE_BYTES in hw_vars as is done in case-anon-r-rand so that other test cases will also avoid the OOM issue. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2016-07-27hw_vars: remove the default 300s runtime settingAaron Lu1-3/+5
It could be a surprise for people to find their test cases that doesn't specify runtime in cmdline to have their run stopped prematurely and only find the runtime is set in hw_vars. Tests that have a need to be stopped at 300s should set the runtime environment variable, unconditionally timeout after 300s in hw_vars doesn't seem appropriate. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2016-07-18case-anon-w-rand: use unit_size instead of fixed $((mem / 2))Aaron Lu1-1/+3
So that we can control the write size for vm-scalability run from the LKP environment. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2016-07-12case-anon-cow-seq-mt: remove the /N for thread caseAaron Lu1-1/+1
Since threads share the same VM, there will be no COW so no need to divide the memory size by N. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2016-07-07Documentation: add case descriptionAaron Lu1-2/+205
Most of the descripton are reviewed last time with Fengguang and Ying but I also added some more. Please feel free to change the description if you see anything inappropriate or incorrect, thanks. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2016-07-07case-msync-mt: remove the /N for thread caseAaron Lu1-1/+1
The msync-mt case will preallocate and prefault a mmap space with a sparse file as its backing store and then create N threads to write data there. Since these threads share the same VM, we do not need /N for the size of the preallocated space. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2016-07-07case-anon-wx-seq-mt: remove the /N for thread caseAaron Lu1-1/+1
Since this is a preallocate and all threads will use the same memory, there is no need to divide the memory size by N. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2016-03-16hw_vars: add one choice to the parameter "SPARSE_ROOT".Yanbing Jiang1-1/+1
We support setup disk/file system out of vm-scalability and specify that via SPARSE_ROOT environment variable. If SPARSE_ROOT is empty, we use its original value in vm-scalability. Signed-off-by: Yanbing Jiang <yanbing.jiang@intel.com>
2016-02-17swap: give user the ability to control sizeAaron Lu1-1/+1
User can specify a value in the job file. This is mostly useful to do various testing, where the written size(pass_size) can play a role. Signed-off-by: Aaron Lu <aaron.lu@intel.com>
2016-02-04usemem_remap.c: remap the whole mmap pagesXiaolong Ye1-1/+1
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
2016-02-04usemem_remap.c: fix remap failed issue when size is pagesize alignedXiaolong Ye1-2/+2
2015-11-09 09:56:42 truncate /tmp/vm-scalability-tmp/vm-scalability/sparse-remap-1 -s 514191360 2015-11-09 09:56:42 truncate /tmp/vm-scalability-tmp/vm-scalability/sparse-remap-2 -s 514191360 2015-11-09 09:56:42 truncate /tmp/vm-scalability-tmp/vm-scalability/sparse-remap-3 -s 514191360 2015-11-09 09:56:43 truncate /tmp/vm-scalability-tmp/vm-scalability/sparse-remap-4 -s 514191360 ==> /tmp/stderr <== remap failed with error Invalid argument remap failed with error Invalid argument remap failed with error Invalid argument remap failed with error Invalid argument Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
2016-01-21case-swap-w-rand: a symbolic link to case-swap-w-seq.Yanbing Jiang2-1/+9
modify case-swap-w-seq for random write option. Signed-off-by: Yanbing Jiang <yanbing.jiang@intel.com>
2015-12-24case-swap-w-seq: swap write sequential performanceYanbing Jiang1-0/+19
This is done via eating memory of size (MemAvailable + SwapTotal) * 3 / 4. -n nr_processes is the number of multi-process -t nr_threads is the number of multi-threads when eating memory Their default value is nr_cpu. v4: fix the error message. Signed-off-by: Yanbing Jiang <yanbing.jiang@intel.com> Reviewed-by: Huang, Ying < ying.huang@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2015-12-23copying: add license and copyright informationAaron Lu4-0/+351
The REAME is updated to describe the copyright and license information. The COPYING file is for GNU GPL v2. The copyright information for usemem_migrate.c is taken from the header of migrate_pages.c of the numactl's test directory. The copyright infromation for usemem.c is taken from Andrew's agreement email replied to Fengguang. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2015-12-18usemem_migrate.c: add a comment stating the origin of the codeAaron Lu1-0/+1
Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2015-05-26hw_vars: Add more debug information for losetup failureHuang Ying1-1/+7
Signed-off-by: Huang, Ying <ying.huang@intel.com>
2015-05-22put SPARSE_ROOT.img and SPARSE_ROOT under TMPFS_MNTHuang Ying1-1/+1
Because files under SPARSE_ROOT may be larger than 50% memory size which is default for tmpfs mount. So use TMPFS_MNT instead, which is 100% memory size. Signed-off-by: Huang, Ying <ying.huang@intel.com>
2015-01-21Add support to specify processes/threads via nr_taskHuang Ying54-88/+90
Do that via the command line as below: sed -i s/nr_cpu/nr_task/g [^h]* Then modify hw_vars manually. Signed-off-by: Huang, Ying <ying.huang@intel.com>
2015-01-14hw_vars: fix $val quotationFengguang Wu1-3/+4
./hw_vars: line 104: [: too many arguments Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2015-01-07case-migrate: fix bashismFengguang Wu1-1/+1
./case-migrate: 38: ./case-migrate: [[: not found Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2015-01-04hw_vars: fix meminfo var namesFengguang Wu1-0/+1
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2015-01-03hw_vars: fix illegal shm_size in dashFengguang Wu1-1/+1
/lkp/lkp/src/tests/vm-scalability: 28: /lkp/lkp/src/tests/vm-scalability: Illegal number: 16466156*4096 Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2015-01-03run: switch to /bin/shFengguang Wu3-19/+20
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2015-01-03switch cases to /bin/shFengguang Wu61-143/+143
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2015-01-03hw_vars: switch to /bin/shFengguang Wu1-15/+15
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2014-10-08more accurate memory limit calculation for anon-r-seq casesFengguang Wu3-2/+14
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2014-10-06case-truncate: show throughputFengguang Wu1-0/+6
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2014-10-06fix too short runtime for the seq casesFengguang Wu4-7/+7
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2014-09-17hw_vars: setup loop module and devicesFengguang Wu1-0/+14
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2014-09-17hw_vars: fix loop mount errorFengguang Wu1-1/+5
mount: /tmp/vm-scalability.img: failed to setup loop device: No such file or directory Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2014-05-12Fix mmap ENOMEM by replace "atoi" with "atol": When input ↵wlin701-1/+1
argv[2]="2253980245" (0x86590255), atoi() cast it to "18446744071668564565" (0xffffffff86590255), so mmap ENOMEM Signed-off-by: wlin70 <wei.w.lin@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2014-03-05hw_vars: fix substitution patternFengguang Wu1-3/+3
truncate: cannot open '/tmp/vm-scalability/sparse-/lkp/benchmarks/vm-scalability/case-lru-file-mmap-read-rand-4' for writing: No such file or directory Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2014-02-28fix undefined shm_sizeFengguang Wu1-1/+1
Root caused and fixed by Wanlong: 2014-02-26 19:31:41.830115500 [lkp process-result-queue 36526] truncate: option requires an argument -- 's' 2014-02-26 19:31:41.830117500 Try 'truncate --help' for more information. 2014-02-26 19:31:41.844520500 [lkp process-result-queue 36526] moved bad result from /lkp/result/brickland2/micro/vm-scalability/16G-shm-xread-rand-m t/x86_64-lkp/4e61e14b4be48e4b7264a304b0306d0c49a8d521/0 to /lkp/bad-result/brickland2/micro/vm-scalability/16G-shm-xread-rand-mt/x86_64-lkp/4e61e14b4 be48e4b7264a304b0306d0c49a8d521/0 [allen@G08FNSTD121251 ~]$ cd /lkp/bad-result/brickland2/micro/vm-scalability/16G-shm-xread-rand-mt/x86_64-lkp/4e61e14b4be48e4b7264a304b0306d0c49a8d521/0/ [allen@G08FNSTD121251 0]$ cat reproduce.sh 2014-02-26 19:30:12 mount -t tmpfs -o size=100% vm-scalability-tmp /tmp/vm-scalability-tmp 2014-02-26 19:30:12 truncate -s 135079759872 /tmp/vm-scalability.img 2014-02-26 19:30:12 mkfs.xfs -q /tmp/vm-scalability.img 2014-02-26 19:30:12 mount -o loop /tmp/vm-scalability.img /tmp/vm-scalability 2014-02-26 19:30:12 ./case-shm-xread-rand-mt 2014-02-26 19:30:12 truncate /tmp/vm-scalability-tmp/sparse-shm-xread-rand-mt -s <====== ERROR 2014-02-26 19:30:12 ./usemem --runtime 300 -t 120 -f /tmp/vm-scalability-tmp/sparse-shm-xread-rand-mt --prealloc --readonly --random 0 2014-02-26 19:30:12 umount /tmp/vm-scalability-tmp 2014-02-26 19:30:12 umount /tmp/vm-scalability 2014-02-26 19:30:12 rm /tmp/vm-scalability.img [allen@G08FNSTD121251 vm-scalability]$ cat case-shm-xread-rand-mt source ./hw_vars create_sparse_file $SHM_FILE $shm_size <======== ERROR $USEMEM -t $nr_cpu -f $SHM_FILE --prealloc --readonly --random $((shm_size / 2)) rm $SHM_FILE [allen@G08FNSTD121251 vm-scalability]$ cat hw_vars ... mount_tmpfs() { if [[ -d $TMPFS_MNT ]]; then mountpoint -q $TMPFS_MNT && umount $TMPFS_MNT else mkdir $TMPFS_MNT fi $CMD mount -t tmpfs -o size=100% vm-scalability-tmp $TMPFS_MNT shm_size=$(/usr/bin/stat -f -c "%b*%S" $TMPFS_MNT) shm_size=$((shm_size)) <=== Here is shm_size } ... create_sparse_file () { name=$1 size=$2 # echo "$name is of size $size" $CMD truncate $name -s $size # dd if=/dev/zero of=$name bs=1k count=1 seek=$((size >> 10)) 2>/dev/null # ls $SPARSE_ROOT # ls /tmp/vm-scalability/* } ... So, we should export shm_size variable there since the test case cannot get this variable. Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2014-02-13fix division by 0Fengguang Wu1-1/+1
The LKP+ script relies on non-zero shm mount size: 2014-02-12 18:27:52.587217500 [process-result-queue 16238] /lkp/lkp/src/tests/micro/vm-scalability: line 31: ((: repeat = size / unit_size : division by 0 (error token is "unit_size ") Reported-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2014-02-01introduce TMPFS_MNT to avoid pollute /tmp and /dev/shmFengguang Wu7-19/+37
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2014-01-08add fs optionFengguang Wu1-3/+11
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-11-19fix empty dd outputFengguang Wu2-3/+3
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-10-15case-lru-file-readonce/twice: fix and check empty dd outputFengguang Wu2-5/+21
There should be 120 lines of output: % g -c copied /lkp/result/brickland2/micro/vm-scalability/300s-lru-file-readonce/x86_64-lkp/v*/*/vm-scalability /lkp/result/brickland2/micro/vm-scalability/300s-lru-file-readonce/x86_64-lkp/v3.12-rc3/0/vm-scalability:95 /lkp/result/brickland2/micro/vm-scalability/300s-lru-file-readonce/x86_64-lkp/v3.12-rc3/1/vm-scalability:99 /lkp/result/brickland2/micro/vm-scalability/300s-lru-file-readonce/x86_64-lkp/v3.12-rc3/2/vm-scalability:101 /lkp/result/brickland2/micro/vm-scalability/300s-lru-file-readonce/x86_64-lkp/v3.12-rc3/3/vm-scalability:101 /lkp/result/brickland2/micro/vm-scalability/300s-lru-file-readonce/x86_64-lkp/v3.12-rc3/4/vm-scalability:101 /lkp/result/brickland2/micro/vm-scalability/300s-lru-file-readonce/x86_64-lkp/v3.12-rc3/5/vm-scalability:98 /lkp/result/brickland2/micro/vm-scalability/300s-lru-file-readonce/x86_64-lkp/v3.12-rc3/6/vm-scalability:87 /lkp/result/brickland2/micro/vm-scalability/300s-lru-file-readonce/x86_64-lkp/v3.12-rc3/7/vm-scalability:91 /lkp/result/brickland2/micro/vm-scalability/300s-lru-file-readonce/x86_64-lkp/v3.12-rc4/0/vm-scalability:99 Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-10-07fix disordered dd outputFengguang Wu2-3/+7
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-10-04make the msync cases sequentialFengguang Wu2-2/+2
The random cases are rather unstable: 2013-10-03 10:16:50 truncate -s 134795628544 /tmp/vm-scalability.img 2013-10-03 10:16:50 mkfs.xfs -q /tmp/vm-scalability.img 2013-10-03 10:16:50 mount -o loop /tmp/vm-scalability.img /tmp/vm-scalability 2013-10-03 10:16:50 ./case-msync-mt 2013-10-03 10:16:50 truncate /tmp/vm-scalability/sparse-msync-mt -s 134795628544 2013-10-03 10:16:50 ./usemem --runtime 300 -S -t 120 -f /tmp/vm-scalability/sparse-msync-mt -F --prealloc --open-rw --random 561648452 631854504 bytes / 195900689 usecs = 3149 KB/s 631854504 bytes / 195900635 usecs = 3149 KB/s 631854504 bytes / 195900657 usecs = 3149 KB/s 631854504 bytes / 195900628 usecs = 3149 KB/s 631854504 bytes / 195900662 usecs = 3149 KB/s ... 2013-10-03 10:20:09 ./case-msync-mt 2013-10-03 10:20:09 truncate /tmp/vm-scalability/sparse-msync-mt -s 134795628544 2013-10-03 10:20:09 ./usemem --runtime 300 -S -t 120 -f /tmp/vm-scalability/sparse-msync-mt -F --prealloc --open-rw --random 561648452 71778928 bytes / 338933724 usecs = 206 KB/s 71778928 bytes / 338933715 usecs = 206 KB/s 71778928 bytes / 338933716 usecs = 206 KB/s 71778928 bytes / 338934282 usecs = 206 KB/s 71778928 bytes / 338933724 usecs = 206 KB/s 2013-10-03 10:25:49 ./case-msync-mt 2013-10-03 10:25:49 truncate /tmp/vm-scalability/sparse-msync-mt -s 134795628544 2013-10-03 10:25:49 ./usemem --runtime 300 -S -t 120 -f /tmp/vm-scalability/sparse-msync-mt -F --prealloc --open-rw --random 561648452 631854504 bytes / 177256505 usecs = 3481 KB/s 631854504 bytes / 177258225 usecs = 3481 KB/s 631854504 bytes / 177258227 usecs = 3481 KB/s 631854504 bytes / 177258243 usecs = 3481 KB/s 631854504 bytes / 177258254 usecs = 3481 KB/s 2013-10-03 10:28:47 ./case-msync-mt 2013-10-03 10:28:47 truncate /tmp/vm-scalability/sparse-msync-mt -s 134795628544 2013-10-03 10:28:47 ./usemem --runtime 300 -S -t 120 -f /tmp/vm-scalability/sparse-msync-mt -F --prealloc --open-rw --random 561648452 631854504 bytes / 61268015 usecs = 10071 KB/s 631854504 bytes / 61268083 usecs = 10071 KB/s 631854504 bytes / 61268107 usecs = 10071 KB/s 631854504 bytes / 61268113 usecs = 10071 KB/s 631854504 bytes / 61268126 usecs = 10071 KB/s 2013-10-03 10:29:49 umount /tmp/vm-scalability 2013-10-03 10:29:49 rm /tmp/vm-scalability.img Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-10-04usemem: fix disordered output due to race conditionsFengguang Wu1-2/+7
9163121194 bytes / 511443180 usecs = 17496 KB/s 9163121194 bytes / 535441190 usecs = 16712 KB/s 9163121194 bytes9167839786 bytes / 300795153 usecs = 29764 KB/s 9163121194 bytes / 301242067 usecs = 29704 KB/s 9167839786 bytes / 305479517 usecs = 29307 KB/s 9163121194 bytes / 303736171 usecs = 29460 KB/s 9167839786 bytes / 305661581 usecs = 29290 KB/s Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-10-03usemem: don't show signal message to stderrFengguang Wu1-1/+1
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-30case-remap: show throughputFengguang Wu1-0/+10
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-30always limit runtimeFengguang Wu2-14/+4
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-30case-migrate: improve kill waitFengguang Wu3-26/+12
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-30case-migrate: fix umount errorFengguang Wu1-1/+7
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-29case-migrate: make it runtime basedFengguang Wu1-3/+21
7995680008 bytes / 5227954 usecs = 1493563 KBps 68 * 16880183296 bytes migrated, 5020493 usecs, 228633 MB/s Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-29debug umount failure in case-migrateFengguang Wu1-1/+4
umount: /tmp/vm-scalability: device is busy. Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-29fix Bus error in case-msyncFengguang Wu1-1/+1
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-29case-migrate: make sure usemem is killedFengguang Wu1-2/+5
umount: /tmp/vm-scalability: device is busy. Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-29use xfsFengguang Wu1-2/+2
btrfs is blocking the tests.. [ 20.045392] btrfs: device fsid 782d8017-2133-4f93-8299-741848c28d71 devid 1 transid 5 /dev/loop0 [ 31.655038] BTRFS debug (device loop0): run_one_delayed_ref returned -28 [ 31.656279] ------------[ cut here ]------------ [ 31.657312] WARNING: CPU: 3 PID: 3084 at /c/kernel-tests/src/x86_64/fs/btrfs/super.c:255 __btrfs_abort_transaction+0x54/0x104() [ 31.659413] btrfs: Transaction aborted (error -28) [ 31.660418] Modules linked in: [ 31.661220] CPU: 3 PID: 3084 Comm: btrfs-transacti Not tainted 3.12.0-rc2-00931-g4454b53 #532 [ 31.662884] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 31.663909] 0000000000000000 ffff88007f1abc28 ffffffff81a31094 ffff88007f1abc70 [ 31.665764] ffff88007f1abc60 ffffffff810c53aa ffffffff8140e4a1 00000000ffffffe4 [ 31.667567] ffff8803cdcd9000 ffff88022f884780 ffffffff81c99480 ffff88007f1abcc0 [ 31.669413] Call Trace: [ 31.670081] [<ffffffff81a31094>] dump_stack+0x54/0x74 [ 31.671039] [<ffffffff810c53aa>] warn_slowpath_common+0x7f/0x98 [ 31.672137] [<ffffffff8140e4a1>] ? __btrfs_abort_transaction+0x54/0x104 [ 31.673283] [<ffffffff810c540f>] warn_slowpath_fmt+0x4c/0x4e [ 31.674308] [<ffffffff81119802>] ? lock_release_holdtime.part.8+0xa3/0xa8 [ 31.675453] [<ffffffff81424a76>] ? btrfs_run_delayed_refs+0x323/0x46b [ 31.676608] [<ffffffff8140e4a1>] __btrfs_abort_transaction+0x54/0x104 [ 31.677721] [<ffffffff81424a94>] btrfs_run_delayed_refs+0x341/0x46b [ 31.678808] [<ffffffff81432931>] btrfs_commit_transaction+0x79/0x8b9 [ 31.679907] [<ffffffff8142b648>] transaction_kthread+0x108/0x1df [ 31.681025] [<ffffffff8142b540>] ? free_fs_root+0xab/0xab [ 31.682022] [<ffffffff810e37e3>] kthread+0xd8/0xe0 [ 31.682962] [<ffffffff810f3a47>] ? local_clock+0x41/0x5a [ 31.683945] [<ffffffff810e370b>] ? kthread_create_on_node+0x124/0x124 [ 31.685109] [<ffffffff81a4427c>] ret_from_fork+0x7c/0xb0 [ 31.686091] [<ffffffff810e370b>] ? kthread_create_on_node+0x124/0x124 [ 31.687193] ---[ end trace d5fb7d116e45a63a ]--- [ 31.688143] BTRFS error (device loop0) in btrfs_run_delayed_refs:2715: errno=-28 No space left [ 31.689812] BTRFS info (device loop0): forced readonly Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-29report composite throughputFengguang Wu1-24/+45
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-29make run_cases executableFengguang Wu1-0/+0
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-29use btrfs to save spaceFengguang Wu1-3/+3
btrfs consumes least memory for an empty filesystem: For an 1GB image size: # truncate /tmp/sparse.img -s $((1<<30)) # mkfs # du -s /tmp/sparse.img 33M /tmp/sparse.img # ext4 11M /tmp/sparse.img # xfs 4.1M /tmp/sparse.img # btrfs Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-29fix bus error in msync* casesFengguang Wu1-1/+1
root@waimea /c/vm-scalability# ./run_cases case-msync-mt Resetting all stats now.... Done! executing case-msync-mtFilesystem 1K-blocks Used Available Use% Mounted on /dev/loop0 999320 1284 929224 1% /tmp/vm-scalability 344981845 bytes / 8037718 usecs = 41914 KBps 344981845 bytes / 8038400 usecs = 41910 KBps 344981845 bytes / 8037979 usecs = 41913 KBps 344981845 bytes / 8038366 usecs = 41911 KBps 344981845 bytes / 8038480 usecs = 41910 KBps 344981845 bytes / 8038504 usecs = 41910 KBps 344981845 bytes / 8038516 usecs = 41910 KBps 344981845 bytes / 8037688 usecs = 41914 KBps 344981845 bytes / 8037861 usecs = 41913 KBps 344981845 bytes / 8038119 usecs = 41912 KBps 344981845 bytes / 8038641 usecs = 41909 KBps 344981845 bytes / 8038432 usecs = 41910 KBps Filesystem 1K-blocks Used Available Use% Mounted on /dev/loop0 999320 338452 592056 37% /tmp/vm-scalability Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-29fix OOM due to too much page table pagesFengguang Wu2-0/+6
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-29fix too large truncate sizeFengguang Wu3-3/+3
truncate: failed to truncate '/tmp/vm-scalability/sparse-mremap-xread-rand-mt-8' at 8796093022208 bytes: File too large Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-29make case-lru-file-read* runtime basedFengguang Wu2-3/+3
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-29fix bus error in shm test casesFengguang Wu14-29/+28
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-29usemem: show throughputFengguang Wu1-3/+17
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-19fix too large file sizeFengguang Wu1-1/+1
wfg ~% truncate -s $((1<<43)) /tmp/x # succeed wfg ~% truncate -s $((1<<44)) /tmp/x truncate: failed to truncate ‘/tmp/x’ at 17592186044416 bytes: File too large Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-16fix bus errorsFengguang Wu8-8/+8
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-15case-remap: it's not a rotational caseFengguang Wu1-2/+2
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-15rename case-posix-advise to case-posix-fadvFengguang Wu1-0/+0
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-15hw_vars: prefix commands with $CMDFengguang Wu1-11/+9
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-15check invalid vmstat lineFengguang Wu1-0/+4
./hw_vars: line 61: =: command not found Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-15adjust msync sizeFengguang Wu2-2/+2
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-15convert the rotational cases to be time basedFengguang Wu22-36/+39
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-12quiet mkfs messagesFengguang Wu1-1/+1
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-12inherit USEMEM ENV when availableFengguang Wu1-1/+3
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2013-09-12detect and use runtime ENVFengguang Wu16-1/+5
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on DocumentationFengguang Wu2-0/+143
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on case-shm-lock-unlockFengguang Wu1-0/+29
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on case-posix-adviseFengguang Wu1-0/+22
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on case-msync-mtFengguang Wu1-0/+11
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on case-msyncFengguang Wu1-0/+14
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on case-mremap-xread-rand-mtFengguang Wu1-0/+20
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on case-remapFengguang Wu1-0/+21
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on usemem_remap.cFengguang Wu1-0/+66
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on case-migrate-across-nodesFengguang Wu1-0/+22
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on usemem_migrate.cFengguang Wu1-0/+136
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on case-mbindFengguang Wu1-0/+17
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on usemem_mbind.cFengguang Wu1-0/+157
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on case-ksm-hugepagesFengguang Wu1-0/+24
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on usemem_ksm_hugepages.cFengguang Wu1-0/+78
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on case-ksmFengguang Wu1-0/+18
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on usemem_ksm.cFengguang Wu1-0/+69
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on case-direct-writeFengguang Wu1-0/+21
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on usemem_direct_write.cFengguang Wu1-0/+49
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on case-mincore-hugepagesFengguang Wu1-0/+38
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on case-mincoreFengguang Wu1-0/+32
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on usemem_mincore.hFengguang Wu1-0/+6
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on usemem_mincore.cFengguang Wu1-0/+32
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on usemem_hugepages.hFengguang Wu1-0/+10
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on usemem_hugepages.cFengguang Wu1-0/+51
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on usemem.cFengguang Wu1-13/+279
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on MakefileFengguang Wu1-2/+45
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on run_casesFengguang Wu1-0/+32
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-27Abhinav's work on hw_varsFengguang Wu1-2/+12
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-05usemem: use tab for indentsFengguang Wu1-5/+5
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-11-05fix nr_nodeFengguang Wu1-1/+1
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
2012-06-19continue run on perf failureFengguang Wu1-2/+2
2012-06-19fix path name for sourceFengguang Wu49-49/+49
2012-06-19usemem: add runtime supportFengguang Wu1-5/+38
2010-09-25Hello World!Wu Fengguang59-0/+1408