Lines Matching refs:usage
2546 static u64 calculate_overage(unsigned long usage, unsigned long high) in calculate_overage() argument
2550 if (usage <= high) in calculate_overage()
2559 overage = usage - high; in calculate_overage()
4231 unsigned long usage; in __mem_cgroup_threshold() local
4243 usage = mem_cgroup_usage(memcg, swap); in __mem_cgroup_threshold()
4258 for (; i >= 0 && unlikely(t->entries[i].threshold > usage); i--) in __mem_cgroup_threshold()
4270 for (; i < t->size && unlikely(t->entries[i].threshold <= usage); i++) in __mem_cgroup_threshold()
4331 unsigned long usage; in __mem_cgroup_usage_register_event() local
4342 usage = mem_cgroup_usage(memcg, false); in __mem_cgroup_usage_register_event()
4345 usage = mem_cgroup_usage(memcg, true); in __mem_cgroup_usage_register_event()
4379 if (new->entries[i].threshold <= usage) { in __mem_cgroup_usage_register_event()
4422 unsigned long usage; in __mem_cgroup_usage_unregister_event() local
4429 usage = mem_cgroup_usage(memcg, false); in __mem_cgroup_usage_unregister_event()
4432 usage = mem_cgroup_usage(memcg, true); in __mem_cgroup_usage_unregister_event()
4473 if (new->entries[j].threshold <= usage) { in __mem_cgroup_usage_unregister_event()
6680 static unsigned long effective_protection(unsigned long usage, in effective_protection() argument
6689 protected = min(usage, setting); in effective_protection()
6740 usage > protected) { in effective_protection()
6744 unclaimed *= usage - protected; in effective_protection()
6764 unsigned long usage, parent_usage; in mem_cgroup_calculate_protection() local
6783 usage = page_counter_read(&memcg->memory); in mem_cgroup_calculate_protection()
6784 if (!usage) in mem_cgroup_calculate_protection()
6800 WRITE_ONCE(memcg->memory.emin, effective_protection(usage, parent_usage, in mem_cgroup_calculate_protection()
6805 WRITE_ONCE(memcg->memory.elow, effective_protection(usage, parent_usage, in mem_cgroup_calculate_protection()
7407 unsigned long usage = page_counter_read(&memcg->swap); in mem_cgroup_swap_full() local
7409 if (usage * 2 >= READ_ONCE(memcg->swap.high) || in mem_cgroup_swap_full()
7410 usage * 2 >= READ_ONCE(memcg->swap.max)) in mem_cgroup_swap_full()