Setting Parameters on Behalf of Other Applications
A privileged application can set scheduling parameters (timeslice and interleave) on behalf of other applications based on their PID.
The libnvrm_gpusched
library provides a way to:
- Get a list of all TSGs
- Get a list of recent TSGs (i.e., a list of TSGs opened since the last query)
- Get a list of TSGs opened by a given process
- Get notifications when a TSG is allocated
- Get current scheduling parameters for a TSG
- Set runlist interleave for a TSG
- Set timeslice for a TSG
- Lock control (i.e., prevent other applications from changing their own scheduling parameters such as timeslice and interleave)
Library API is defined in nvrm_gpusched.h
and sample code implements command line to control GPU scheduling parameters.