Lines Matching full:credit
278 long credit; in reserve_additional_memory() local
283 credit = balloon_stats.target_pages + balloon_stats.target_unpopulated in reserve_additional_memory()
290 if (credit <= 0) in reserve_additional_memory()
293 balloon_hotplug = round_up(credit, PAGES_PER_SECTION); in reserve_additional_memory()
500 * needed, or if the credit has changed while state is not BP_DONE.
502 static bool balloon_thread_cond(long credit) in balloon_thread_cond() argument
505 credit = 0; in balloon_thread_cond()
507 return current_credit() != credit || kthread_should_stop(); in balloon_thread_cond()
518 long credit; in balloon_thread() local
536 credit = current_credit(); in balloon_thread()
539 balloon_thread_cond(credit), timeout); in balloon_thread()
546 credit = current_credit(); in balloon_thread()
548 if (credit > 0) { in balloon_thread()
550 balloon_state = increase_reservation(credit); in balloon_thread()
555 if (credit < 0) { in balloon_thread()
558 n_pages = min(-credit, si_mem_available()); in balloon_thread()
561 if (balloon_state == BP_DONE && n_pages != -credit && in balloon_thread()
776 long credit, last_credit = 0; in balloon_wait_finish() local
788 while ((credit = current_credit()) < 0) { in balloon_wait_finish()
789 if (credit != last_credit) { in balloon_wait_finish()
791 last_credit = credit; in balloon_wait_finish()
795 -credit); in balloon_wait_finish()