diff options
author | Sachit Kadle <skadle@nvidia.com> | 2016-08-15 17:32:39 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2016-10-20 11:14:11 -0400 |
commit | 733fb79b39869665addcd80ccdf1c15f4a5aaa29 (patch) | |
tree | b3c9c1ba32406ed9c2af4bebee820e83ea6172e4 /include/uapi/linux | |
parent | 63e8592e06939e20c7b9e56b430353ebbee31ad6 (diff) |
gpu: nvgpu: add support for pre-allocated resources
Add support for pre-allocation of job tracking resources
w/ new (extended) ioctl. Goal is to avoid dynamic memory
allocation in the submit path. This patch does the following:
1) Intoduces a new ioctl, NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO_EX,
which enables pre-allocation of tracking resources per job:
a) 2x priv_cmd_entry
b) 2x gk20a_fence
2) Implements circular ring buffer for job
tracking to avoid lock contention between producer
(submitter) and consumer (clean-up)
Bug 1795076
Change-Id: I6b52e5c575871107ff380f9a5790f440a6969347
Signed-off-by: Sachit Kadle <skadle@nvidia.com>
Reviewed-on: http://git-master/r/1203300
(cherry picked from commit 9fd270c22b860935dffe244753dabd87454bef39)
Reviewed-on: http://git-master/r/1223934
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r-- | include/uapi/linux/nvgpu.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index 0bf88628..22e357b6 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h | |||
@@ -963,7 +963,13 @@ struct nvgpu_alloc_gpfifo_args { | |||
963 | __u32 num_entries; | 963 | __u32 num_entries; |
964 | #define NVGPU_ALLOC_GPFIFO_FLAGS_VPR_ENABLED (1 << 0) /* set owner channel of this gpfifo as a vpr channel */ | 964 | #define NVGPU_ALLOC_GPFIFO_FLAGS_VPR_ENABLED (1 << 0) /* set owner channel of this gpfifo as a vpr channel */ |
965 | __u32 flags; | 965 | __u32 flags; |
966 | }; | ||
966 | 967 | ||
968 | struct nvgpu_alloc_gpfifo_ex_args { | ||
969 | __u32 num_entries; | ||
970 | __u32 num_inflight_jobs; | ||
971 | __u32 flags; | ||
972 | __u32 reserved[5]; | ||
967 | }; | 973 | }; |
968 | 974 | ||
969 | struct gk20a_sync_pt_info { | 975 | struct gk20a_sync_pt_info { |
@@ -1182,6 +1188,8 @@ struct nvgpu_preemption_mode_args { | |||
1182 | _IOWR(NVGPU_IOCTL_MAGIC, 18, struct nvgpu_set_timeout_ex_args) | 1188 | _IOWR(NVGPU_IOCTL_MAGIC, 18, struct nvgpu_set_timeout_ex_args) |
1183 | #define NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO \ | 1189 | #define NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO \ |
1184 | _IOW(NVGPU_IOCTL_MAGIC, 100, struct nvgpu_alloc_gpfifo_args) | 1190 | _IOW(NVGPU_IOCTL_MAGIC, 100, struct nvgpu_alloc_gpfifo_args) |
1191 | #define NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO_EX \ | ||
1192 | _IOW(NVGPU_IOCTL_MAGIC, 101, struct nvgpu_alloc_gpfifo_ex_args) | ||
1185 | #define NVGPU_IOCTL_CHANNEL_WAIT \ | 1193 | #define NVGPU_IOCTL_CHANNEL_WAIT \ |
1186 | _IOWR(NVGPU_IOCTL_MAGIC, 102, struct nvgpu_wait_args) | 1194 | _IOWR(NVGPU_IOCTL_MAGIC, 102, struct nvgpu_wait_args) |
1187 | #define NVGPU_IOCTL_CHANNEL_CYCLE_STATS \ | 1195 | #define NVGPU_IOCTL_CHANNEL_CYCLE_STATS \ |