<p>correct me if i am wrong<br>
i presume that page pertains to a physical page<br>
when the page is allocated, _count would be 1. every process that wants to obtain the page might solicit it from page cache first, if exsists, then _count would increment by one.<br>
every process would try to put_page as it releases the page or exits</p>
<div class="gmail_quote">On Feb 5, 2013 4:37 PM, "Li Haifeng" <<a href="mailto:omycle@gmail.com">omycle@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi, all in kernel.<br>
<br>
The page->_count is the page frame's usage count. When page is<br>
allocated, the page->_cout will be set 1.<br>
<br>
After be allocated from buddy system, the page will be used by<br>
process. get_page and put_page/put_page_testzero will used in pairs.<br>
is it right?<br>
<br>
When the page is reclaimed to buddy system, the page->_count should be<br>
0. However, Because the initialization of page->_count is 1,<br>
get_page() and put_page() is called in pairs, I coufused how<br>
page->_count will be 0?<br>
<br>
Thanks.<br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</blockquote></div>