From: "Chris Friesen" <cfriesen@nortel.com>
To: Minchan Kim <minchan.kim@gmail.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Rik van Riel <riel@redhat.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-mm@kvack.org, Balbir Singh <balbir@linux.vnet.ibm.com>
Subject: Re: tracking memory usage/leak in "inactive" field in /proc/meminfo?
Date: Mon, 15 Feb 2010 09:50:09 -0600 [thread overview]
Message-ID: <4B796D31.7030006@nortel.com> (raw)
In-Reply-To: <4B7504D2.1040903@nortel.com>
On 02/12/2010 01:35 AM, Chris Friesen wrote:
> After being up about 2.5 hrs, there were 4265 pages in the LRU that
> weren't part of file or anon. These broke down into two separate call
> chains (there were actually three separate offsets within
> compat_do_execve, but the rest was identical):
I added some further instrumentation to track timestamps of when they
were added to the LRU, and when they were added/removed from
NR_ANON_PAGES. Based on this, it appears that the pages are being
removed from NR_ANON_PAGES but are still left in the LRU.
It looks like I have three general paths leading to the removal of the
pages from NR_ANON_PAGES:
del from anon list backtrace:
[<ffffffff8029c951>] kmemleak_clear_anon+0x7f/0xbe
[<ffffffff802864c7>] page_remove_rmap+0x45/0x146
[<ffffffff8027dc7e>] unmap_vmas+0x41c/0x948
[<ffffffff80282405>] exit_mmap+0x7b/0x108
[<ffffffff8022f441>] mmput+0x33/0x110
[<ffffffff80233b05>] exit_mm+0x103/0x130
[<ffffffff802355b5>] do_exit+0x17b/0x91f
[<ffffffff80235d95>] do_group_exit+0x3c/0x9c
[<ffffffff80235e07>] sys_exit+0x0/0x12
[<ffffffff8021ddb5>] ia32_syscall_done+0x0/0xa
[<ffffffffffffffff>] 0xffffffffffffffff
del from anon list backtrace:
[<ffffffff8029c951>] kmemleak_clear_anon+0x7f/0xbe
[<ffffffff802864c7>] page_remove_rmap+0x45/0x146
[<ffffffff8027dc7e>] unmap_vmas+0x41c/0x948
[<ffffffff80282405>] exit_mmap+0x7b/0x108
[<ffffffff8022f441>] mmput+0x33/0x110
[<ffffffff802a3a4e>] flush_old_exec+0x1d6/0x86a
[<ffffffff802dc007>] load_elf_binary+0x366/0x1d1f
[<ffffffff802a35c6>] search_binary_handler+0xa4/0x25a
[<ffffffff802d36dc>] compat_do_execve+0x2ab/0x2fd
[<ffffffff8021e435>] sys32_execve+0x44/0x62
[<ffffffff8021df25>] ia32_ptregs_common+0x25/0x50
[<ffffffffffffffff>] 0xffffffffffffffff
del from anon list backtrace:
[<ffffffff8029c951>] kmemleak_clear_anon+0x7f/0xbe
[<ffffffff802864c7>] page_remove_rmap+0x45/0x146
[<ffffffff8027d1d7>] do_wp_page+0x37a/0x6f6
[<ffffffff8027ef21>] handle_mm_fault+0x62b/0x77c
[<ffffffff80632787>] do_page_fault+0x3c7/0xba0
[<ffffffff8062fda9>] error_exit+0x0/0x51
Looking at the code, it looks like page_remove_rmap() clears the
Anonpage flag and removes it from NR_ANON_PAGES, and the caller is
responsible for removing it from the LRU. Is that right?
I'll keep digging in the code, but does anyone know where the removal
from the LRU is supposed to happen in the above code paths?
Thanks,
Chris
--
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>
next prev parent reply other threads:[~2010-02-15 15:56 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-09 16:51 Chris Friesen
2010-02-10 0:32 ` KOSAKI Motohiro
2010-02-10 3:50 ` Balbir Singh
2010-02-10 4:09 ` KOSAKI Motohiro
2010-02-10 17:05 ` Chris Friesen
2010-02-11 0:45 ` Minchan Kim
2010-02-11 18:54 ` Chris Friesen
2010-02-11 19:04 ` Rik van Riel
2010-02-12 2:38 ` Minchan Kim
2010-02-12 7:35 ` Chris Friesen
2010-02-12 8:04 ` KOSAKI Motohiro
2010-02-15 15:50 ` Chris Friesen [this message]
2010-02-15 17:00 ` Rik van Riel
2010-02-16 16:52 ` Chris Friesen
2010-02-16 17:12 ` Rik van Riel
2010-02-16 21:26 ` Chris Friesen
2010-02-16 22:22 ` Rik van Riel
2010-02-18 15:39 ` tracking memory usage/leak in "inactive" field in /proc/meminfo? -- solved Chris Friesen
2010-02-12 17:50 ` tracking memory usage/leak in "inactive" field in /proc/meminfo? Catalin Marinas
2010-02-13 6:29 ` Balbir Singh
2010-02-15 16:02 ` Chris Friesen
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=4B796D31.7030006@nortel.com \
--to=cfriesen@nortel.com \
--cc=balbir@linux.vnet.ibm.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan.kim@gmail.com \
--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