STRUCT DRM_SCHED_ENTITY_STATS(9)
π struct drm_...entity_stats(9) π
okay bestie, welcome to the Kernel API Manual β this page is literally all about struct drm_sched_entity_stats, aka the execution stats for an entity. no cap, it's giving "how much GPU time did this entity eat?" energy. π
β¨ NAME β¨
struct drm_sched_entity_stats β execution stats for an entity. π
πΈ SYNOPSIS πΈ
struct drm_sched_entity_stats {
struct kref kref;
spinlock_t lock;
ktime_t runtime;
ktime_t prev_runtime;
ktime_t vruntime;
struct ewma_drm_sched_avgtime avg_job_us;
};
π― Members π―
krefβ reference count for the object. πlockβ lock guarding the runtime updates. πruntimeβ time entity spent on the GPU. β³prev_runtimeβ previous runtime used to get the runtime delta. πvruntimeβ virtual runtime as accumulated by the fair algorithm. π§avg_job_usβ average job duration. π
π Description π
okay so here's the whole vibe: jobs and entities have decoupled lifetimes, ie. once the job has been de-queued we literally cannot access the entity anymore. π but we do need know how much GPU time each entity has spent. so we track this in a separate object, and that object is reference counted by both entities and jobs. periodt. π«Ά
π₯ SEE ALSO π₯
- Kernel file:
./drivers/gpu/drm/scheduler/sched_internal.h drm_sched_entity_queue_pop(9)drm_sched_entity_queue_peek(9)drm_sched_entity_stats_get(9)drm_sched_entity_stats_put(9)
cute little sign-off bestie: this page lives under ./drivers/gpu/drm/scheduler, dated October 2026, and it's all about struct drm_...entity_stats(9). mwah πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms