Lines Matching defs:alloc_state

511  * @alloc_state: Object holding allocation state such as charged cgroups.
523 struct ttm_bo_alloc_state *alloc_state)
528 may_evict = !alloc_state->in_evict && force_space &&
530 if (!alloc_state->charge_pool) {
531 ret = ttm_resource_try_charge(bo, place, &alloc_state->charge_pool,
532 force_space ? &alloc_state->limit_pool
543 if (!alloc_state->in_evict)
544 alloc_state->may_try_low = may_evict;
580 if (!alloc_state->in_evict) {
581 may_evict |= dmem_cgroup_below_min(NULL, alloc_state->charge_pool);
582 alloc_state->may_try_low = may_evict;
584 may_evict |= dmem_cgroup_below_low(NULL, alloc_state->charge_pool);
587 ret = ttm_resource_alloc(bo, place, res, alloc_state->charge_pool);
598 alloc_state->charge_pool = NULL;
622 /** @alloc_state: State associated with the allocation attempt. */
623 struct ttm_bo_alloc_state *alloc_state;
642 if (!evict_walk->alloc_state->may_try_low &&
643 bo->resource->css == evict_walk->alloc_state->charge_pool)
646 limit_pool = evict_walk->alloc_state->limit_pool;
662 evict_walk->alloc_state->charge_pool);
700 evict_walk->alloc_state);
739 .alloc_state = state,
815 .alloc_state = &(struct ttm_bo_alloc_state) {
978 struct ttm_bo_alloc_state alloc_state = {};
990 &alloc_state);
993 dmem_cgroup_uncharge(alloc_state.charge_pool, bo->base.size);
994 dmem_cgroup_pool_state_put(alloc_state.limit_pool);
998 ticket, res, &alloc_state);
1000 dmem_cgroup_pool_state_put(alloc_state.limit_pool);
1003 dmem_cgroup_uncharge(alloc_state.charge_pool,
1010 dmem_cgroup_uncharge(alloc_state.charge_pool, bo->base.size);
1011 dmem_cgroup_pool_state_put(alloc_state.limit_pool);