MCPcopy Create free account
hub / github.com/F-Stack/f-stack / swp_sizecheck

Function swp_sizecheck

freebsd/vm/swap_pager.c:533–547  ·  view source on GitHub ↗

* SWP_SIZECHECK() - update swap_pager_full indication * * update the swap_pager_almost_full indication and warn when we are * about to run out of swap space, using lowat/hiwat hysteresis. * * Clear swap_pager_full ( task killing ) indication when lowat is met. * * No restrictions on call * This routine may not block. */

Source from the content-addressed store, hash-verified

531 * This routine may not block.
532 */
533static void
534swp_sizecheck(void)
535{
536
537 if (swap_pager_avail < nswap_lowat) {
538 if (swap_pager_almost_full == 0) {
539 printf("swap_pager: out of swap space\n");
540 swap_pager_almost_full = 1;
541 }
542 } else {
543 swap_pager_full = 0;
544 if (swap_pager_avail > nswap_hiwat)
545 swap_pager_almost_full = 0;
546 }
547}
548
549/*
550 * SWAP_PAGER_INIT() - initialize the swap pager!

Callers 3

swp_pager_getswapspaceFunction · 0.85
swp_pager_freeswapspaceFunction · 0.85
swaponsomethingFunction · 0.85

Calls 1

printfFunction · 0.50

Tested by

no test coverage detected