Lines Matching defs: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.
395 static struct vmballoon balloon;
548 * @b: pointer to the balloon.
622 * vmballoon_send_get_target() - Retrieve desired balloon size from the host.
624 * @b: pointer to the balloon.
650 * @b: pointer to the balloon.
654 * Tries to allocate @req_n_pages. Add them to the list of balloon pages in
716 /* On success do nothing. The page is already on the balloon list. */
734 * @b: pointer to the balloon.
767 * @b: pointer to the balloon.
773 * balloon) so that host can use it without fear that guest will need it (or
816 * @b: pointer to the balloon.
837 * @b: pointer to the balloon.
936 * balloon but were refused by the host for one reason or another.
949 * vmballoon_change - retrieve the required balloon change
951 * @b: pointer for the balloon.
953 * Return: the required change for the balloon size. A positive number
971 /* consider a 2MB slack on deflate, unless the balloon is emptied */
986 * @b: pointer to balloon.
1007 * for the balloon compaction mechanism.
1027 * @b: pointer to balloon.
1033 * Dequeues the number of requested pages from the balloon for deflation. The
1097 * vmballoon_inflate() - Inflate the balloon towards its target size.
1099 * @b: pointer to the balloon.
1139 /* Update the balloon size */
1167 * balloon but were refused by the host for one reason or another,
1177 * vmballoon_deflate() - Decrease the size of the balloon.
1179 * @b: pointer to the balloon
1184 * Decrease the size of the balloon allowing guest to use more memory.
1217 * performed according to the target and balloon size.
1234 /* First take the pages from the balloon pages. */
1335 * Receive notification and resize balloon
1363 * @b: pointer to the balloon.
1368 * Initialize vmci doorbell, to get notified as soon as balloon changes.
1398 * vmballoon_pop - Quickly release all pages allocate for the balloon.
1400 * @b: pointer to the balloon.
1402 * This function is called when host decides to "reset" balloon for one reason
1415 * Perform standard reset sequence by popping the balloon (in case it
1463 * vmballoon_work - periodic balloon worker for reset, inflation and deflation.
1467 * Resets the protocol if needed, gets the new size and adjusts balloon as
1504 * We are using a freezable workqueue so that balloon operations are
1513 * vmballoon_shrinker_scan() - deflate the balloon due to memory pressure.
1514 * @shrinker: pointer to the balloon shrinker.
1522 struct vmballoon *b = &balloon;
1543 * which balloon continuously grows and shrinks. Use WRITE_ONCE() since
1555 * @shrinker: pointer to the balloon shrinker.
1558 * Returns: number of 4k pages that are allocated for the balloon and can
1564 struct vmballoon *b = &balloon;
1588 r = register_shrinker(&b->shrinker, "vmw-balloon");
1641 * vmballoon_debug_show - shows statistics of balloon operations.
1665 seq_printf(f, "%-22s: %#16x\n", "balloon capabilities",
1732 * vmballoon_migratepage() - migrates a balloon page.
1733 * @b_dev_info: balloon device information descriptor.
1757 * (i.e., balloon reset), so try again.
1810 * we will decrease the size of the balloon to reflect the
1824 /* Update the balloon list under the @pages_lock */
1850 * vmballoon_compaction_init() - initialized compaction for the balloon.
1852 * @b: pointer to the balloon.
1882 INIT_DELAYED_WORK(&balloon.dwork, vmballoon_work);
1884 error = vmballoon_register_shrinker(&balloon);
1892 balloon_devinfo_init(&balloon.b_dev_info);
1893 vmballoon_compaction_init(&balloon);
1895 INIT_LIST_HEAD(&balloon.huge_pages);
1896 spin_lock_init(&balloon.comm_lock);
1897 init_rwsem(&balloon.conf_sem);
1898 balloon.vmci_doorbell = VMCI_INVALID_HANDLE;
1899 balloon.batch_page = NULL;
1900 balloon.page = NULL;
1901 balloon.reset_required = true;
1903 queue_delayed_work(system_freezable_wq, &balloon.dwork, 0);
1905 vmballoon_debugfs_init(&balloon);
1909 vmballoon_unregister_shrinker(&balloon);
1914 * Using late_initcall() instead of module_init() allows the balloon to use the
1915 * VMCI doorbell even when the balloon is built into the kernel. Otherwise the
1916 * VMCI is probed only after the balloon is initialized. If the balloon is used
1923 vmballoon_unregister_shrinker(&balloon);
1924 vmballoon_vmci_cleanup(&balloon);
1925 cancel_delayed_work_sync(&balloon.dwork);
1927 vmballoon_debugfs_exit(&balloon);
1934 vmballoon_send_start(&balloon, 0);
1935 vmballoon_pop(&balloon);