StarPU Handbook

sc_hypervisor_monitoring.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 * Copyright (C) 2015 Mathieu Lirzin
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_MONITORING_H
19#define SC_HYPERVISOR_MONITORING_H
20
21#include <sc_hypervisor.h>
22
23#ifdef __cplusplus
24 extern "C"
25{
26#endif
27
37 struct sc_hypervisor_resize_ack
38{
42 int receiver_sched_ctx;
43
47 int *moved_workers;
48
52 int nmoved_workers;
53
59 int *acked_workers;
60};
61
68 struct sc_hypervisor_wrapper
69{
73 unsigned sched_ctx;
74
78 struct sc_hypervisor_policy_config *config;
79
84 double start_time_w[STARPU_NMAXWORKERS];
85
89 double current_idle_time[STARPU_NMAXWORKERS];
90
94 double idle_time[STARPU_NMAXWORKERS];
95
99 double idle_start_time[STARPU_NMAXWORKERS];
100
104 double exec_time[STARPU_NMAXWORKERS];
105
109 double exec_start_time[STARPU_NMAXWORKERS];
110
115 int worker_to_be_removed[STARPU_NMAXWORKERS];
116
120 int pushed_tasks[STARPU_NMAXWORKERS];
121
125 int poped_tasks[STARPU_NMAXWORKERS];
126
130 double total_flops;
131
135 double total_elapsed_flops[STARPU_NMAXWORKERS];
136
140 double elapsed_flops[STARPU_NMAXWORKERS];
141
146 size_t elapsed_data[STARPU_NMAXWORKERS];
147
151 int elapsed_tasks[STARPU_NMAXWORKERS];
152
158 double ref_speed[2];
159
163 double submitted_flops;
164
169 double remaining_flops;
170
174 double start_time;
175
179 double real_start_time;
180
184 double hyp_react_start_time;
185
192 struct sc_hypervisor_resize_ack resize_ack;
193
198 starpu_pthread_mutex_t mutex;
199
204 unsigned total_flops_available;
205
209 unsigned to_be_sized;
210
215 unsigned compute_idle[STARPU_NMAXWORKERS];
216
221 unsigned compute_partial_idle[STARPU_NMAXWORKERS];
222
226 unsigned consider_max;
227};
228
233 struct sc_hypervisor_wrapper *sc_hypervisor_get_wrapper(unsigned sched_ctx);
234
239 unsigned *sc_hypervisor_get_sched_ctxs();
240
245 int sc_hypervisor_get_nsched_ctxs();
246
250 int sc_hypervisor_get_nworkers_ctx(unsigned sched_ctx, enum starpu_worker_archtype arch);
251
257 double sc_hypervisor_get_elapsed_flops_per_sched_ctx(struct sc_hypervisor_wrapper *sc_w);
258
262 double sc_hypervisor_get_total_elapsed_flops_per_sched_ctx(struct sc_hypervisor_wrapper* sc_w);
263
267 double sc_hypervisorsc_hypervisor_get_speed_per_worker_type(struct sc_hypervisor_wrapper* sc_w, enum starpu_worker_archtype arch);
268
272 double sc_hypervisor_get_speed(struct sc_hypervisor_wrapper *sc_w, enum starpu_worker_archtype arch);
273
276#ifdef __cplusplus
277}
278#endif
279
280#endif
sc_hypervisor_resize_ack::acked_workers
int * acked_workers
Definition: sc_hypervisor_monitoring.h:59
sc_hypervisor_resize_ack::moved_workers
int * moved_workers
Definition: sc_hypervisor_monitoring.h:47
sc_hypervisor_resize_ack::nmoved_workers
int nmoved_workers
Definition: sc_hypervisor_monitoring.h:52
sc_hypervisor_resize_ack::receiver_sched_ctx
int receiver_sched_ctx
Definition: sc_hypervisor_monitoring.h:42
sc_hypervisor_get_elapsed_flops_per_sched_ctx
double sc_hypervisor_get_elapsed_flops_per_sched_ctx(struct sc_hypervisor_wrapper *sc_w)
sc_hypervisor_get_sched_ctxs
unsigned * sc_hypervisor_get_sched_ctxs()
sc_hypervisorsc_hypervisor_get_speed_per_worker_type
double sc_hypervisorsc_hypervisor_get_speed_per_worker_type(struct sc_hypervisor_wrapper *sc_w, enum starpu_worker_archtype arch)
sc_hypervisor_get_nsched_ctxs
int sc_hypervisor_get_nsched_ctxs()
sc_hypervisor_get_total_elapsed_flops_per_sched_ctx
double sc_hypervisor_get_total_elapsed_flops_per_sched_ctx(struct sc_hypervisor_wrapper *sc_w)
sc_hypervisor_get_nworkers_ctx
int sc_hypervisor_get_nworkers_ctx(unsigned sched_ctx, enum starpu_worker_archtype arch)
sc_hypervisor_get_wrapper
struct sc_hypervisor_wrapper * sc_hypervisor_get_wrapper(unsigned sched_ctx)
sc_hypervisor_get_speed
double sc_hypervisor_get_speed(struct sc_hypervisor_wrapper *sc_w, enum starpu_worker_archtype arch)
sc_hypervisor_resize_ack
Definition: sc_hypervisor_monitoring.h:38
starpu_worker_archtype
starpu_worker_archtype
Definition: starpu_worker.h:63
STARPU_NMAXWORKERS
#define STARPU_NMAXWORKERS
Definition: starpu_config.h:236
sc_hypervisor.h
sc_hypervisor_policy_config
Definition: sc_hypervisor_config.h:141
sc_hypervisor_wrapper::resize_ack
struct sc_hypervisor_resize_ack resize_ack
Definition: sc_hypervisor_monitoring.h:192
sc_hypervisor_wrapper::pushed_tasks
int pushed_tasks[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_monitoring.h:120
sc_hypervisor_wrapper::start_time_w
double start_time_w[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_monitoring.h:84
sc_hypervisor_wrapper::start_time
double start_time
Definition: sc_hypervisor_monitoring.h:174
sc_hypervisor_wrapper::elapsed_data
size_t elapsed_data[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_monitoring.h:146
sc_hypervisor_wrapper::compute_partial_idle
unsigned compute_partial_idle[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_monitoring.h:221
sc_hypervisor_wrapper::idle_start_time
double idle_start_time[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_monitoring.h:99
sc_hypervisor_wrapper::submitted_flops
double submitted_flops
Definition: sc_hypervisor_monitoring.h:163
sc_hypervisor_wrapper::elapsed_flops
double elapsed_flops[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_monitoring.h:140
sc_hypervisor_wrapper::poped_tasks
int poped_tasks[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_monitoring.h:125
sc_hypervisor_wrapper::current_idle_time
double current_idle_time[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_monitoring.h:89
sc_hypervisor_wrapper::total_elapsed_flops
double total_elapsed_flops[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_monitoring.h:135
sc_hypervisor_wrapper::exec_time
double exec_time[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_monitoring.h:104
sc_hypervisor_wrapper::config
struct sc_hypervisor_policy_config * config
Definition: sc_hypervisor_monitoring.h:78
sc_hypervisor_wrapper::exec_start_time
double exec_start_time[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_monitoring.h:109
sc_hypervisor_wrapper::real_start_time
double real_start_time
Definition: sc_hypervisor_monitoring.h:179
sc_hypervisor_wrapper::sched_ctx
unsigned sched_ctx
Definition: sc_hypervisor_monitoring.h:73
sc_hypervisor_wrapper::hyp_react_start_time
double hyp_react_start_time
Definition: sc_hypervisor_monitoring.h:184
sc_hypervisor_wrapper::elapsed_tasks
int elapsed_tasks[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_monitoring.h:151
sc_hypervisor_wrapper::compute_idle
unsigned compute_idle[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_monitoring.h:215
sc_hypervisor_wrapper::remaining_flops
double remaining_flops
Definition: sc_hypervisor_monitoring.h:169
sc_hypervisor_wrapper::worker_to_be_removed
int worker_to_be_removed[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_monitoring.h:115
sc_hypervisor_wrapper::total_flops_available
unsigned total_flops_available
Definition: sc_hypervisor_monitoring.h:204
sc_hypervisor_wrapper::mutex
starpu_pthread_mutex_t mutex
Definition: sc_hypervisor_monitoring.h:198
sc_hypervisor_wrapper::consider_max
unsigned consider_max
Definition: sc_hypervisor_monitoring.h:226
sc_hypervisor_wrapper::total_flops
double total_flops
Definition: sc_hypervisor_monitoring.h:130
sc_hypervisor_wrapper::ref_speed
double ref_speed[2]
Definition: sc_hypervisor_monitoring.h:158
sc_hypervisor_wrapper::idle_time
double idle_time[STARPU_NMAXWORKERS]
Definition: sc_hypervisor_monitoring.h:94
sc_hypervisor_wrapper::to_be_sized
unsigned to_be_sized
Definition: sc_hypervisor_monitoring.h:209
sc_hypervisor_wrapper
Definition: sc_hypervisor_monitoring.h:69