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

Public Attributes

u16 submit_allowed
 
s8 ctx_attr_ref_count [KBASEP_JS_CTX_ATTR_COUNT]
 
struct kbasep_js_per_as_data per_as_data [BASE_MAX_NR_AS]
 
u64 slot_affinities [BASE_JM_MAX_NR_SLOTS]
 
s8 slot_affinity_refcount [BASE_JM_MAX_NR_SLOTS][64]
 

Member Data Documentation

◆ ctx_attr_ref_count

s8 kbasep_js_device_data::runpool_irq::ctx_attr_ref_count[KBASEP_JS_CTX_ATTR_COUNT]

Context Attributes: Each is large enough to hold a refcount of the number of contexts that can fit into the runpool. This is currently BASE_MAX_NR_AS

Note that when BASE_MAX_NR_AS==16 we need 5 bits (not 4) to store the refcount. Hence, it's not worthwhile reducing this to bit-manipulation on u32s to save space (where in contrast, 4 bit sub-fields would be easy to do and would save space).

Whilst this must not become negative, the sign bit is used for:

  • error detection in debug builds
  • Optimization: it is undefined for a signed int to overflow, and so the compiler can optimize for that never happening (thus, no masking is required on updating the variable)

◆ per_as_data

struct kbasep_js_per_as_data kbasep_js_device_data::runpool_irq::per_as_data[BASE_MAX_NR_AS]

Data that is unique for each AS

◆ slot_affinities

u64 kbasep_js_device_data::runpool_irq::slot_affinities[BASE_JM_MAX_NR_SLOTS]

Bitvector to aid affinity checking. Element 'n' bit 'i' indicates that slot 'n' is using core i (i.e. slot_affinity_refcount[n][i] > 0)

◆ slot_affinity_refcount

s8 kbasep_js_device_data::runpool_irq::slot_affinity_refcount[BASE_JM_MAX_NR_SLOTS][64]

Refcount for each core owned by each slot. Used to generate the slot_affinities array of bitvectors

The value of the refcount will not exceed BASE_JM_SUBMIT_SLOTS, because it is refcounted only when a job is definitely about to be submitted to a slot, and is de-refcounted immediately after a job finishes

◆ submit_allowed

u16 kbasep_js_device_data::runpool_irq::submit_allowed

Bitvector indicating whether a currently scheduled context is allowed to submit jobs. When bit 'N' is set in this, it indicates whether the context bound to address space 'N' (per_as_data[N].kctx) is allowed to submit jobs.

It is placed here because it's much more memory efficient than having a u8 in struct kbasep_js_per_as_data to store this flag


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