Re: Qestion about page->_count and page reclaim

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

 



correct me if i am wrong
i presume that page pertains to a physical page
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.
every process would try to put_page as it releases the page or exits

On Feb 5, 2013 4:37 PM, "Li Haifeng" <omycle@xxxxxxxxx> wrote:
Hi, all in kernel.

The page->_count is the page frame's usage count. When page is
allocated, the page->_cout will be set 1.

After be allocated from buddy system, the page will be used by
process.  get_page and put_page/put_page_testzero will used in pairs.
is it right?

When the page is reclaimed to buddy system, the page->_count should be
0. However, Because the initialization of page->_count is 1,
get_page() and put_page() is called in pairs, I coufused how
page->_count will be 0?

Thanks.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux