diff options
author | Joshua Bakita <jbakita@cs.unc.edu> | 2022-06-02 14:29:53 -0400 |
---|---|---|
committer | Joshua Bakita <jbakita@cs.unc.edu> | 2022-06-03 15:41:42 -0400 |
commit | 9296adcd450143f02faf32fbda5b77dba3f03bc7 (patch) | |
tree | 1db15efddd549e40f0d92869be6f0d499852d7d8 /include/uapi/linux | |
parent | 745b3ef2ac4d7afa99202e6afc441e3f0b97f5b4 (diff) |
gpu-paging: Allow for more than one buffer to be swapped at a timertss22-aegpu-paging
This uses a very primitive linear disk sector allocation scheme.
Sectors are only reused when userspace resets assignment to 0 with
an NVGPU_AS_IOCTL_SWAP_RESET ioctl (which invalidates all current
swap buffers).
This sector assignment scheme is sufficient for use in a TimeWall-
like system, where all allocations are assumed to be static after
after task system release. This is not suitable for a system with
dynamic allocations, unless userspace manually resets swap state
regularly (benchmarks run a reset at start for example).
Support for dynamic allocations is on the backlog.
No significant speed impact.
Benchmarks, 100 iters, after:
gpu_paging_speed, write: 186.0ms +/- 3.51
gpu_paging_speed, read: 162.7ms +/- 2.58
gpu_paging_overhead_speed, write start: 35.4ms +/- 4.47
gpu_paging_overhead_speed, write finish: 3.3ms +/- 0.18
gpu_paging_overhead_speed, read start: 69.8ms +/- 6.42
gpu_paging_overhead_speed, read finish: 43.2ms +/- 0.91
Diffstat (limited to 'include/uapi/linux')
-rw-r--r-- | include/uapi/linux/nvgpu.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index b8ea59a1..08f8ecda 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h | |||
@@ -2214,9 +2214,14 @@ struct nvgpu_as_swap_buffer_args { | |||
2214 | _IOW(NVGPU_AS_IOCTL_MAGIC, 17, struct nvgpu_as_swap_buffer_args) | 2214 | _IOW(NVGPU_AS_IOCTL_MAGIC, 17, struct nvgpu_as_swap_buffer_args) |
2215 | #define NVGPU_AS_IOCTL_READ_SWAP_BUFFER_ASYNC_FINISH \ | 2215 | #define NVGPU_AS_IOCTL_READ_SWAP_BUFFER_ASYNC_FINISH \ |
2216 | _IOW(NVGPU_AS_IOCTL_MAGIC, 18, struct nvgpu_as_swap_buffer_args) | 2216 | _IOW(NVGPU_AS_IOCTL_MAGIC, 18, struct nvgpu_as_swap_buffer_args) |
2217 | // Reset sector assignment to 0. Results in loss of all swapped data. | ||
2218 | // TODO: Don't require this - support dynamic task systems. | ||
2219 | #define NVGPU_AS_IOCTL_SWAP_RESET \ | ||
2220 | _IO(NVGPU_AS_IOCTL_MAGIC, 19) | ||
2221 | |||
2217 | 2222 | ||
2218 | #define NVGPU_AS_IOCTL_LAST \ | 2223 | #define NVGPU_AS_IOCTL_LAST \ |
2219 | _IOC_NR(NVGPU_AS_IOCTL_READ_SWAP_BUFFER_ASYNC_FINISH) | 2224 | _IOC_NR(NVGPU_AS_IOCTL_SWAP_RESET) |
2220 | #define NVGPU_AS_IOCTL_MAX_ARG_SIZE \ | 2225 | #define NVGPU_AS_IOCTL_MAX_ARG_SIZE \ |
2221 | sizeof(struct nvgpu_as_map_buffer_ex_args) | 2226 | sizeof(struct nvgpu_as_map_buffer_ex_args) |
2222 | 2227 | ||