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,2013 Inria
4  * Copyright (C) 2013,2015,2017 CNRS
5  *
6  * StarPU is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation; either version 2.1 of the License, or (at
9  * your option) any later version.
10  *
11  * StarPU is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  *
15  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
16  */
17 
18 #ifndef SC_HYPERVISOR_CONFIG_H
19 #define SC_HYPERVISOR_CONFIG_H
20 
21 #include <sc_hypervisor.h>
22 
23 #ifdef __cplusplus
24 extern "C"
25 {
26 #endif
27 
28 /* ctl properties*/
29 #define SC_HYPERVISOR_MAX_IDLE -1
30 #define SC_HYPERVISOR_MIN_WORKING -2
31 #define SC_HYPERVISOR_PRIORITY -3
32 #define SC_HYPERVISOR_MIN_WORKERS -4
33 #define SC_HYPERVISOR_MAX_WORKERS -5
34 #define SC_HYPERVISOR_GRANULARITY -6
35 #define SC_HYPERVISOR_FIXED_WORKERS -7
36 #define SC_HYPERVISOR_MIN_TASKS -8
37 #define SC_HYPERVISOR_NEW_WORKERS_MAX_IDLE -9
38 #define SC_HYPERVISOR_TIME_TO_APPLY -10
39 #define SC_HYPERVISOR_NULL -11
40 #define SC_HYPERVISOR_ISPEED_W_SAMPLE -12
41 #define SC_HYPERVISOR_ISPEED_CTX_SAMPLE -13
42 #define SC_HYPERVISOR_TIME_SAMPLE -14
43 
44 
45 #define MAX_IDLE_TIME 5000000000
46 #define MIN_WORKING_TIME 500
47 
49 {
50  /* underneath this limit we cannot resize */
52 
53  /* above this limit we cannot resize */
55 
56  /*resize granularity */
58 
59  /* priority for a worker to stay in this context */
60  /* the smaller the priority the faster it will be moved */
61  /* to another context */
63 
64  /* above this limit the priority of the worker is reduced */
66 
67  /* underneath this limit the priority of the worker is reduced */
69 
70  /* workers that will not move */
72 
73  /* max idle for the workers that will be added during the resizing process*/
75 
76  /* sample used to compute the instant speed per worker*/
78 
79  /* sample used to compute the instant speed per ctx*/
81 
82  /* sample used to compute the instant speed per ctx (in seconds)*/
83  double time_sample;
84 };
85 
86 /* set a certain configuration to a context */
87 void sc_hypervisor_set_config(unsigned sched_ctx, void *config);
88 
89 /* check out the configuration of a context */
90 struct sc_hypervisor_policy_config *sc_hypervisor_get_config(unsigned sched_ctx);
91 
92 /* impose different parameters to a configuration of a context */
93 void sc_hypervisor_ctl(unsigned sched_ctx, ...);
94 
95 #ifdef __cplusplus
96 }
97 #endif
98 
99 #endif
struct sc_hypervisor_policy_config * sc_hypervisor_get_config(unsigned sched_ctx)
double min_working[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_config.h:68
void sc_hypervisor_ctl(unsigned sched_ctx,...)
int granularity
Definition: sc_hypervisor_config.h:57
int min_nworkers
Definition: sc_hypervisor_config.h:51
double new_workers_max_idle
Definition: sc_hypervisor_config.h:74
int priority[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_config.h:62
double time_sample
Definition: sc_hypervisor_config.h:83
double ispeed_ctx_sample
Definition: sc_hypervisor_config.h:80
double ispeed_w_sample[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_config.h:77
#define STARPU_NMAXWORKERS
Definition: starpu_config.h:102
int max_nworkers
Definition: sc_hypervisor_config.h:54
int fixed_workers[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_config.h:71
void sc_hypervisor_set_config(unsigned sched_ctx, void *config)
Definition: sc_hypervisor_config.h:48
double max_idle[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_config.h:65