From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx121.postini.com [74.125.245.121]) by kanga.kvack.org (Postfix) with SMTP id 3847E6B0005 for ; Mon, 4 Feb 2013 05:34:56 -0500 (EST) Received: by mail-wg0-f45.google.com with SMTP id dq12so4463198wgb.0 for ; Mon, 04 Feb 2013 02:34:54 -0800 (PST) MIME-Version: 1.0 Date: Mon, 4 Feb 2013 18:34:54 +0800 Message-ID: Subject: Qestion about page->_count and page reclaim From: Li Haifeng Content-Type: multipart/alternative; boundary=089e0122f170d027e704d4e3a4e9 Sender: owner-linux-mm@kvack.org List-ID: To: linux-mm@kvack.org --089e0122f170d027e704d4e3a4e9 Content-Type: text/plain; charset=ISO-8859-1 Hi, all in kernel. The page->_count is the page frame's usage count. When page is allocated, the page will be refcounted, and 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. --089e0122f170d027e704d4e3a4e9 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi, all in kernel.

The page->_count is the page frame's usage count.
When page is= allocated, the page will be refcounted, and page->_cout will be set 1.<= /div>

After be allocated from buddy system, the page will be used by = process. =A0get_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->_coun= t will be 0? =A0=A0

Thanks.
--089e0122f170d027e704d4e3a4e9-- -- 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: email@kvack.org