balance.h 606 B

1234567891011121314151617181920212223
  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,
  14. float load_limit, cpumask_t *exclude_cpus, int non_local_cpus);
  15. int apply_affinity(lub_list_t *balance_irqs);
  16. int choose_irqs_to_move(lub_list_t *cpus, lub_list_t *balance_irqs,
  17. float threshold, birq_choose_strategy_e strategy,
  18. cpumask_t *exclude_cpus);
  19. #endif