Skip to content

Commit

Permalink
api: sched: enable additional global and group level configurability
Browse files Browse the repository at this point in the history
Application can now add additional global and group level scheduler
configuration to signal maximum number of groups and priorities that
need to be supported. These enable potential further resource
optimizations.

Signed-off-by: Tuomas Taipale <[email protected]>
  • Loading branch information
TuomasTaipale committed Mar 7, 2025
1 parent f56b0c7 commit 35b1a20
Showing 1 changed file with 32 additions and 5 deletions.
37 changes: 32 additions & 5 deletions include/odp/api/spec/schedule_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -325,16 +325,32 @@ typedef struct odp_schedule_capability_t {
* Schedule configuration
*/
typedef struct odp_schedule_config_t {
/** Maximum number of scheduled queues to be supported.
/** Maximum number of groups to be supported
*
* @see odp_schedule_capability_t
* This is in addition to the predefined scheduling groups
* (ODP_SCHED_GROUP_ALL, ODP_SCHED_GROUP_WORKER and
* ODP_SCHED_GROUP_CONTROL).
*
* @see odp_schedule_capability_t
*/
uint32_t num_groups;

/** Maximum number of priorities to be supported
*
* @see odp_schedule_capability_t
*/
uint32_t num_prios;

/** Maximum number of scheduled queues to be supported
*
* @see odp_schedule_capability_t
*/
uint32_t num_queues;

/** Maximum number of events required to be stored simultaneously in
* scheduled queue. This number must not exceed 'max_queue_size'
* capability. A value of 0 configures default queue size supported by
* the implementation.
* scheduled queue. This number must not exceed 'max_queue_size'
* capability. A value of 0 configures default queue size supported by
* the implementation.
*/
uint32_t queue_size;

Expand Down Expand Up @@ -400,6 +416,17 @@ typedef struct odp_cache_stash_prio_config_t {
* Schedule group parameters
*/
typedef struct odp_schedule_group_param_t {
/** Maximum number of priorities to be supported for this group
*
* Further constrains number of priorities to be supported at group
* level. Across group configuration, cumulative priority count should
* not exceed what was configured globally or what the implementation
* maximally supports. Use 0 for default.
*
* @see odp_schedule_config_t, odp_schedule_capability_t
*/
uint32_t num_prios;

/** Group specific cache stashing hints
*
* Depending on the implementation, configuring these may improve
Expand Down

0 comments on commit 35b1a20

Please sign in to comment.