All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ethan Solomita <solo@google.com>
To: linux-mm@kvack.org, Christoph Lameter <clameter@sgi.com>
Subject: meminfo returns inaccurate NR_FILE_PAGES
Date: Tue, 17 Apr 2007 16:12:06 -0700	[thread overview]
Message-ID: <46255446.6060204@google.com> (raw)

Node 2 MemTotal:        64640 kB
Node 2 MemFree:         59816 kB
Node 2 MemUsed:          4824 kB
Node 2 Active:              0 kB
Node 2 Inactive:            8 kB
Node 2 HighTotal:           0 kB
Node 2 HighFree:            0 kB
Node 2 LowTotal:        64640 kB
Node 2 LowFree:         59816 kB
Node 2 Dirty:               0 kB
Node 2 Writeback:           0 kB
Node 2 FilePages:       62040 kB
Node 2 Mapped:              8 kB
Node 2 AnonPages:           0 kB
Node 2 PageTables:          0 kB
Node 2 NFS_Unstable:        0 kB
Node 2 Bounce:              0 kB
Node 2 Slab:             4696 kB
Node 2 HugePages_Total:     0
Node 2 HugePages_Free:      0

   
    Note that File Pages is 62040kB when MemUsed is only 4824kB. We do 
__(dec|inc)_zone_page_state(page, NR_FILE_PAGES) whenever doing a 
radix_tree_(delete|insert) from/to mapping->page_tree. Except we missed one:

migrate.c:migrate_page_move_mapping()

    Here we replace the page* in the radix tree, but we don't dec on the 
old page and add on the new. Bug fix -- add:

__dec_zone_page_state(page, NR_FILE_PAGES)
__inc_zone_page_state(newpage, NR_FILE_PAGES)

    into migrate_page_move_mapping() immediately after writing to 
radix_pointer.

    If I get agreement that this is a bug I'll write up a patch.
    -- Ethan

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

             reply	other threads:[~2007-04-17 23:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-17 23:12 Ethan Solomita [this message]
2007-04-17 23:56 ` meminfo returns inaccurate NR_FILE_PAGES Christoph Lameter
2007-04-18  4:06   ` Ethan Solomita
2007-04-18  5:12     ` Christoph Lameter
2007-04-18  5:31       ` Ethan Solomita
2007-04-18  5:39         ` Christoph Lameter
2007-04-18  6:13           ` Ethan Solomita
2007-04-18 19:36             ` Christoph Lameter
2007-04-18 19:39               ` Ethan Solomita
2007-04-18 21:02                 ` Christoph Lameter
2007-04-18  4:49   ` Ethan Solomita

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=46255446.6060204@google.com \
    --to=solo@google.com \
    --cc=clameter@sgi.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 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.