Lines Matching full:reserve
78 * @reserve: pool of memory from which devices reserve entitlement, incl. spare
91 struct vio_cmo_pool reserve; member
151 /* Determine the amount of free entitlement available in reserve */ in vio_cmo_alloc()
181 * the reserve pool is used to reduce device entitlement, the excess
182 * pool is used to increase the reserve pool toward the desired entitlement
208 /* Spare is a subset of the reserve pool, replenish it first. */ in vio_cmo_dealloc()
212 * Replenish the spare in the reserve pool from the excess pool. in vio_cmo_dealloc()
213 * This moves entitlement into the reserve pool. in vio_cmo_dealloc()
218 vio_cmo.reserve.size += tmp; in vio_cmo_dealloc()
226 * Replenish the spare in the reserve pool from the reserve pool. in vio_cmo_dealloc()
242 * Increase the reserve pool until the desired allocation is met. in vio_cmo_dealloc()
243 * Move an allocation freed from the excess pool into the reserve in vio_cmo_dealloc()
246 if (excess_freed && (vio_cmo.desired > vio_cmo.reserve.size)) { in vio_cmo_dealloc()
247 tmp = min(excess_freed, (vio_cmo.desired - vio_cmo.reserve.size)); in vio_cmo_dealloc()
250 vio_cmo.reserve.size += tmp; in vio_cmo_dealloc()
292 vio_cmo.reserve.size += tmp; in vio_cmo_entitlement_update()
375 * Upon completion sizes of the reserve and excess pools are calculated.
457 /* Calculate new reserve and excess pool sizes */ in vio_cmo_balance()
458 cmo->reserve.size = cmo->min; in vio_cmo_balance()
464 /* Calculated reserve size above the minimum entitlement */ in vio_cmo_balance()
466 cmo->reserve.size += (viodev->cmo.entitled - in vio_cmo_balance()
472 cmo->excess.size = cmo->entitled - cmo->reserve.size; in vio_cmo_balance()
661 * any reserve memory in the change region to the excess pool. in vio_cmo_set_dev_desired()
664 vio_cmo.reserve.size -= viodev->cmo.entitled - desired; in vio_cmo_set_dev_desired()
667 * If entitlement moving from the reserve pool to the in vio_cmo_set_dev_desired()
756 * the reserve pool. in vio_cmo_bus_probe()
781 vio_cmo.reserve.size += tmp; in vio_cmo_bus_probe()
843 * Save min allocation for device in reserve as long in vio_cmo_bus_remove()
849 /* Replenish spare from freed reserve pool */ in vio_cmo_bus_remove()
857 /* Remaining reserve goes to excess pool */ in vio_cmo_bus_remove()
860 vio_cmo.reserve.size -= viodev->cmo.entitled; in vio_cmo_bus_remove()
883 * Set up the reserve and excess entitlement pools based on available
885 * require entitlement in the reserve pool.
914 vio_cmo.reserve.size = vio_cmo.spare; in vio_cmo_bus_init()
915 vio_cmo.reserve.size += (vio_cmo_num_OF_devs() * in vio_cmo_bus_init()
917 if (vio_cmo.reserve.size > vio_cmo.entitled) { in vio_cmo_bus_init()
924 vio_cmo.excess.size = vio_cmo.entitled - vio_cmo.reserve.size; in vio_cmo_bus_init()
926 vio_cmo.min = vio_cmo.reserve.size; in vio_cmo_bus_init()
927 vio_cmo.desired = vio_cmo.reserve.size; in vio_cmo_bus_init()
1023 viobus_cmo_pool_rd_attr(reserve, size);