StarPU Handbook

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
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 *
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
27 /* ctl properties*/
28 #define SC_HYPERVISOR_MAX_IDLE -1
29 #define SC_HYPERVISOR_MIN_WORKING -2
30 #define SC_HYPERVISOR_PRIORITY -3
31 #define SC_HYPERVISOR_MIN_WORKERS -4
32 #define SC_HYPERVISOR_MAX_WORKERS -5
33 #define SC_HYPERVISOR_GRANULARITY -6
34 #define SC_HYPERVISOR_FIXED_WORKERS -7
35 #define SC_HYPERVISOR_MIN_TASKS -8
36 #define SC_HYPERVISOR_NEW_WORKERS_MAX_IDLE -9
37 #define SC_HYPERVISOR_TIME_TO_APPLY -10
38 #define SC_HYPERVISOR_NULL -11
39 #define SC_HYPERVISOR_ISPEED_W_SAMPLE -12
40 #define SC_HYPERVISOR_ISPEED_CTX_SAMPLE -13
41 #define SC_HYPERVISOR_TIME_SAMPLE -14
42
43
44 #define MAX_IDLE_TIME 5000000000
45 #define MIN_WORKING_TIME 500
46
47 struct sc_hypervisor_policy_config
48 {
49 /* underneath this limit we cannot resize */
50 int min_nworkers;
51
52 /* above this limit we cannot resize */
53 int max_nworkers;
54
55 /*resize granularity */
56 int granularity;
57
58 /* priority for a worker to stay in this context */
59 /* the smaller the priority the faster it will be moved */
60 /* to another context */
61 int priority[STARPU_NMAXWORKERS];
62
63 /* above this limit the priority of the worker is reduced */
64 double max_idle[STARPU_NMAXWORKERS];
65
66 /* underneath this limit the priority of the worker is reduced */
67 double min_working[STARPU_NMAXWORKERS];
68
69 /* workers that will not move */
70 int fixed_workers[STARPU_NMAXWORKERS];
71
72 /* max idle for the workers that will be added during the resizing process*/
73 double new_workers_max_idle;
74
75 /* sample used to compute the instant speed per worker*/
76 double ispeed_w_sample[STARPU_NMAXWORKERS];
77
78 /* sample used to compute the instant speed per ctx*/
79 double ispeed_ctx_sample;
80
81 /* sample used to compute the instant speed per ctx (in seconds)*/
82 double time_sample;
83 };
84
85 /* set a certain configuration to a context */
86 void sc_hypervisor_set_config(unsigned sched_ctx, void *config);
87
88 /* check out the configuration of a context */
89 struct sc_hypervisor_policy_config *sc_hypervisor_get_config(unsigned sched_ctx);
90
91 /* impose different parameters to a configuration of a context */
92 void sc_hypervisor_ctl(unsigned sched_ctx, ...);
93
94 #ifdef __cplusplus
95 }
96 #endif
97
98 #endif
sc_hypervisor_get_config
struct sc_hypervisor_policy_config * sc_hypervisor_get_config(unsigned sched_ctx)
sc_hypervisor_policy_config::min_working
double min_working[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_config.h:67
sc_hypervisor_ctl
void sc_hypervisor_ctl(unsigned sched_ctx,...)
sc_hypervisor_policy_config::granularity
int granularity
Definition: sc_hypervisor_config.h:56
sc_hypervisor_policy_config::min_nworkers
int min_nworkers
Definition: sc_hypervisor_config.h:50
sc_hypervisor_policy_config::new_workers_max_idle
double new_workers_max_idle
Definition: sc_hypervisor_config.h:73
sc_hypervisor_policy_config::priority
int priority[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_config.h:61
sc_hypervisor_policy_config::time_sample
double time_sample
Definition: sc_hypervisor_config.h:82
sc_hypervisor_policy_config::ispeed_ctx_sample
double ispeed_ctx_sample
Definition: sc_hypervisor_config.h:79
sc_hypervisor_policy_config::ispeed_w_sample
double ispeed_w_sample[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_config.h:76
STARPU_NMAXWORKERS
#define STARPU_NMAXWORKERS
Definition: starpu_config.h:74
sc_hypervisor_policy_config::max_nworkers
int max_nworkers
Definition: sc_hypervisor_config.h:53
sc_hypervisor_policy_config::fixed_workers
int fixed_workers[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_config.h:70
sc_hypervisor_set_config
void sc_hypervisor_set_config(unsigned sched_ctx, void *config)
sc_hypervisor.h
sc_hypervisor_policy_config
Definition: sc_hypervisor_config.h:47
sc_hypervisor_policy_config::max_idle
double max_idle[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_config.h:64