linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Li Haifeng <omycle@gmail.com>
To: linux-mm@kvack.org
Subject: Qestion about page->_count and page reclaim
Date: Mon, 4 Feb 2013 18:34:54 +0800	[thread overview]
Message-ID: <CAFNq8R5w7qwJ2j9VQXfw_ALZKWu_ZYaMkbd3owL5N9VOTeTVAQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 528 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 1389 bytes --]

                 reply	other threads:[~2013-02-04 10:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFNq8R5w7qwJ2j9VQXfw_ALZKWu_ZYaMkbd3owL5N9VOTeTVAQ@mail.gmail.com \
    --to=omycle@gmail.com \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox