123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- #ifndef SC_HYPERVISOR_MONITORING_H
- #define SC_HYPERVISOR_MONITORING_H
- #include <sc_hypervisor.h>
- #ifdef __cplusplus
- extern "C"
- {
- #endif
- struct sc_hypervisor_resize_ack
- {
-
- int receiver_sched_ctx;
-
- int *moved_workers;
-
- int nmoved_workers;
-
- int *acked_workers;
- };
- struct sc_hypervisor_wrapper
- {
-
- unsigned sched_ctx;
-
- struct sc_hypervisor_policy_config *config;
-
- double start_time_w[STARPU_NMAXWORKERS];
-
- double current_idle_time[STARPU_NMAXWORKERS];
-
- double idle_time[STARPU_NMAXWORKERS];
-
- double idle_start_time[STARPU_NMAXWORKERS];
-
-
- double exec_time[STARPU_NMAXWORKERS];
-
- double exec_start_time[STARPU_NMAXWORKERS];
-
- int worker_to_be_removed[STARPU_NMAXWORKERS];
-
- int pushed_tasks[STARPU_NMAXWORKERS];
-
- int poped_tasks[STARPU_NMAXWORKERS];
-
- double total_flops;
-
- double total_elapsed_flops[STARPU_NMAXWORKERS];
-
- double elapsed_flops[STARPU_NMAXWORKERS];
-
- size_t elapsed_data[STARPU_NMAXWORKERS];
-
- int elapsed_tasks[STARPU_NMAXWORKERS];
-
-
- double ref_speed[2];
-
- double submitted_flops;
-
- double remaining_flops;
-
-
- double start_time;
-
- double real_start_time;
-
-
- double hyp_react_start_time;
-
- struct sc_hypervisor_resize_ack resize_ack;
-
- starpu_pthread_mutex_t mutex;
-
- unsigned total_flops_available;
-
- unsigned to_be_sized;
-
- unsigned compute_idle[STARPU_NMAXWORKERS];
-
- unsigned compute_partial_idle[STARPU_NMAXWORKERS];
-
- unsigned consider_max;
- };
- struct sc_hypervisor_wrapper *sc_hypervisor_get_wrapper(unsigned sched_ctx);
- unsigned *sc_hypervisor_get_sched_ctxs();
- int sc_hypervisor_get_nsched_ctxs();
- int sc_hypervisor_get_nworkers_ctx(unsigned sched_ctx, enum starpu_worker_archtype arch);
- double sc_hypervisor_get_elapsed_flops_per_sched_ctx(struct sc_hypervisor_wrapper *sc_w);
- double sc_hypervisor_get_total_elapsed_flops_per_sched_ctx(struct sc_hypervisor_wrapper* sc_w);
- double sc_hypervisorsc_hypervisor_get_speed_per_worker_type(struct sc_hypervisor_wrapper* sc_w, enum starpu_worker_archtype arch);
- double sc_hypervisor_get_speed(struct sc_hypervisor_wrapper *sc_w, enum starpu_worker_archtype arch);
- #ifdef __cplusplus
- }
- #endif
- #endif
|