From: MinChan Kim <minchan.kim@gmail.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.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 13:57:45 +0900 [thread overview]
Message-ID: <20090204045745.GC6212@barrios-desktop> (raw)
In-Reply-To: <20090204115047.ECB5.KOSAKI.MOTOHIRO@jp.fujitsu.com>
On Wed, Feb 04, 2009 at 11:51:43AM +0900, KOSAKI Motohiro wrote:
> > > Could you please teach me why this issue doesn't happend on munlockall()?
> > > your scenario seems to don't depend on exit_mmap().
> >
> >
> > Good question.
> > It's a different issue.
> > It is related to mmap_sem locking issue.
> >
> > Actually, I am about to make a patch.
> > But, I can't understand that Why try_do_mlock_page should downgrade mm_sem ?
> > Is it necessary ?
> >
> > In munlockall path, mmap_sem already is holding in write-mode of mmap_sem.
> > so, try_to_mlock_page always fail to downgrade mmap_sem.
> > It's why it looks like working well about mlocked counter.
>
> lastest linus tree don't have downgrade mmap_sem.
> (recently it was removed)
Thnaks for information.
what is 'latest linus tree' ?
You mean '29-rc3-git5'?
With '29-rc3-git5', I found,
static int try_to_mlock_page(struct page *page, struct vm_area_struct *vma)
{
int mlocked = 0;
if (down_read_trylock(&vma->vm_mm->mmap_sem)) {
if (vma->vm_flags & VM_LOCKED) {
mlock_vma_page(page);
mlocked++; /* really mlocked the page */
}
up_read(&vma->vm_mm->mmap_sem);
}
return mlocked;
}
It still try to downgrade mmap_sem.
Do I miss something ?
>
> please see it.
>
--
Kinds Regards
MinChan Kim
--
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:[~2009-02-04 4:58 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
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 [this message]
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=20090204045745.GC6212@barrios-desktop \
--to=minchan.kim@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--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