balance.h 534 B

123456789101112131415161718192021
  1. #ifndef _balance_h
  2. #define _balance_h
  3. #include "lub/list.h"
  4. #include "irq.h"
  5. #include "cpu.h"
  6. typedef enum {
  7. BIRQ_CHOOSE_MAX,
  8. BIRQ_CHOOSE_MIN,
  9. BIRQ_CHOOSE_RND
  10. } birq_choose_strategy_e;
  11. int remove_irq_from_cpu(irq_t *irq, cpu_t *cpu);
  12. int move_irq_to_cpu(irq_t *irq, cpu_t *cpu);
  13. int balance(lub_list_t *cpus, lub_list_t *balance_irqs, float load_limit);
  14. int apply_affinity(lub_list_t *balance_irqs);
  15. int choose_irqs_to_move(lub_list_t *cpus, lub_list_t *balance_irqs,
  16. float threshold, birq_choose_strategy_e strategy);
  17. #endif