Lines Matching full:excess
82 * @excess: pool of excess entitlement not needed for device reserves or spare
95 struct vio_cmo_pool excess; member
137 * Allocations come from memory reserved for the devices and any excess
139 * hotplug must be equal to %VIO_CMO_MIN_ENT for the excess pool to be
158 /* If spare is not fulfilled, the excess pool can not be used. */ in vio_cmo_alloc()
160 excess_free = vio_cmo.excess.free; in vio_cmo_alloc()
169 vio_cmo.excess.free -= size; in vio_cmo_alloc()
184 * the reserve pool is used to reduce device entitlement, the excess
201 /* Amount of memory freed from the excess pool */ in vio_cmo_dealloc()
215 * Replenish the spare in the reserve pool from the excess pool. in vio_cmo_dealloc()
220 vio_cmo.excess.size -= tmp; in vio_cmo_dealloc()
246 * Move an allocation freed from the excess pool into the reserve in vio_cmo_dealloc()
252 vio_cmo.excess.size -= tmp; in vio_cmo_dealloc()
258 /* Return memory from the excess pool to that pool */ in vio_cmo_dealloc()
260 vio_cmo.excess.free += excess_freed; in vio_cmo_dealloc()
273 * and the rest is given to the excess pool. Decreases, if they are
274 * possible, come from the excess pool and from unused device entitlement
299 /* Remaining new allocation goes to the excess pool */ in vio_cmo_entitlement_update()
301 vio_cmo.excess.size += delta; in vio_cmo_entitlement_update()
302 vio_cmo.excess.free += delta; in vio_cmo_entitlement_update()
309 avail = vio_cmo.excess.free; in vio_cmo_entitlement_update()
330 /* Take entitlement from the excess pool first */ in vio_cmo_entitlement_update()
331 tmp = min(vio_cmo.excess.free, delta); in vio_cmo_entitlement_update()
332 vio_cmo.excess.size -= tmp; in vio_cmo_entitlement_update()
333 vio_cmo.excess.free -= tmp; in vio_cmo_entitlement_update()
378 * Upon completion sizes of the reserve and excess pools are calculated.
460 /* Calculate new reserve and excess pool sizes */ in vio_cmo_balance()
462 cmo->excess.free = 0; in vio_cmo_balance()
463 cmo->excess.size = 0; in vio_cmo_balance()
471 /* Calculated used excess entitlement */ in vio_cmo_balance()
475 cmo->excess.size = cmo->entitled - cmo->reserve.size; in vio_cmo_balance()
476 cmo->excess.free = cmo->excess.size - need; in vio_cmo_balance()
667 * any reserve memory in the change region to the excess pool. in vio_cmo_set_dev_desired()
671 vio_cmo.excess.size += viodev->cmo.entitled - desired; in vio_cmo_set_dev_desired()
674 * excess pool is currently unused, add to the excess in vio_cmo_set_dev_desired()
678 vio_cmo.excess.free += viodev->cmo.entitled - in vio_cmo_set_dev_desired()
773 tmp = vio_cmo.spare + vio_cmo.excess.free; in vio_cmo_bus_probe()
783 /* Use excess pool first to fulfill request */ in vio_cmo_bus_probe()
784 tmp = min(size, vio_cmo.excess.free); in vio_cmo_bus_probe()
785 vio_cmo.excess.free -= tmp; in vio_cmo_bus_probe()
786 vio_cmo.excess.size -= tmp; in vio_cmo_bus_probe()
789 /* Use spare if excess pool was insufficient */ in vio_cmo_bus_probe()
863 /* Remaining reserve goes to excess pool */ in vio_cmo_bus_remove()
864 vio_cmo.excess.size += viodev->cmo.entitled; in vio_cmo_bus_remove()
865 vio_cmo.excess.free += viodev->cmo.entitled; in vio_cmo_bus_remove()
889 * Set up the reserve and excess entitlement pools based on available
930 vio_cmo.excess.size = vio_cmo.entitled - vio_cmo.reserve.size; in vio_cmo_bus_init()
931 vio_cmo.excess.free = vio_cmo.excess.size; in vio_cmo_bus_init()
1018 viobus_cmo_pool_rd_attr(excess, size);
1019 viobus_cmo_pool_rd_attr(excess, free);