Lines Matching full:credit
262 long credit; in reserve_additional_memory() local
267 credit = balloon_stats.target_pages + balloon_stats.target_unpopulated in reserve_additional_memory()
274 if (credit <= 0) in reserve_additional_memory()
277 balloon_hotplug = round_up(credit, PAGES_PER_SECTION); in reserve_additional_memory()
484 * needed, or if the credit has changed while state is not BP_DONE.
486 static bool balloon_thread_cond(long credit) in balloon_thread_cond() argument
489 credit = 0; in balloon_thread_cond()
491 return current_credit() != credit || kthread_should_stop(); in balloon_thread_cond()
502 long credit; in balloon_thread() local
520 credit = current_credit(); in balloon_thread()
523 balloon_thread_cond(credit), timeout); in balloon_thread()
530 credit = current_credit(); in balloon_thread()
532 if (credit > 0) { in balloon_thread()
534 balloon_state = increase_reservation(credit); in balloon_thread()
539 if (credit < 0) { in balloon_thread()
542 n_pages = min(-credit, si_mem_available()); in balloon_thread()
545 if (balloon_state == BP_DONE && n_pages != -credit && in balloon_thread()
750 long credit, last_credit = 0; in balloon_wait_finish() local
762 while ((credit = current_credit()) < 0) { in balloon_wait_finish()
763 if (credit != last_credit) { in balloon_wait_finish()
765 last_credit = credit; in balloon_wait_finish()
769 -credit); in balloon_wait_finish()