Home | History | Annotate | Download | only in pagingtest

Lines Matching refs:file_size

11 int pageinout_test(int test_runs, unsigned long long file_size) {
26 fd = create_tmp_file(tmpname, file_size);
31 vec = alloc_mincore_vec(file_size);
36 buf = mmap(NULL, file_size, PROT_READ, MAP_PRIVATE, fd, 0);
42 if (!check_caching((void *)buf, vec, file_size, false)) {
49 for (j = ((file_size - 1) & ~(pagesize - 1)); j >= 0; j -= pagesize) {
57 if (!check_caching((void *)buf, vec, file_size, true)) {
62 rc = madvise((void *)buf, file_size, MADV_DONTNEED) ||
63 posix_fadvise(fd, 0, file_size, POSIX_FADV_DONTNEED);
73 if (!check_caching((void *)buf, vec, file_size, false)) {
78 printf("page-in: %llu MB/s\n", (file_size * test_runs * USEC_PER_SEC) /
80 printf("page-out (clean): %llu MB/s\n", (file_size * test_runs * USEC_PER_SEC) /
86 munmap((void *)buf, file_size);