Revert "drm/scheduler: track GPU active time per entity"
authorLucas Stach <l.stach@pengutronix.de>
Thu, 30 Mar 2023 15:35:13 +0000 (17:35 +0200)
committerLucas Stach <l.stach@pengutronix.de>
Thu, 30 Mar 2023 15:47:05 +0000 (17:47 +0200)
This reverts commit df622729ddbf as it introduces a use-after-free,
which isn't easy to fix without going back to the design drawing board.

Reported-by: Danilo Krummrich <dakr@redhat.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
drivers/gpu/drm/scheduler/sched_main.c
include/drm/gpu_scheduler.h

index 4e6ad6e122bc44943ab73366a653ebbf2bdda51a..0e43784202718399048ddb804881fb88bdbaa293 100644 (file)
@@ -906,12 +906,6 @@ drm_sched_get_cleanup_job(struct drm_gpu_scheduler *sched)
 
        spin_unlock(&sched->job_list_lock);
 
-       if (job) {
-               job->entity->elapsed_ns += ktime_to_ns(
-                       ktime_sub(job->s_fence->finished.timestamp,
-                                 job->s_fence->scheduled.timestamp));
-       }
-
        return job;
 }
 
index 9db9e5e504eeb32f5c527ccbbaa1773388af15ad..9935d1e2ff69a38437de9d5729d15fd6b64b0d18 100644 (file)
@@ -228,13 +228,6 @@ struct drm_sched_entity {
         */
        struct rb_node                  rb_tree_node;
 
-       /**
-        * @elapsed_ns:
-        *
-        * Records the amount of time where jobs from this entity were active
-        * on the GPU.
-        */
-       uint64_t elapsed_ns;
 };
 
 /**