Friday, July 3, 2009

Direct Page reclaim and Background Page reclaim call path

Direct Page Reclaim call path

__get_free_pages ->
alloc_pages ->
alloc_pages_nodemask ->
__alloc_pages_slowpath ->
__alloc_pages_direct_reclaim ->
try_to_free_pages ->
do_try_to_free_pages ->
shrink_slab/shrink_zones ->
shrink_zone ->
shrink_list ->
shrink_inactive/active_list ->
shrink_page_list ->
page_out ->
|
V
mapping->a_ops->writepage


Background Page Reclaim call path


wakeup_kswapd ->
kswapd ->
balance_pgdat ->
shrink_slab/shrink_zone ->
shrink_list ->
shrink_inactive/active_list ->
shrink_page_list ->
page_out ->
|
V

mapping->a_ops->writepage



Note: Pages is moved from active list to inactive list for freeing in the end.
, shrink_active_list move pages to inactive list, when moving pages, pages are
isolated from lru list to a private list (page_list or l_hold).

No comments:

Post a Comment

Followers