All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bourne <bourne@ToughGuy.net>
To: linux-kernel@vger.kernel.org
Subject: 2.4.19 ( try_to_swap_out) does not set page->mapping to NULL
Date: Fri, 13 Dec 2002 08:59:26 +0530	[thread overview]
Message-ID: <3DF95416.7010107@ToughGuy.net> (raw)

Hi all, A small piece of code in mm/vmscan.c kept me confused. Please 
could some one explain this ?

File: mm/vmscan.c , try_to_swap_out()

....SNIP....
drop_pte: mm->rss--
                UnlockPage(page);
                ---SNIP--
                page_cache_release(page);
                return freeable;
                ----SNIP----
if(page->mapping)
    goto drop_pte;

What i can get is if page->mapping is NOT NULL , then do a 
page_cache_release(). This boils down to __free_pages_ok(). Here the 
code snippet is if(page->mapping) BUG();

So if try_to_swap_out wants to drop a page which can be brought in 
always ( i.e , not dirty ), then what is the harm in setting it to NULL ?

TIA

Bourne


                 reply	other threads:[~2002-12-12 15:17 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=3DF95416.7010107@ToughGuy.net \
    --to=bourne@toughguy.net \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.