linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: common An <xx.kernel@gmail.com>
To: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linaro-kernel@lists.linaro.org, riel@redhat.com
Subject: Re: What does the PG_swapbacked of page flags actually mean?
Date: Thu, 21 Feb 2013 10:25:20 +0800	[thread overview]
Message-ID: <CANZA+xgjxezRuu4N2JpXbXjpKCz7825x_ZmdOe-DuxtMzGix-A@mail.gmail.com> (raw)
In-Reply-To: <CANZA+xgRWQe2fm8Gok4SxRXEeRU5CztijG4HKNeTDFQfSgHPPw@mail.gmail.com>

On Wed, Feb 20, 2013 at 6:43 PM, common An <xx.kernel@gmail.com> wrote:
> PG_swapbacked is a bit for page->flags.
>
> In kernel code, its comment is "page is backed by RAM/swap". But I couldn't
> understand it.
> 1. Does the RAM mean DRAM? How page is backed by RAM?
> 2. When the page is page-out to swap file, the bit PG_swapbacked will be set
> to demonstrate this page is backed by swap. Is it right?
> 3. In general, when will call SetPageSwapBacked() to set the bit?

>From : http://www.gossamer-threads.com/lists/linux/kernel/840692#840692

Every anonymous, tmpfs or shared memory segment page is potentially
swap backed. That is the whole point of the PG_swapbacked flag.

A page from a filesystem like ext3 or NFS cannot suddenly turn into
a swap backed page. This page "nature" is not changed during the
lifetime of a page.

But, I am still a little confusing.

>
> Could anybody kindly explain for me?
>
> Thanks very much.

--
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>

      parent reply	other threads:[~2013-02-21  2:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-20 10:43 common An
2013-02-20 10:44 ` common An
2013-02-21  2:25 ` common An [this message]

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=CANZA+xgjxezRuu4N2JpXbXjpKCz7825x_ZmdOe-DuxtMzGix-A@mail.gmail.com \
    --to=xx.kernel@gmail.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=riel@redhat.com \
    /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