mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: improve channel interleave support
Previously, only "high" priority bare channels were interleaved between all other bare channels and TSGs. This patch decouples priority from interleaving and introduces 3 levels for interleaving a bare channel or TSG: high, medium, and low. The levels define the number of times a channel or TSG will appear on a runlist (see nvgpu.h for details). By default, all bare channels and TSGs are set to interleave level low. Userspace can then request the interleave level to be increased via the CHANNEL_SET_RUNLIST_INTERLEAVE ioctl (TSG-specific ioctl will be added later). As timeslice settings will soon be coming from userspace, the default timeslice for "high" priority channels has been restored. JIRA VFND-1302 Bug 1729664 Change-Id: I178bc1cecda23f5002fec6d791e6dcaedfa05c0c Signed-off-by: Aingara Paramakuru <aparamakuru@nvidia.com> Reviewed-on: http://git-master/r/1014962 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
Terje Bergstrom
parent
f07a046a52
commit
2a58d3c27b
@@ -834,6 +834,28 @@ struct nvgpu_channel_wdt_args {
|
||||
#define NVGPU_IOCTL_CHANNEL_DISABLE_WDT 1
|
||||
#define NVGPU_IOCTL_CHANNEL_ENABLE_WDT 2
|
||||
|
||||
/*
|
||||
* Interleaving channels in a runlist is an approach to improve
|
||||
* GPU scheduling by allowing certain channels to appear multiple
|
||||
* times on the runlist. The number of times a channel appears is
|
||||
* governed by the following levels:
|
||||
*
|
||||
* low (L) : appears once
|
||||
* medium (M): if L, appears L times
|
||||
* else, appears once
|
||||
* high (H) : if L, appears (M + 1) x L times
|
||||
* else if M, appears M times
|
||||
* else, appears once
|
||||
*/
|
||||
struct nvgpu_runlist_interleave_args {
|
||||
__u32 level;
|
||||
__u32 reserved;
|
||||
};
|
||||
#define NVGPU_RUNLIST_INTERLEAVE_LEVEL_LOW 0
|
||||
#define NVGPU_RUNLIST_INTERLEAVE_LEVEL_MEDIUM 1
|
||||
#define NVGPU_RUNLIST_INTERLEAVE_LEVEL_HIGH 2
|
||||
#define NVGPU_RUNLIST_INTERLEAVE_NUM_LEVELS 3
|
||||
|
||||
#define NVGPU_IOCTL_CHANNEL_SET_NVMAP_FD \
|
||||
_IOW(NVGPU_IOCTL_MAGIC, 5, struct nvgpu_set_nvmap_fd_args)
|
||||
#define NVGPU_IOCTL_CHANNEL_SET_TIMEOUT \
|
||||
@@ -876,9 +898,11 @@ struct nvgpu_channel_wdt_args {
|
||||
_IOWR(NVGPU_IOCTL_MAGIC, 118, struct nvgpu_cycle_stats_snapshot_args)
|
||||
#define NVGPU_IOCTL_CHANNEL_WDT \
|
||||
_IOW(NVGPU_IOCTL_MAGIC, 119, struct nvgpu_channel_wdt_args)
|
||||
#define NVGPU_IOCTL_CHANNEL_SET_RUNLIST_INTERLEAVE \
|
||||
_IOW(NVGPU_IOCTL_MAGIC, 120, struct nvgpu_runlist_interleave_args)
|
||||
|
||||
#define NVGPU_IOCTL_CHANNEL_LAST \
|
||||
_IOC_NR(NVGPU_IOCTL_CHANNEL_WDT)
|
||||
_IOC_NR(NVGPU_IOCTL_CHANNEL_SET_RUNLIST_INTERLEAVE)
|
||||
#define NVGPU_IOCTL_CHANNEL_MAX_ARG_SIZE sizeof(struct nvgpu_submit_gpfifo_args)
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user