balloon.h 993 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
/******************************************************************************
 * Xen balloon functionality
 */

#define RETRY_UNLIMITED	0

struct balloon_stats {
	/* We aim for 'current allocation' == 'target allocation'. */
	unsigned long current_pages;
	unsigned long target_pages;
	/* Number of pages in high- and low-memory balloons. */
	unsigned long balloon_low;
	unsigned long balloon_high;
14
	unsigned long total_pages;
15 16 17 18 19 20 21 22 23
	unsigned long schedule_delay;
	unsigned long max_schedule_delay;
	unsigned long retry_count;
	unsigned long max_retry_count;
};

extern struct balloon_stats balloon_stats;

void balloon_set_new_target(unsigned long target);
24

25
int alloc_xenballooned_pages(int nr_pages, struct page **pages);
26
void free_xenballooned_pages(int nr_pages, struct page **pages);
27

28
struct device;
29
#ifdef CONFIG_XEN_SELFBALLOONING
30
extern int register_xen_selfballooning(struct device *dev);
31
#else
32
static inline int register_xen_selfballooning(struct device *dev)
33 34 35 36
{
	return -ENOSYS;
}
#endif