StarPU Handbook
 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 
48 {
49  /* underneath this limit we cannot resize */
51 
52  /* above this limit we cannot resize */
54 
55  /*resize 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 */
62 
63  /* above this limit the priority of the worker is reduced */
65 
66  /* underneath this limit the priority of the worker is reduced */
68 
69  /* workers that will not move */
71 
72  /* max idle for the workers that will be added during the resizing process*/
74 
75  /* sample used to compute the instant speed per worker*/
77 
78  /* sample used to compute the instant speed per ctx*/
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