|
XenevaOS
|
#include <gpu_scheduler.h>

Public Attributes | |
| struct list_head | list |
| spinlock_t | lock |
| struct drm_sched_rq * | rq |
| struct drm_sched_entity_stats * | stats |
| struct drm_gpu_scheduler ** | sched_list |
| unsigned int | num_sched_list |
| enum drm_sched_priority | priority |
| enum drm_sched_priority | rq_priority |
| ktime_t | rr_ts |
| struct spsc_queue | job_queue |
| atomic_t | fence_seq |
| uint64_t | fence_context |
| struct dma_fence * | dependency |
| struct dma_fence_cb | cb |
| atomic_t * | guilty |
| struct dma_fence __rcu * | last_scheduled |
| struct task_struct * | last_user |
| bool | stopped |
| struct completion | entity_idle |
| ktime_t | oldest_job_waiting |
| struct rb_node | rb_tree_node |
struct drm_sched_entity - A wrapper around a job queue (typically attached to the DRM file_priv).
Entities will emit jobs in order to their corresponding hardware ring, and the scheduler will alternate between entities based on scheduling policy.
| struct dma_fence_cb drm_sched_entity::cb |
@cb:
Callback for the dependency fence above.
| struct dma_fence* drm_sched_entity::dependency |
@dependency:
The dependency fence of the job which is on the top of the job queue.
| struct completion drm_sched_entity::entity_idle |
@entity_idle:
Signals when entity is not in use, used to sequence entity cleanup in drm_sched_entity_fini().
| uint64_t drm_sched_entity::fence_context |
@fence_context:
A unique context for all the fences which belong to this entity. The &drm_sched_fence.scheduled uses the fence_context but &drm_sched_fence.finished uses fence_context + 1.
| atomic_t drm_sched_entity::fence_seq |
@fence_seq:
A linearly increasing seqno incremented with each new &drm_sched_fence which is part of the entity.
FIXME: Callers of drm_sched_job_arm() need to ensure correct locking, this doesn't need to be atomic.
| atomic_t* drm_sched_entity::guilty |
@guilty:
Points to entities' guilty.
| struct spsc_queue drm_sched_entity::job_queue |
@job_queue: the list of jobs of this entity.
@last_scheduled:
Points to the finished fence of the last scheduled job. Only written by drm_sched_entity_pop_job(). Can be accessed locklessly from drm_sched_job_arm() if the queue is empty.
| struct task_struct* drm_sched_entity::last_user |
@last_user: last group leader pushing a job into the entity.
| struct list_head drm_sched_entity::list |
@list:
Used to append this struct to the list of entities in the runqueue @rq under &drm_sched_rq.entities.
Protected by &drm_sched_rq.lock of @rq.
| spinlock_t drm_sched_entity::lock |
@lock:
Lock protecting the run-queue (@rq) to which this entity belongs, @priority, the list of schedulers (@sched_list, @num_sched_list) and the @rr_ts field.
| unsigned int drm_sched_entity::num_sched_list |
@num_sched_list:
Number of drm_gpu_schedulers in the @sched_list.
| ktime_t drm_sched_entity::oldest_job_waiting |
@oldest_job_waiting:
Marks earliest job waiting in SW queue
| enum drm_sched_priority drm_sched_entity::priority |
@priority:
Priority of the entity. This can be modified by calling drm_sched_entity_set_priority(). Protected by @lock.
| struct rb_node drm_sched_entity::rb_tree_node |
@rb_tree_node:
The node used to insert this entity into time based priority queue
| struct drm_sched_rq* drm_sched_entity::rq |
@rq:
Runqueue on which this entity is currently scheduled.
FIXME: Locking is very unclear for this. Writers are protected by @lock, but readers are generally lockless and seem to just race with not even a READ_ONCE.
| enum drm_sched_priority drm_sched_entity::rq_priority |
@rq_priority: Run-queue priority
| ktime_t drm_sched_entity::rr_ts |
@rr_ts:
Fake timestamp of the last popped job from the entity.
| struct drm_gpu_scheduler** drm_sched_entity::sched_list |
@sched_list:
A list of schedulers (struct drm_gpu_scheduler). Jobs from this entity can be scheduled on any scheduler on this list.
This can be modified by calling drm_sched_entity_modify_sched(). Locking is entirely up to the driver, see the above function for more details.
This will be set to NULL if &num_sched_list equals 1 and @rq has been set already.
FIXME: This means priority changes through drm_sched_entity_set_priority() will be lost henceforth in this case.
| struct drm_sched_entity_stats* drm_sched_entity::stats |
@stats: Stats object reference held by the entity and jobs.
| bool drm_sched_entity::stopped |
@stopped:
Marks the enity as removed from rq and destined for termination. This is set by calling drm_sched_entity_flush() and by drm_sched_fini().