StarPU Handbook

sc_hypervisor_config.h
Go to the documentation of this file.
1/* StarPU --- Runtime system for heterogeneous multicore architectures.
2 *
3 * Copyright (C) 2011-2021 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
4 *
5 * StarPU is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation; either version 2.1 of the License, or (at
8 * your option) any later version.
9 *
10 * StarPU is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 *
14 * See the GNU Lesser General Public License in COPYING.LGPL for more details.
15 */
16
17#ifndef SC_HYPERVISOR_CONFIG_H
18#define SC_HYPERVISOR_CONFIG_H
19
20#include <sc_hypervisor.h>
21
22#ifdef __cplusplus
23 extern "C"
24{
25#endif
26
39#define SC_HYPERVISOR_MAX_IDLE -1
40
41#define SC_HYPERVISOR_MIN_WORKING -2
42
50#define SC_HYPERVISOR_PRIORITY -3
51
58#define SC_HYPERVISOR_MIN_WORKERS -4
59
66#define SC_HYPERVISOR_MAX_WORKERS -5
67
76#define SC_HYPERVISOR_GRANULARITY -6
77
84#define SC_HYPERVISOR_FIXED_WORKERS -7
85
94#define SC_HYPERVISOR_MIN_TASKS -8
95
102#define SC_HYPERVISOR_NEW_WORKERS_MAX_IDLE -9
103
110#define SC_HYPERVISOR_TIME_TO_APPLY -10
111
116#define SC_HYPERVISOR_NULL -11
117
123#define SC_HYPERVISOR_ISPEED_W_SAMPLE -12
124
130#define SC_HYPERVISOR_ISPEED_CTX_SAMPLE -13
131
132#define SC_HYPERVISOR_TIME_SAMPLE -14
133
134#define MAX_IDLE_TIME 5000000000
135#define MIN_WORKING_TIME 500
136
140 struct sc_hypervisor_policy_config
141{
145 int min_nworkers;
146
150 int max_nworkers;
151
155 int granularity;
156
162 int priority[STARPU_NMAXWORKERS];
163
169 double max_idle[STARPU_NMAXWORKERS];
170
175 double min_working[STARPU_NMAXWORKERS];
176
181 int fixed_workers[STARPU_NMAXWORKERS];
182
188 double new_workers_max_idle;
189
194 double ispeed_w_sample[STARPU_NMAXWORKERS];
195
200 double ispeed_ctx_sample;
201
206 double time_sample;
207};
208
212 void sc_hypervisor_set_config(unsigned sched_ctx, void *config);
213
217 struct sc_hypervisor_policy_config *sc_hypervisor_get_config(unsigned sched_ctx);
218
223 void sc_hypervisor_ctl(unsigned sched_ctx, ...);
224
227#ifdef __cplusplus
228}
229#endif
230
231#endif
sc_hypervisor_ctl
void sc_hypervisor_ctl(unsigned sched_ctx,...)
sc_hypervisor_set_config
void sc_hypervisor_set_config(unsigned sched_ctx, void *config)
sc_hypervisor_get_config
struct sc_hypervisor_policy_config * sc_hypervisor_get_config(unsigned sched_ctx)
STARPU_NMAXWORKERS
#define STARPU_NMAXWORKERS
Definition: starpu_config.h:236
sc_hypervisor.h
sc_hypervisor_policy_config::max_idle
double max_idle[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_config.h:169
sc_hypervisor_policy_config::time_sample
double time_sample
Definition: sc_hypervisor_config.h:206
sc_hypervisor_policy_config::new_workers_max_idle
double new_workers_max_idle
Definition: sc_hypervisor_config.h:188
sc_hypervisor_policy_config::ispeed_ctx_sample
double ispeed_ctx_sample
Definition: sc_hypervisor_config.h:200
sc_hypervisor_policy_config::priority
int priority[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_config.h:162
sc_hypervisor_policy_config::granularity
int granularity
Definition: sc_hypervisor_config.h:155
sc_hypervisor_policy_config::max_nworkers
int max_nworkers
Definition: sc_hypervisor_config.h:150
sc_hypervisor_policy_config::min_nworkers
int min_nworkers
Definition: sc_hypervisor_config.h:145
sc_hypervisor_policy_config::fixed_workers
int fixed_workers[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_config.h:181
sc_hypervisor_policy_config::ispeed_w_sample
double ispeed_w_sample[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_config.h:194
sc_hypervisor_policy_config::min_working
double min_working[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_config.h:175
sc_hypervisor_policy_config
Definition: sc_hypervisor_config.h:141