gpu: nvgpu: decouple async and immediate cleanup

Split up nvgpu_channel_clean_up_jobs() on the clean_all parameter so
that there's one version for the asynchronous ("deferred") cleanup and
another for the synchronous deterministic cleanup that occurs in the
submit path.

Forking another version like this adds some repetition, but this lets us
look at both versions clearly in order to come up with a coherent plan.
For example, it might be feasible to have the light cleanup of pooled
items in also the nondeterministic path, and deferring heavy cleanup to
another, entirely separated job queue.

Jira NVGPU-5493

Change-Id: I5423fd474e5b8f7b273383f12302126f47076bd3
Signed-off-by: Konsta Hölttä <kholtta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2346065
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Konsta Hölttä
2020-08-05 10:04:25 +03:00
committed by Alex Waterman
parent 3f81f1952d
commit baaf25f8b0
5 changed files with 91 additions and 38 deletions

View File

@@ -584,7 +584,7 @@ static int nvgpu_submit_deterministic(struct nvgpu_channel *c,
* though - the hw GP_GET pointer can be much further away than
* our metadata pointers; gpfifo space is "freed" by the HW.
*/
nvgpu_channel_clean_up_jobs(c, true);
nvgpu_channel_clean_up_deterministic_job(c);
}
/* Grab access to HW to deal with do_idle */