balloon.h 756 B

1234567891011121314151617181920212223242526
  1. /******************************************************************************
  2. * Xen balloon functionality
  3. */
  4. #define RETRY_UNLIMITED 0
  5. struct balloon_stats {
  6. /* We aim for 'current allocation' == 'target allocation'. */
  7. unsigned long current_pages;
  8. unsigned long target_pages;
  9. /* Number of pages in high- and low-memory balloons. */
  10. unsigned long balloon_low;
  11. unsigned long balloon_high;
  12. unsigned long schedule_delay;
  13. unsigned long max_schedule_delay;
  14. unsigned long retry_count;
  15. unsigned long max_retry_count;
  16. };
  17. extern struct balloon_stats balloon_stats;
  18. void balloon_set_new_target(unsigned long target);
  19. int alloc_xenballooned_pages(int nr_pages, struct page** pages);
  20. void free_xenballooned_pages(int nr_pages, struct page** pages);