Changeset View
Changeset View
Standalone View
Standalone View
head/sys/vm/swap_pager.c
Show First 20 Lines • Show All 1,966 Lines • ▼ Show 20 Lines | for (;;) { | ||||
limit = last - sb->p < SWAP_META_PAGES ? last - sb->p : | limit = last - sb->p < SWAP_META_PAGES ? last - sb->p : | ||||
SWAP_META_PAGES; | SWAP_META_PAGES; | ||||
for (i = start; i < limit; i++) { | for (i = start; i < limit; i++) { | ||||
if (sb->d[i] == SWAPBLK_NONE) | if (sb->d[i] == SWAPBLK_NONE) | ||||
continue; | continue; | ||||
swp_pager_update_freerange(&s_free, &n_free, sb->d[i]); | swp_pager_update_freerange(&s_free, &n_free, sb->d[i]); | ||||
sb->d[i] = SWAPBLK_NONE; | sb->d[i] = SWAPBLK_NONE; | ||||
} | } | ||||
pindex = sb->p + SWAP_META_PAGES; | |||||
if (swp_pager_swblk_empty(sb, 0, start) && | if (swp_pager_swblk_empty(sb, 0, start) && | ||||
swp_pager_swblk_empty(sb, limit, SWAP_META_PAGES)) { | swp_pager_swblk_empty(sb, limit, SWAP_META_PAGES)) { | ||||
SWAP_PCTRIE_REMOVE(&object->un_pager.swp.swp_blks, | SWAP_PCTRIE_REMOVE(&object->un_pager.swp.swp_blks, | ||||
sb->p); | sb->p); | ||||
uma_zfree(swblk_zone, sb); | uma_zfree(swblk_zone, sb); | ||||
} | } | ||||
pindex = sb->p + SWAP_META_PAGES; | |||||
} | } | ||||
swp_pager_freeswapspace(s_free, n_free); | swp_pager_freeswapspace(s_free, n_free); | ||||
} | } | ||||
/* | /* | ||||
* SWP_PAGER_META_FREE_ALL() - destroy all swap metadata associated with object | * SWP_PAGER_META_FREE_ALL() - destroy all swap metadata associated with object | ||||
* | * | ||||
* This routine locates and destroys all swap metadata associated with | * This routine locates and destroys all swap metadata associated with | ||||
▲ Show 20 Lines • Show All 916 Lines • Show Last 20 Lines |