linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: MinChan Kim <minchan.kim@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux mm <linux-mm@kvack.org>,
	linux kernel <linux-kernel@vger.kernel.org>,
	Nick Piggin <npiggin@suse.de>, Rik van Riel <riel@redhat.com>
Subject: Re: [PATCH v2] fix mlocked page counter mistmatch
Date: Wed, 4 Feb 2009 01:44:52 +0900	[thread overview]
Message-ID: <2f11576a0902030844l64c25496sa5f2892bbb04e47c@mail.gmail.com> (raw)
In-Reply-To: <20090203042405.GB16179@barrios-desktop>

Hi MinChan,

I'm confusing now.
Can you teach me?

> When I tested following program, I found that mlocked counter
> is strange.
> It couldn't free some mlocked pages of test program.
> It is caused that try_to_unmap_file don't check real
> page mapping in vmas.

What meanining is "real" page mapping?


> That's because goal of address_space for file is to find all processes
> into which the file's specific interval is mapped.
> What I mean is that it's not related page but file's interval.

hmmm. No.
I ran your reproduce program.

two vma pointing the same page cause this leaking.

iow, any library have .text and .data segment. then the tail of .text
and the head of .data vma point the same page.
its page was leaked.


> Even if the page isn't really mapping at the vma, it returns
> SWAP_MLOCK since the vma have VM_LOCKED, then calls
> try_to_mlock_page. After all, mlocked counter is increased again.
>
> COWed anon page in a file-backed vma could be a such case.
> This patch resolves it.

What meaning is "anon page in a file-backed"?
As far as I know, if cow happend on private mapping page, new page is
treated truth anon.


So, I don't reach to your conclusion yet. please teach me.

--
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:[~2009-02-03 16:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-03  4:24 MinChan Kim
2009-02-03 16:44 ` KOSAKI Motohiro [this message]
2009-02-03 23:44   ` MinChan Kim
2009-02-04  2:12     ` KOSAKI Motohiro
2009-02-04  2:44       ` MinChan Kim
2009-02-04  2:51         ` KOSAKI Motohiro
2009-02-04  4:57           ` MinChan Kim
2009-02-04 10:28             ` KOSAKI Motohiro
2009-02-04 14:07               ` Lee Schermerhorn
2009-02-04 23:38                 ` MinChan Kim
2009-02-04 23:35               ` MinChan Kim
2009-02-05  2:17                 ` KOSAKI Motohiro
2009-02-05  2:32                   ` MinChan Kim

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=2f11576a0902030844l64c25496sa5f2892bbb04e47c@mail.gmail.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan.kim@gmail.com \
    --cc=npiggin@suse.de \
    --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