From: Vlastimil Babka <vbabka@suse.cz>
To: Linus Torvalds <torvalds@linux-foundation.org>,
Sasha Levin <sasha.levin@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Wanpeng Li <liwanp@linux.vnet.ibm.com>,
Michel Lespinasse <walken@google.com>,
Bob Liu <bob.liu@oracle.com>, Nick Piggin <npiggin@suse.de>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Rik van Riel <riel@redhat.com>,
David Rientjes <rientjes@google.com>,
Mel Gorman <mgorman@suse.de>, Minchan Kim <minchan@kernel.org>,
Hugh Dickins <hughd@google.com>,
Johannes Weiner <hannes@cmpxchg.org>,
linux-mm <linux-mm@kvack.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm/mlock: fix BUG_ON unlocked page for nolinear VMAs
Date: Sat, 04 Jan 2014 00:36:18 +0100 [thread overview]
Message-ID: <52C74972.6050909@suse.cz> (raw)
In-Reply-To: <CA+55aFzDcFyyXwUUu5bLP3fsiuzxU7VPivpTPHgp8smvdTeESg@mail.gmail.com>
On 01/03/2014 09:52 PM, Linus Torvalds wrote:
> On Fri, Jan 3, 2014 at 12:17 PM, Sasha Levin <sasha.levin@oracle.com> wrote:
>>
>> Ping? This BUG() is triggerable in 3.13-rc6 right now.
>
> So Andrew suggested just removing the BUG_ON(), but it's been there
> for a *long* time.
Yes, Andrew also merged this patch for that:
http://ozlabs.org/~akpm/mmots/broken-out/mm-remove-bug_on-from-mlock_vma_page.patch
But there wasn't enough confidence in the fix to sent it to you yet, I guess.
The related thread: http://www.spinics.net/lists/linux-mm/msg66972.html
> And I detest the patch that was sent out that said "Should I check?"
>
> Maybe we should just remove that mlock_vma_page() thing instead in
You mean that it it's already undeterministic because it can be already skipped when
mmap_sem can't be acquired for read? I think the assumption for this case is that mmap_sem
is already held for write which means VM_LOCKED is unset anyway (per comments at
try_to_unmap_file(), which calls try_to_unmap_cluster()). I'm however not sure how it is
protected from somebody else holding the semaphore...
> try_to_unmap_cluster()? Or maybe actually lock the page around calling
> it?
check_page is already locked, see try_to_munlock() which calls try_to_unmap_file(). So
this might smell of potential deadlock?
I'm for going with the removal of BUG_ON. The TestSetPageMlocked should provide enough
race protection.
> Linus
>
> --
> 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>
>
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: Vlastimil Babka <vbabka@suse.cz>
To: Linus Torvalds <torvalds@linux-foundation.org>,
Sasha Levin <sasha.levin@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Wanpeng Li <liwanp@linux.vnet.ibm.com>,
Michel Lespinasse <walken@google.com>,
Bob Liu <bob.liu@oracle.com>, Nick Piggin <npiggin@suse.de>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Rik van Riel <riel@redhat.com>,
David Rientjes <rientjes@google.com>,
Mel Gorman <mgorman@suse.de>, Minchan Kim <minchan@kernel.org>,
Hugh Dickins <hughd@google.com>,
Johannes Weiner <hannes@cmpxchg.org>,
linux-mm <linux-mm@kvack.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm/mlock: fix BUG_ON unlocked page for nolinear VMAs
Date: Sat, 04 Jan 2014 00:36:18 +0100 [thread overview]
Message-ID: <52C74972.6050909@suse.cz> (raw)
In-Reply-To: <CA+55aFzDcFyyXwUUu5bLP3fsiuzxU7VPivpTPHgp8smvdTeESg@mail.gmail.com>
On 01/03/2014 09:52 PM, Linus Torvalds wrote:
> On Fri, Jan 3, 2014 at 12:17 PM, Sasha Levin <sasha.levin@oracle.com> wrote:
>>
>> Ping? This BUG() is triggerable in 3.13-rc6 right now.
>
> So Andrew suggested just removing the BUG_ON(), but it's been there
> for a *long* time.
Yes, Andrew also merged this patch for that:
http://ozlabs.org/~akpm/mmots/broken-out/mm-remove-bug_on-from-mlock_vma_page.patch
But there wasn't enough confidence in the fix to sent it to you yet, I guess.
The related thread: http://www.spinics.net/lists/linux-mm/msg66972.html
> And I detest the patch that was sent out that said "Should I check?"
>
> Maybe we should just remove that mlock_vma_page() thing instead in
You mean that it it's already undeterministic because it can be already skipped when
mmap_sem can't be acquired for read? I think the assumption for this case is that mmap_sem
is already held for write which means VM_LOCKED is unset anyway (per comments at
try_to_unmap_file(), which calls try_to_unmap_cluster()). I'm however not sure how it is
protected from somebody else holding the semaphore...
> try_to_unmap_cluster()? Or maybe actually lock the page around calling
> it?
check_page is already locked, see try_to_munlock() which calls try_to_unmap_file(). So
this might smell of potential deadlock?
I'm for going with the removal of BUG_ON. The TestSetPageMlocked should provide enough
race protection.
> Linus
>
> --
> 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:[~2014-01-03 23:36 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-17 8:05 [PATCH] mm/mlock: fix BUG_ON unlocked page for nolinear VMAs Wanpeng Li
2013-12-17 8:05 ` Wanpeng Li
2013-12-18 3:14 ` Wanpeng Li
2013-12-18 3:16 ` Wanpeng Li
2013-12-18 3:23 ` Wanpeng Li
[not found] ` <20131218032329.GA6044@hacker.(null)>
2013-12-18 3:32 ` Sasha Levin
2013-12-18 3:32 ` Sasha Levin
2013-12-18 4:12 ` Wanpeng Li
2013-12-18 9:11 ` Vlastimil Babka
2013-12-18 9:11 ` Vlastimil Babka
2013-12-18 9:23 ` Wanpeng Li
[not found] ` <52b1699f.87293c0a.75d1.34d3SMTPIN_ADDED_BROKEN@mx.google.com>
2013-12-18 21:43 ` Andrew Morton
2013-12-18 21:43 ` Andrew Morton
2014-01-03 20:17 ` Sasha Levin
2014-01-03 20:17 ` Sasha Levin
2014-01-03 20:52 ` Linus Torvalds
2014-01-03 20:52 ` Linus Torvalds
2014-01-03 23:36 ` Vlastimil Babka [this message]
2014-01-03 23:36 ` Vlastimil Babka
2014-01-03 23:56 ` Andrew Morton
2014-01-03 23:56 ` Andrew Morton
2014-01-04 3:03 ` Sasha Levin
2014-01-04 3:03 ` Sasha Levin
2014-01-04 0:18 ` Linus Torvalds
2014-01-04 0:18 ` Linus Torvalds
2014-01-04 8:09 ` Vlastimil Babka
2014-01-04 8:09 ` Vlastimil Babka
2014-01-05 0:27 ` Wanpeng Li
2014-01-06 16:47 ` Motohiro Kosaki
2014-01-06 16:47 ` Motohiro Kosaki
2014-01-06 22:01 ` KOSAKI Motohiro
2014-01-06 22:01 ` KOSAKI Motohiro
2014-01-07 5:27 ` Wanpeng Li
2014-01-07 15:01 ` Vlastimil Babka
2014-01-07 15:01 ` Vlastimil Babka
2014-01-08 1:06 ` Bob Liu
2014-01-08 1:06 ` Bob Liu
2014-01-08 2:44 ` Linus Torvalds
2014-01-08 2:44 ` Linus Torvalds
2014-01-10 17:48 ` Motohiro Kosaki
2014-01-10 17:48 ` Motohiro Kosaki
2014-01-13 14:03 ` Vlastimil Babka
2014-01-13 14:03 ` Vlastimil Babka
2014-01-14 11:05 ` Vlastimil Babka
2014-01-14 11:05 ` Vlastimil Babka
2014-01-04 3:31 ` Bob Liu
2014-01-04 3:31 ` Bob Liu
2013-12-18 8:54 ` Vlastimil Babka
2013-12-18 8:54 ` Vlastimil Babka
2013-12-18 9:01 ` Wanpeng Li
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=52C74972.6050909@suse.cz \
--to=vbabka@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=bob.liu@oracle.com \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=liwanp@linux.vnet.ibm.com \
--cc=mgorman@suse.de \
--cc=minchan@kernel.org \
--cc=npiggin@suse.de \
--cc=riel@redhat.com \
--cc=rientjes@google.com \
--cc=sasha.levin@oracle.com \
--cc=torvalds@linux-foundation.org \
--cc=walken@google.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 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.