forked from Minki/linux
b6f3067985
Pages that have been ballooned are useful for other Xen drivers doing grant table actions, because these pages have valid struct page/PFNs but have no valid MFN so are available for remapping. Acked-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> [v2: Deal with rebasing on top of modified balloon code] Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
26 lines
756 B
C
26 lines
756 B
C
/******************************************************************************
|
|
* 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;
|
|
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);
|
|
|
|
int alloc_xenballooned_pages(int nr_pages, struct page** pages);
|
|
void free_xenballooned_pages(int nr_pages, struct page** pages);
|