some ksm questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I have some detail questions about ksm. Thanks in adance. :-)

1) Why judge if(page->mapping != expected_mapping) in function get_ksm_page
called twice? And it also call put_page(page) in the second time, when this
put_page associated get_page(page) is called?

2)
in function scan_get_next_rmap_item,
if (PageAnon(*page)) ||
page_trans_compound_anon(*page)) {
flush_anon_page(vma, *page, ksm_scan.address);
flush_dcache_page(*page);
rmap_item = get_next_rmap_item(slot,
。。。。。。。。。。。。。。。。。。。。
why call flush_dcache_page here? in kernel doc Documentation/cachetlb.txt, it said that "Any time the kernel writes to a page cache page, _OR_ the kernel is about to read from a page cache page and user space shared/writable mappings of this page potentially exist, this routine is called", it is used for flush page
cache related cpu cache, but ksmd only scan anonymous page.

3) in function remove_rmap_item_from_tree, how to understand formula age =
(unsigned char) (ksm_scan.seqr - rmap_item->address); why need aging?

4) in function page_volatile_show, how to understand ksm_pages_volatile =
ksm_rmap_items - ksm_pages_shared - ksm_pages_sharing - ksm_pages_unshared; I mean that how this formula can figure out "how many pages changing too fast to
be placed in a tree"?

Regards,
Chen

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]