mirror of
https://github.com/libvirt/libvirt.git
synced 2026-08-10 04:58:12 -05:00
Introduce virNodeAllocPages
A long time ago in a galaxy far, far away it has been decided that libvirt will manage not only domains but host as well. And with my latest work on qemu driver supporting huge pages, we miss the cherry on top: an API to allocate huge pages on the run. Currently users are forced to log into the host and adjust the huge pages pool themselves. However, with this API the problem is gone - they can both size up and size down the pool. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
@@ -5616,6 +5616,22 @@ int virNodeGetFreePages(virConnectPtr conn,
|
||||
unsigned int cellcount,
|
||||
unsigned long long *counts,
|
||||
unsigned int flags);
|
||||
|
||||
typedef enum {
|
||||
VIR_NODE_ALLOC_PAGES_ADD = 0, /* Add @pageCounts to the pages pool. This
|
||||
can be used only to size up the pool. */
|
||||
VIR_NODE_ALLOC_PAGES_SET = (1 << 0), /* Don't add @pageCounts, instead set
|
||||
passed number of pages. This can be
|
||||
used to free allocated pages. */
|
||||
} virNodeAllocPagesFlags;
|
||||
|
||||
int virNodeAllocPages(virConnectPtr conn,
|
||||
unsigned int npages,
|
||||
unsigned int *pageSizes,
|
||||
unsigned long long *pageCounts,
|
||||
int startCell,
|
||||
unsigned int cellCount,
|
||||
unsigned int flags);
|
||||
/**
|
||||
* virSchedParameterType:
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user