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
56 /* Magic number for the balloon mount-point */
142 * @VMW_BALLOON_CMD_GET_TARGET: Gets the balloon target size.
145 * to be deflated from the balloon.
152 * balloon (up to 512).
159 * that would be invoked when the balloon
273 * @size: balloon actual size in basic page size (frames).
281 * @target: balloon target size in basic page size (frames).
302 * @capabilities: hypervisor balloon capabilities.
355 * @b_dev_info: balloon device information descriptor.
402 static struct vmballoon balloon;
555 * @b: pointer to the balloon.
629 * vmballoon_send_get_target() - Retrieve desired balloon size from the host.
631 * @b: pointer to the balloon.
657 * @b: pointer to the balloon.
661 * Tries to allocate @req_n_pages. Add them to the list of balloon pages in
723 /* On success do nothing. The page is already on the balloon list. */
741 * @b: pointer to the balloon.
774 * @b: pointer to the balloon.
780 * balloon) so that host can use it without fear that guest will need it (or
823 * @b: pointer to the balloon.
844 * @b: pointer to the balloon.
943 * balloon but were refused by the host for one reason or another.
956 * vmballoon_change - retrieve the required balloon change
958 * @b: pointer for the balloon.
960 * Return: the required change for the balloon size. A positive number
978 /* consider a 2MB slack on deflate, unless the balloon is emptied */
993 * @b: pointer to balloon.
1014 * for the balloon compaction mechanism.
1034 * @b: pointer to balloon.
1040 * Dequeues the number of requested pages from the balloon for deflation. The
1104 * vmballoon_inflate() - Inflate the balloon towards its target size.
1106 * @b: pointer to the balloon.
1146 /* Update the balloon size */
1174 * balloon but were refused by the host for one reason or another,
1184 * vmballoon_deflate() - Decrease the size of the balloon.
1186 * @b: pointer to the balloon
1191 * Decrease the size of the balloon allowing guest to use more memory.
1224 * performed according to the target and balloon size.
1241 /* First take the pages from the balloon pages. */
1342 * Receive notification and resize balloon
1370 * @b: pointer to the balloon.
1375 * Initialize vmci doorbell, to get notified as soon as balloon changes.
1405 * vmballoon_pop - Quickly release all pages allocate for the balloon.
1407 * @b: pointer to the balloon.
1409 * This function is called when host decides to "reset" balloon for one reason
1422 * Perform standard reset sequence by popping the balloon (in case it
1470 * vmballoon_work - periodic balloon worker for reset, inflation and deflation.
1474 * Resets the protocol if needed, gets the new size and adjusts balloon as
1511 * We are using a freezable workqueue so that balloon operations are
1520 * vmballoon_shrinker_scan() - deflate the balloon due to memory pressure.
1521 * @shrinker: pointer to the balloon shrinker.
1529 struct vmballoon *b = &balloon;
1550 * which balloon continuously grows and shrinks. Use WRITE_ONCE() since
1562 * @shrinker: pointer to the balloon shrinker.
1565 * Returns: number of 4k pages that are allocated for the balloon and can
1571 struct vmballoon *b = &balloon;
1648 * vmballoon_debug_show - shows statistics of balloon operations.
1672 seq_printf(f, "%-22s: %#16x\n", "balloon capabilities",
1745 .name = "balloon-vmware",
1753 * vmballoon_migratepage() - migrates a balloon page.
1754 * @b_dev_info: balloon device information descriptor.
1778 * (i.e., balloon reset), so try again.
1831 * we will decrease the size of the balloon to reflect the
1845 /* Update the balloon list under the @pages_lock */
1873 * @b: pointer to the balloon.
1886 * vmballoon_compaction_init() - initialized compaction for the balloon.
1888 * @b: pointer to the balloon.
1936 INIT_DELAYED_WORK(&balloon.dwork, vmballoon_work);
1938 error = vmballoon_register_shrinker(&balloon);
1946 balloon_devinfo_init(&balloon.b_dev_info);
1947 error = vmballoon_compaction_init(&balloon);
1951 INIT_LIST_HEAD(&balloon.huge_pages);
1952 spin_lock_init(&balloon.comm_lock);
1953 init_rwsem(&balloon.conf_sem);
1954 balloon.vmci_doorbell = VMCI_INVALID_HANDLE;
1955 balloon.batch_page = NULL;
1956 balloon.page = NULL;
1957 balloon.reset_required = true;
1959 queue_delayed_work(system_freezable_wq, &balloon.dwork, 0);
1961 vmballoon_debugfs_init(&balloon);
1965 vmballoon_unregister_shrinker(&balloon);
1966 vmballoon_compaction_deinit(&balloon);
1971 * Using late_initcall() instead of module_init() allows the balloon to use the
1972 * VMCI doorbell even when the balloon is built into the kernel. Otherwise the
1973 * VMCI is probed only after the balloon is initialized. If the balloon is used
1980 vmballoon_unregister_shrinker(&balloon);
1981 vmballoon_vmci_cleanup(&balloon);
1982 cancel_delayed_work_sync(&balloon.dwork);
1984 vmballoon_debugfs_exit(&balloon);
1991 vmballoon_send_start(&balloon, 0);
1992 vmballoon_pop(&balloon);
1994 /* Only once we popped the balloon, compaction can be deinit */
1995 vmballoon_compaction_deinit(&balloon);