CLIMB framework
include/sch/climb.h View source View on GitHubStructs
Section titled “Structs”climb_handle
Section titled “climb_handle”struct climb_handle {
char *name;
struct list_head list;
climb_pressure_t pressure;
climb_pressure_t applied_pressure_internal;
enum climb_pressure_kind kind;
struct climb_source *pressure_source;
struct thread *given_by;
struct thread *given_to;
}; climb_thread_state
Section titled “climb_thread_state”struct climb_thread_state {
climb_pressure_t direct_pressure;
climb_pressure_t indirect_pressure;
climb_pressure_t pressure_ewma;
int32_t wanted_boost;
fx32_32_t boost_ewma;
int32_t effective_boost;
int32_t pressure_periods;
struct list_head handles;
bool on_climb_tree : 1;
bool was_pinned : 1;
struct rbt_node climb_node;
struct list_head tmp_list_node;
struct climb_handle handle;
}; climb_source
Section titled “climb_source”struct climb_source {
char *name;
climb_pressure_t base;
}; climb_pressure_kind
Section titled “climb_pressure_kind”enum climb_pressure_kind {
CLIMB_PRESSURE_DIRECT,
CLIMB_PRESSURE_INDIRECT,
}; Type Aliases
Section titled “Type Aliases”climb_pressure_t
Section titled “climb_pressure_t”typedef fx32_32_t climb_pressure_t; Functions
Section titled “Functions”climb_thread_applied_pressure
Section titled “climb_thread_applied_pressure”climb_pressure_t climb_thread_applied_pressure(struct thread *t); climb_thread_compute_pressure_to_apply
Section titled “climb_thread_compute_pressure_to_apply”climb_pressure_t climb_thread_compute_pressure_to_apply(struct thread *t); climb_handle_apply
Section titled “climb_handle_apply”void climb_handle_apply(struct thread *t, struct climb_handle *h); climb_handle_update
Section titled “climb_handle_update”void climb_handle_update(struct thread *t, struct climb_handle *h, climb_pressure_t new_pressure); climb_handle_remove
Section titled “climb_handle_remove”void climb_handle_remove(struct climb_handle *h); climb_handle_apply_locked
Section titled “climb_handle_apply_locked”void climb_handle_apply_locked(struct thread *t, struct climb_handle *h); climb_handle_remove_locked
Section titled “climb_handle_remove_locked”void climb_handle_remove_locked(struct climb_handle *h); climb_recompute_pressure
Section titled “climb_recompute_pressure”void climb_recompute_pressure(struct thread *t); climb_thread_remove
Section titled “climb_thread_remove”void climb_thread_remove(struct thread *t); climb_thread_init
Section titled “climb_thread_init”void climb_thread_init(struct thread *t); climb_post_migrate_hook
Section titled “climb_post_migrate_hook”void climb_post_migrate_hook(struct thread *t, size_t old_cpu, size_t new_cpu); climb_get_thread_data
Section titled “climb_get_thread_data”size_t climb_get_thread_data(struct rbt_node *n); climb_handle_init
Section titled “climb_handle_init”struct climb_handle climb_handle_init(struct climb_handle *ch, struct climb_source *cs, enum climb_pressure_kind k); Macros
Section titled “Macros”CLIMB_BOOST_LEVELS
Section titled “CLIMB_BOOST_LEVELS”#define CLIMB_BOOST_LEVELS 20 CLIMB_MIN_GLOBAL_BOOST
Section titled “CLIMB_MIN_GLOBAL_BOOST”#define CLIMB_MIN_GLOBAL_BOOST 1 CLIMB_REINSERT_THRESHOLD
Section titled “CLIMB_REINSERT_THRESHOLD”#define CLIMB_REINSERT_THRESHOLD 2 CLIMB_GLOBAL_BOOST_SCALE
Section titled “CLIMB_GLOBAL_BOOST_SCALE”#define CLIMB_GLOBAL_BOOST_SCALE(nt) (CLIMB_BOOST_LEVELS / nt) CLIMB_PRESSURE_KEY_SHIFT
Section titled “CLIMB_PRESSURE_KEY_SHIFT”#define CLIMB_PRESSURE_KEY_SHIFT 15 CLIMB_MAX_DECAY_PERIODS
Section titled “CLIMB_MAX_DECAY_PERIODS”#define CLIMB_MAX_DECAY_PERIODS 20 climb_thread_state_from_tree_node
Section titled “climb_thread_state_from_tree_node”#define climb_thread_state_from_tree_node(tn) \
(container_of(tn, struct climb_thread_state, climb_node)) CLIMB_PRESSURE_THREAD_BASE
Section titled “CLIMB_PRESSURE_THREAD_BASE”#define CLIMB_PRESSURE_THREAD_BASE FX(0.05) CLIMB_PRESSURE_IO_BASE
Section titled “CLIMB_PRESSURE_IO_BASE”#define CLIMB_PRESSURE_IO_BASE FX(0.20) CLIMB_PRESSURE_LOCK_BASE
Section titled “CLIMB_PRESSURE_LOCK_BASE”#define CLIMB_PRESSURE_LOCK_BASE FX(0.10) CLIMB_PRESSURE_MAX
Section titled “CLIMB_PRESSURE_MAX”#define CLIMB_PRESSURE_MAX FX(1.0) CLIMB_PRESSURE
Section titled “CLIMB_PRESSURE”#define CLIMB_PRESSURE(x) FX(x) CLIMB_PRESSURE_MAX
Section titled “CLIMB_PRESSURE_MAX”#define CLIMB_PRESSURE_MAX FX(1.0) CLIMB_DIRECT_PRESSURE_MAX
Section titled “CLIMB_DIRECT_PRESSURE_MAX”#define CLIMB_DIRECT_PRESSURE_MAX FX(1.0) CLIMB_INDIRECT_PRESSURE_MAX
Section titled “CLIMB_INDIRECT_PRESSURE_MAX”#define CLIMB_INDIRECT_PRESSURE_MAX FX(1.0) CLIMB_INDIRECT_MIN_SCALE
Section titled “CLIMB_INDIRECT_MIN_SCALE”#define CLIMB_INDIRECT_MIN_SCALE FX(0.10) CLIMB_INDIRECT_WEIGHT
Section titled “CLIMB_INDIRECT_WEIGHT”#define CLIMB_INDIRECT_WEIGHT FX(0.85) CLIMB_BOOST_LEVEL_MAX
Section titled “CLIMB_BOOST_LEVEL_MAX”#define CLIMB_BOOST_LEVEL_MAX 20 CLIMB_BOOST_EWMA_ALPHA
Section titled “CLIMB_BOOST_EWMA_ALPHA”#define CLIMB_BOOST_EWMA_ALPHA FX(0.75) CLIMB_PRESSURE_EXPONENT
Section titled “CLIMB_PRESSURE_EXPONENT”#define CLIMB_PRESSURE_EXPONENT 3 /* cubic */ CLIMB_PRESSURE_TO_BOOST_SCALE
Section titled “CLIMB_PRESSURE_TO_BOOST_SCALE”#define CLIMB_PRESSURE_TO_BOOST_SCALE FX(8.0) CLIMB_SOURCE_EXTERN
Section titled “CLIMB_SOURCE_EXTERN”#define CLIMB_SOURCE_EXTERN(name) extern struct climb_source __climb_src_##name CLIMB_SOURCE_CREATE
Section titled “CLIMB_SOURCE_CREATE”#define CLIMB_SOURCE_CREATE(n, strname, b) \
struct climb_source __climb_src_##n = {.name = strname, .base = b} CLIMB_SOURCE
Section titled “CLIMB_SOURCE”#define CLIMB_SOURCE(name) &(__climb_src_##name)