include/linux/balloon.h

Source file repositories/reference/linux-study-clean/include/linux/balloon.h

File Facts

System
Linux kernel
Corpus path
include/linux/balloon.h
Extension
.h
Size
3135 bytes
Lines
78
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct balloon_dev_info {
	unsigned long isolated_pages;	/* # of isolated pages for migration */
	struct list_head pages;		/* Pages enqueued & handled to Host */
	int (*migratepage)(struct balloon_dev_info *, struct page *newpage,
			struct page *page, enum migrate_mode mode);
	bool adjust_managed_page_count;
};

struct page *balloon_page_alloc(void);
void balloon_page_enqueue(struct balloon_dev_info *b_dev_info,
		struct page *page);
struct page *balloon_page_dequeue(struct balloon_dev_info *b_dev_info);
size_t balloon_page_list_enqueue(struct balloon_dev_info *b_dev_info,
		struct list_head *pages);
size_t balloon_page_list_dequeue(struct balloon_dev_info *b_dev_info,
		struct list_head *pages, size_t n_req_pages);

static inline void balloon_devinfo_init(struct balloon_dev_info *balloon)
{
	balloon->isolated_pages = 0;
	INIT_LIST_HEAD(&balloon->pages);
	balloon->migratepage = NULL;
	balloon->adjust_managed_page_count = false;
}
#endif /* _LINUX_BALLOON_H */

Annotation

Implementation Notes