Lines Matching refs:usage

22 				      unsigned long usage)  in propagate_protected_usage()  argument
30 protected = min(usage, READ_ONCE(c->min)); in propagate_protected_usage()
39 protected = min(usage, READ_ONCE(c->low)); in propagate_protected_usage()
58 new = atomic_long_sub_return(nr_pages, &counter->usage); in page_counter_cancel()
63 atomic_long_set(&counter->usage, new); in page_counter_cancel()
84 new = atomic_long_add_return(nr_pages, &c->usage); in page_counter_charge()
142 new = atomic_long_add_return(nr_pages, &c->usage); in page_counter_try_charge()
144 atomic_long_sub(nr_pages, &c->usage); in page_counter_try_charge()
201 long usage; in page_counter_set_max() local
214 usage = page_counter_read(counter); in page_counter_set_max()
216 if (usage > nr_pages) in page_counter_set_max()
221 if (page_counter_read(counter) <= usage || nr_pages >= old) in page_counter_set_max()
243 propagate_protected_usage(c, atomic_long_read(&c->usage)); in page_counter_set_min()
260 propagate_protected_usage(c, atomic_long_read(&c->usage)); in page_counter_set_low()
337 static unsigned long effective_protection(unsigned long usage, in effective_protection() argument
347 protected = min(usage, setting); in effective_protection()
399 usage > protected) { in effective_protection()
403 unclaimed *= usage - protected; in effective_protection()
428 unsigned long usage, parent_usage; in page_counter_calculate_protection() local
441 usage = page_counter_read(counter); in page_counter_calculate_protection()
442 if (!usage) in page_counter_calculate_protection()
453 WRITE_ONCE(counter->emin, effective_protection(usage, parent_usage, in page_counter_calculate_protection()
459 WRITE_ONCE(counter->elow, effective_protection(usage, parent_usage, in page_counter_calculate_protection()