page cache is a set of radix trees that helps to quickly find out a page from the address space of object of the owner.
kinds of pages in page cache
- regular file, directories
- block device data
- swapped out processes
- file of special fs (eg, ipc shm)
- regular file
- block device file
- swap area and swap cache
the radix tree of the pages in a page cache is searched in a way similar to page table lookup. the number of bits taken for indexing depends on the height of the tree.
find_get_page() increases the page usage counter (page->count). find_lock_page() additionally sets the PG_locked flag.
the radix tree is a kind of database for the pages (by utilizing the tag field)
PG_writeback means the page is currently being written back to disk (tag[1]).
A buffer page is a page with buffer heads. every page in a page cache should be a buffer page ... isn't it?
all anon/file reads and writes are executed on RAM only. if a page gets written, the PG_dirty flag is set during page fault. if a dirty page is in an addr space, then it must be written back to disk.
the private field of a buffer page points to the buffer head of the first block.
No comments:
Post a Comment