sched_ctx_hypervisor.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #include <starpu.h>
  2. #include <../common/config.h>
  3. /* ioctl properties*/
  4. #define HYPERVISOR_MAX_IDLE 1
  5. #define HYPERVISOR_MIN_WORKING 2
  6. #define HYPERVISOR_PRIORITY 3
  7. #define HYPERVISOR_MIN_PROCS 4
  8. #define HYPERVISOR_MAX_PROCS 5
  9. #define HYPERVISOR_GRANULARITY 6
  10. struct starpu_sched_ctx_hypervisor_criteria* sched_ctx_hypervisor_init(int type);
  11. void sched_ctx_hypervisor_shutdown(void);
  12. void sched_ctx_hypervisor_handle_ctx(unsigned sched_ctx);
  13. void sched_ctx_hypervisor_ignore_ctx(unsigned sched_ctx);
  14. void sched_ctx_hypervisor_resize(unsigned sender_sched_ctx, unsigned receier_sched_ctx, int *workers_to_move, unsigned nworkers_to_movex);
  15. void sched_ctx_hypervisor_set_data(unsigned sched_ctx, void *data);
  16. void* sched_ctx_hypervisor_get_data(unsigned sched_ctx);
  17. void sched_ctx_hypervisor_ioctl(unsigned sched_ctx, ...);
  18. /* hypervisor policies */
  19. #define SIMPLE_POLICY 1
  20. struct hypervisor_policy {
  21. void (*init)(void);
  22. void (*deinit)(void);
  23. void (*add_sched_ctx)(unsigned sched_ctx);
  24. void(*remove_sched_ctx)(unsigned sched_ctx);
  25. void (*ioctl)(unsigned sched_ctx, va_list varg_list);
  26. void (*manage_idle_time)(unsigned req_sched_ctx, int *sched_ctxs, unsigned nsched_ctxs, int worker, double idle_time);
  27. };