Friday, July 24, 2009

Page Reclaim I (Basics) - Swapping Subsystem (swapfile.c, swap_state.c)

3 kinds of pages handled:
1. anon mem pages (usr stack/heap)
2. dirty pages of private mem map (does not change the files on disk)
3. IPC shared pages

note that the dirty pages are not swapped out, they are just updated in disk and removed from RAM. because this has the same effect as swapping out.

swap area can be on a physical disk partition or a separate file inside a large partition. but these data is stored only as long as the system is on and discarded otherwise. so swap area has a very little control info (unlike the filesystem info)

extents and priority -- interesting

swap_info array contains all the swap areas (disk partition,bdev or files). they are kept in swap area descriptors.

swapped out page id: page slot index[8:31], area number[1:7], 0[0]

the difference between a blank pte and swapped pte is that the id for blank pte = 0...0

No comments:

Post a Comment