summaryrefslogtreecommitdiffstats
path: root/gpu_paging_overhead_speed.cu
diff options
context:
space:
mode:
authorJoshua Bakita <jbakita@cs.unc.edu>2022-09-12 20:35:31 -0400
committerJoshua Bakita <jbakita@cs.unc.edu>2022-09-12 20:45:46 -0400
commit909c37eeaa8060d983de8446540f091ed0d14a4d (patch)
tree39ef5e88d1ea1cdbee401fcc3ed11cd548082817 /gpu_paging_overhead_speed.cu
parenta6286e09f4a3c78522a12b3d55b53ef1245bf558 (diff)
Clean up and split demand_paging_speed.c from paging_speed.c
This also removes the --no-seq flag from paging_speed.c, which never worked. Cleanups include: - Copyright notices - Better usage messages & code comments - More similar structure in the CPU-side benchmarks - Random disk buffer initialization in demand_paging_speed.c - Output comments detailing data source - Stripping of unused or deprecated codepaths At this point, the mapping of benchmarks to RTSS'22 plots is: - paging_speed: Fig. 4 - demand_paging_speed: Fig. 10 - directio_paging_speed: Fig. 10 - gpu_paging_speed: Fig. 10 - gpu_paging_overhead_speed: Fig. 11 - gpu_paging_evil_task: Figs. 12 and 13
Diffstat (limited to 'gpu_paging_overhead_speed.cu')
-rw-r--r--gpu_paging_overhead_speed.cu4
1 files changed, 4 insertions, 0 deletions
diff --git a/gpu_paging_overhead_speed.cu b/gpu_paging_overhead_speed.cu
index c7a0f3a..0cf364e 100644
--- a/gpu_paging_overhead_speed.cu
+++ b/gpu_paging_overhead_speed.cu
@@ -1,3 +1,6 @@
1/**
2 * Copyright 2022 Joshua Bakita
3 */
1#include <stdio.h> 4#include <stdio.h>
2#include <cuda.h> 5#include <cuda.h>
3#include <curand_kernel.h> // curandState_t and curand 6#include <curand_kernel.h> // curandState_t and curand
@@ -78,6 +81,7 @@ __global__ void count_zero(char* buf, uint64_t buf_len) {
78 atomicAdd_block((unsigned long long int*)&gpu_res, (unsigned long long int)num_zero); 81 atomicAdd_block((unsigned long long int*)&gpu_res, (unsigned long long int)num_zero);
79} 82}
80 83
84// Subtract first parameter from second parameter. Return as nanoseconds.
81long time_diff_ns(struct timespec start, struct timespec stop) { 85long time_diff_ns(struct timespec start, struct timespec stop) {
82 return (s2ns(stop.tv_sec) + stop.tv_nsec) - (s2ns(start.tv_sec) + start.tv_nsec); 86 return (s2ns(stop.tv_sec) + stop.tv_nsec) - (s2ns(start.tv_sec) + start.tv_nsec);
83} 87}