Lines Matching full:credit
273 long credit; in reserve_additional_memory() local
278 credit = balloon_stats.target_pages + balloon_stats.target_unpopulated in reserve_additional_memory()
285 if (credit <= 0) in reserve_additional_memory()
288 balloon_hotplug = round_up(credit, PAGES_PER_SECTION); in reserve_additional_memory()
495 * needed, or if the credit has changed while state is not BP_DONE.
497 static bool balloon_thread_cond(enum bp_state state, long credit) in balloon_thread_cond() argument
500 credit = 0; in balloon_thread_cond()
502 return current_credit() != credit || kthread_should_stop(); in balloon_thread_cond()
514 long credit; in balloon_thread() local
532 credit = current_credit(); in balloon_thread()
535 balloon_thread_cond(state, credit), timeout); in balloon_thread()
542 credit = current_credit(); in balloon_thread()
544 if (credit > 0) { in balloon_thread()
546 state = increase_reservation(credit); in balloon_thread()
551 if (credit < 0) { in balloon_thread()
554 n_pages = min(-credit, si_mem_available()); in balloon_thread()
556 if (state == BP_DONE && n_pages != -credit && in balloon_thread()