* some ksm questions
@ 2012-10-25 1:55 Ni zhan Chen
0 siblings, 0 replies; 2+ messages in thread
From: Ni zhan Chen @ 2012-10-25 1:55 UTC (permalink / raw)
To: Linux Memory Management List
Cc: Izik Eidus, Andrea Arcangeli, Petr Holasek, Chris Wright,
Rik van Riel, Hugh Dickins
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_itemi 1/4 ?
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,
a??a??a??a??a??a??a??a??a??a??a??a??a??a??a??a??a??a??a??a??
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@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
* some ksm questions
@ 2012-10-25 2:00 Ni zhan Chen
0 siblings, 0 replies; 2+ messages in thread
From: Ni zhan Chen @ 2012-10-25 2:00 UTC (permalink / raw)
To: Linux Memory Management List
Cc: Izik Eidus, Andrea Arcangeli, Petr Holasek, Rik van Riel,
Hugh Dickins, Chris Wright
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_itemi 1/4 ?
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,
a??a??a??a??a??a??a??a??a??a??a??a??a??a??a??a??a??a??a??a??
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@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-25 2:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-25 1:55 some ksm questions Ni zhan Chen
2012-10-25 2:00 Ni zhan Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox