nvgpu: gpu: separate runlist submit from construction

This patch primary separates runlist modification from
runlist submits.

Instead of submitting the runlist(domain) immediately after
modification, a worker thread interface is now being used to
synchronously schedule runlist submits. If the runlist being
scheduled is currently active, the submit happens instantly,
otherwise, it will happen in the next iteration when the nvs
thread will schedule the domain. This external interface uses
a condition variable to wait for the completion of the
synchronous submits.

A pending_update variable is used to synchronize domain memory
swaps just before being submitted.

To facilitate faster scheduling via the NVS thread, nvgpu_dom
itself contains an array of rl_domain pointers. This can then
be used to select the appropriate rl_domain directly for scheduling
as against the earlier approach of maintaining nvs domains and rl
domains in sync everytime.

Signed-off-by: Debarshi Dutta <ddutta@nvidia.com>
Change-Id: I1725c7cf56407cca2e3d2589833d1c0b66a7ad7b
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2739795
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Ramesh Mylavarapu <rmylavarapu@nvidia.com>
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Debarshi Dutta
2022-05-26 11:12:56 +05:30
committed by mobile promotions
parent e355ab9c21
commit d8e8eb65d3
9 changed files with 457 additions and 221 deletions

View File

@@ -673,7 +673,6 @@ nvgpu_runlist_unlock_active_runlists
nvgpu_runlist_unlock_runlists
nvgpu_runlist_update
nvgpu_runlist_update_locked
nvgpu_rl_domain_alloc
nvgpu_rwsem_init
nvgpu_rwsem_down_read
nvgpu_rwsem_down_write

View File

@@ -691,7 +691,6 @@ nvgpu_runlist_unlock_active_runlists
nvgpu_runlist_unlock_runlists
nvgpu_runlist_update
nvgpu_runlist_update_locked
nvgpu_rl_domain_alloc
nvgpu_rwsem_init
nvgpu_rwsem_down_read
nvgpu_rwsem_down_write