Loading...
Searching...
No Matches
spdk_governor Struct Reference

Cores governor Implements core frequency control for schedulers. More...

#include <scheduler.h>

Public Member Functions

 TAILQ_ENTRY (spdk_governor) link
 

Data Fields

const char * name
 
uint32_t(* get_core_avail_freqs )(uint32_t lcore_id, uint32_t *freqs, uint32_t num)
 Get available frequencies of a given core.
 
uint32_t(* get_core_curr_freq )(uint32_t lcore_id)
 Get current frequency of a given core.
 
int(* core_freq_up )(uint32_t lcore_id)
 Increase core frequency to next available one.
 
int(* core_freq_down )(uint32_t lcore_id)
 Decrease core frequency to next available one.
 
int(* set_core_freq_max )(uint32_t lcore_id)
 Set core frequency to maximum available.
 
int(* set_core_freq_min )(uint32_t lcore_id)
 Set core frequency to minimum available.
 
int(* get_core_capabilities )(uint32_t lcore_id, struct spdk_governor_capabilities *capabilities)
 Get capabilities of a given core.
 
int(* dump_info_json )(struct spdk_json_write_ctx *w)
 Output governor-specific information to a JSON stream.
 
int(* init )(void)
 Initialize a governor.
 
void(* deinit )(void)
 Deinitialize a governor.
 

Detailed Description

Cores governor Implements core frequency control for schedulers.

Functions from this structure are invoked from scheduling reactor.

Field Documentation

◆ core_freq_down

int(* spdk_governor::core_freq_down) (uint32_t lcore_id)

Decrease core frequency to next available one.

Parameters
lcore_idCore number.
Returns
1 on success, 0 already at min frequency, negative on error.

◆ core_freq_up

int(* spdk_governor::core_freq_up) (uint32_t lcore_id)

Increase core frequency to next available one.

Parameters
lcore_idCore number.
Returns
1 on success, 0 already at max frequency, negative on error.

◆ dump_info_json

int(* spdk_governor::dump_info_json) (struct spdk_json_write_ctx *w)

Output governor-specific information to a JSON stream.

The JSON write context will be initialized with an open object, so the governor should write a name followed by a JSON value (most likely another nested object).

◆ get_core_avail_freqs

uint32_t(* spdk_governor::get_core_avail_freqs) (uint32_t lcore_id, uint32_t *freqs, uint32_t num)

Get available frequencies of a given core.

Parameters
lcore_idCore ID.
freqsThe buffer array to save the frequencies.
numNumber of frequencies to get.
Returns
The number of frequencies returned in freqs. 0 on error. 0 is returned if it could not get the frequencies or if the freqs array is too small to fit the returned frequencies.

◆ get_core_capabilities

int(* spdk_governor::get_core_capabilities) (uint32_t lcore_id, struct spdk_governor_capabilities *capabilities)

Get capabilities of a given core.

Parameters
lcore_idCore number.
capabilitiesStructure to fill with capabilities data.
Returns
0 on success, negative on error.

◆ get_core_curr_freq

uint32_t(* spdk_governor::get_core_curr_freq) (uint32_t lcore_id)

Get current frequency of a given core.

Parameters
lcore_idCore number.
Returns
Currently set core frequency.

◆ init

int(* spdk_governor::init) (void)

Initialize a governor.

Returns
0 on success, non-zero on error.

◆ set_core_freq_max

int(* spdk_governor::set_core_freq_max) (uint32_t lcore_id)

Set core frequency to maximum available.

Parameters
lcore_idCore number.
Returns
1 on success, 0 already at max frequency, negative on error.

◆ set_core_freq_min

int(* spdk_governor::set_core_freq_min) (uint32_t lcore_id)

Set core frequency to minimum available.

Parameters
lcore_idCore number.
Returns
1 on success, 0 already at min frequency, negative on error.

The documentation for this struct was generated from the following file:
  • scheduler.h