My Project
Classes | Public Attributes | List of all members
kbasep_js_device_data Struct Reference

KBase Device Data Job Scheduler sub-structure. More...

#include <mali_kbase_js_defs.h>

Classes

struct  runpool_irq
 

Public Attributes

struct kbasep_js_device_data::runpool_irq runpool_irq
 
struct mutex runpool_mutex
 
struct mutex queue_mutex
 
struct semaphore schedule_sem
 
struct list_head ctx_list_pullable [BASE_JM_MAX_NR_SLOTS]
 
struct list_head ctx_list_unpullable [BASE_JM_MAX_NR_SLOTS]
 
u16 as_free
 
s8 nr_user_contexts_running
 
s8 nr_all_contexts_running
 
base_jd_core_req js_reqs [BASE_JM_MAX_NR_SLOTS]
 
u32 scheduling_period_ns
 
u32 soft_stop_ticks
 
u32 soft_stop_ticks_cl
 
u32 hard_stop_ticks_ss
 
u32 hard_stop_ticks_cl
 
u32 hard_stop_ticks_dumping
 
u32 gpu_reset_ticks_ss
 
u32 gpu_reset_ticks_cl
 
u32 gpu_reset_ticks_dumping
 
u32 ctx_timeslice_ns
 
atomic_t soft_job_timeout_ms
 
struct list_head suspended_soft_jobs_list
 
int init_status
 
u32 nr_contexts_pullable
 
atomic_t nr_contexts_runnable
 

Detailed Description

KBase Device Data Job Scheduler sub-structure.

This encapsulates the current context of the Job Scheduler on a particular device. This context is global to the device, and is not tied to any particular struct kbase_context running on the device.

nr_contexts_running and as_free are optimized for packing together (by making them smaller types than u32). The operations on them should rarely involve masking. The use of signed types for arithmetic indicates to the compiler that the value will not rollover (which would be undefined behavior), and so under the Total License model, it is free to make optimizations based on that (i.e. to remove masking).

Member Data Documentation

◆ as_free

u16 kbasep_js_device_data::as_free

Bitpattern of free Address Spaces

◆ ctx_list_pullable

struct list_head kbasep_js_device_data::ctx_list_pullable[BASE_JM_MAX_NR_SLOTS]

List of contexts that can currently be pulled from

◆ ctx_list_unpullable

struct list_head kbasep_js_device_data::ctx_list_unpullable[BASE_JM_MAX_NR_SLOTS]

List of contexts that can not currently be pulled from, but have jobs currently running.

◆ ctx_timeslice_ns

u32 kbasep_js_device_data::ctx_timeslice_ns

Value for JS_CTX_TIMESLICE_NS Value for JS_SOFT_JOB_TIMEOUT

◆ init_status

int kbasep_js_device_data::init_status

The initalized-flag is placed at the end, to avoid cache-pollution (we should only be using this during init/term paths).

Note
This is a write-once member, and so no locking is required to read

◆ js_reqs

base_jd_core_req kbasep_js_device_data::js_reqs[BASE_JM_MAX_NR_SLOTS]

Core Requirements to match up with base_js_atom's core_req memeber

Note
This is a write-once member, and so no locking is required to read

◆ nr_all_contexts_running

s8 kbasep_js_device_data::nr_all_contexts_running

Number of currently scheduled contexts (including ones that are not submitting jobs)

◆ nr_user_contexts_running

s8 kbasep_js_device_data::nr_user_contexts_running

Number of currently scheduled user contexts (excluding ones that are not submitting jobs)

◆ queue_mutex

struct mutex kbasep_js_device_data::queue_mutex

Queue Lock, used to access the Policy's queue of contexts independently of the Run Pool.

Of course, you don't need the Run Pool lock to access this.

◆ runpool_mutex

struct mutex kbasep_js_device_data::runpool_mutex

Run Pool mutex, for managing contexts within the runpool. Unless otherwise specified, you must hold this lock whilst accessing any members that follow

In addition, this is used to access:

  • the kbasep_js_kctx_info::runpool substructure

◆ schedule_sem

struct semaphore kbasep_js_device_data::schedule_sem

Scheduling semaphore. This must be held when calling kbase_jm_kick()

◆ suspended_soft_jobs_list

struct list_head kbasep_js_device_data::suspended_soft_jobs_list

List of suspended soft jobs


The documentation for this struct was generated from the following file: