Lines Matching refs:balloon

8  * acts like a "balloon" that can be inflated to reclaim physical pages by
11 * other guests. The balloon can also be deflated to allow the guest to
54 /* Magic number for the balloon mount-point */
140 * @VMW_BALLOON_CMD_GET_TARGET: Gets the balloon target size.
143 * to be deflated from the balloon.
150 * balloon (up to 512).
157 * that would be invoked when the balloon
271 * @size: balloon actual size in basic page size (frames).
279 * @target: balloon target size in basic page size (frames).
300 * @capabilities: hypervisor balloon capabilities.
348 * @b_dev_info: balloon device information descriptor.
386 static struct vmballoon balloon;
539 * @b: pointer to the balloon.
613 * vmballoon_send_get_target() - Retrieve desired balloon size from the host.
615 * @b: pointer to the balloon.
641 * @b: pointer to the balloon.
645 * Tries to allocate @req_n_pages. Add them to the list of balloon pages in
707 /* On success do nothing. The page is already on the balloon list. */
725 * @b: pointer to the balloon.
758 * @b: pointer to the balloon.
764 * balloon) so that host can use it without fear that guest will need it (or
807 * @b: pointer to the balloon.
828 * @b: pointer to the balloon.
927 * balloon but were refused by the host for one reason or another.
940 * vmballoon_change - retrieve the required balloon change
942 * @b: pointer for the balloon.
944 * Return: the required change for the balloon size. A positive number
962 /* consider a 2MB slack on deflate, unless the balloon is emptied */
977 * @b: pointer to balloon.
998 * for the balloon compaction mechanism.
1018 * @b: pointer to balloon.
1024 * Dequeues the number of requested pages from the balloon for deflation. The
1088 * vmballoon_inflate() - Inflate the balloon towards its target size.
1090 * @b: pointer to the balloon.
1130 /* Update the balloon size */
1158 * balloon but were refused by the host for one reason or another,
1168 * vmballoon_deflate() - Decrease the size of the balloon.
1170 * @b: pointer to the balloon
1175 * Decrease the size of the balloon allowing guest to use more memory.
1208 * performed according to the target and balloon size.
1225 /* First take the pages from the balloon pages. */
1326 * Receive notification and resize balloon
1354 * @b: pointer to the balloon.
1359 * Initialize vmci doorbell, to get notified as soon as balloon changes.
1389 * vmballoon_pop - Quickly release all pages allocate for the balloon.
1391 * @b: pointer to the balloon.
1393 * This function is called when host decides to "reset" balloon for one reason
1406 * Perform standard reset sequence by popping the balloon (in case it
1454 * vmballoon_work - periodic balloon worker for reset, inflation and deflation.
1458 * Resets the protocol if needed, gets the new size and adjusts balloon as
1495 * We are using a freezable workqueue so that balloon operations are
1504 * vmballoon_shrinker_scan() - deflate the balloon due to memory pressure.
1505 * @shrinker: pointer to the balloon shrinker.
1513 struct vmballoon *b = &balloon;
1534 * which balloon continuously grows and shrinks. Use WRITE_ONCE() since
1546 * @shrinker: pointer to the balloon shrinker.
1549 * Returns: number of 4k pages that are allocated for the balloon and can
1555 struct vmballoon *b = &balloon;
1572 b->shrinker = shrinker_alloc(0, "vmw-balloon");
1630 * vmballoon_debug_show - shows statistics of balloon operations.
1654 seq_printf(f, "%-22s: %#16x\n", "balloon capabilities",
1721 * vmballoon_migratepage() - migrates a balloon page.
1722 * @b_dev_info: balloon device information descriptor.
1746 * (i.e., balloon reset), so try again.
1799 * we will decrease the size of the balloon to reflect the
1813 /* Update the balloon list under the @pages_lock */
1839 * vmballoon_compaction_init() - initialized compaction for the balloon.
1841 * @b: pointer to the balloon.
1871 INIT_DELAYED_WORK(&balloon.dwork, vmballoon_work);
1873 error = vmballoon_register_shrinker(&balloon);
1881 balloon_devinfo_init(&balloon.b_dev_info);
1882 vmballoon_compaction_init(&balloon);
1884 INIT_LIST_HEAD(&balloon.huge_pages);
1885 spin_lock_init(&balloon.comm_lock);
1886 init_rwsem(&balloon.conf_sem);
1887 balloon.vmci_doorbell = VMCI_INVALID_HANDLE;
1888 balloon.batch_page = NULL;
1889 balloon.page = NULL;
1890 balloon.reset_required = true;
1892 queue_delayed_work(system_freezable_wq, &balloon.dwork, 0);
1894 vmballoon_debugfs_init(&balloon);
1900 * Using late_initcall() instead of module_init() allows the balloon to use the
1901 * VMCI doorbell even when the balloon is built into the kernel. Otherwise the
1902 * VMCI is probed only after the balloon is initialized. If the balloon is used
1909 vmballoon_unregister_shrinker(&balloon);
1910 vmballoon_vmci_cleanup(&balloon);
1911 cancel_delayed_work_sync(&balloon.dwork);
1913 vmballoon_debugfs_exit(&balloon);
1920 vmballoon_send_start(&balloon, 0);
1921 vmballoon_pop(&balloon);