From: Wanpeng Li <liwanp@linux.vnet.ibm.com>
To: Sasha Levin <sasha.levin@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Michel Lespinasse <walken@google.com>,
Bob Liu <bob.liu@oracle.com>,
npiggin@suse.de, kosaki.motohiro@jp.fujitsu.com, riel@redhat.com,
David Rientjes <rientjes@google.com>,
Mel Gorman <mgorman@suse.de>, Minchan Kim <minchan@kernel.org>,
Vlastimil Babka <vbabka@suse.cz>, Hugh Dickins <hughd@google.com>,
Johannes Weiner <hannes@cmpxchg.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/mlock: fix BUG_ON unlocked page for nolinear VMAs
Date: Wed, 18 Dec 2013 12:12:10 +0800 [thread overview]
Message-ID: <52b120a5.a3b2440a.3acf.ffffd7c3SMTPIN_ADDED_BROKEN@mx.google.com> (raw)
In-Reply-To: <52B11765.8030005@oracle.com>
[-- Attachment #1: Type: text/plain, Size: 888 bytes --]
Hi Sasha,
On Tue, Dec 17, 2013 at 10:32:53PM -0500, Sasha Levin wrote:
>On 12/17/2013 10:23 PM, Wanpeng Li wrote:
>>- mlock_vma_page(page); /* no-op if already mlocked */
>>- if (page == check_page)
>>+ if (page != check_page && trylock_page(page)) {
>>+ mlock_vma_page(page); /* no-op if already mlocked */
>>+ unlock_page(page);
>>+ } else if (page == check_page) {
>>+ mlock_vma_page(page); /* no-op if already mlocked */
>> ret = SWAP_MLOCK;
>>+ }
>
>Previously, if page != check_page and the page was locked, we'd call mlock_vma_page()
>anyways. With this change, we don't. In fact, we'll just skip that entire block not doing
>anything.
Thanks for pointing out. ;-)
>
>If that's something that's never supposed to happen, can we add a
>
> VM_BUG_ON(page != check_page && PageLocked(page))
>
>Just to cover this new code path?
>
How about this one?
[-- Attachment #2: 0001-3.patch --]
[-- Type: text/x-diff, Size: 0 bytes --]
next prev parent reply other threads:[~2013-12-18 4:12 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
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 4:12 ` Wanpeng Li [this message]
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
2014-01-03 20:17 ` Sasha Levin
2014-01-03 20:52 ` Linus Torvalds
2014-01-03 23:36 ` Vlastimil Babka
2014-01-03 23:56 ` Andrew Morton
2014-01-04 3:03 ` Sasha Levin
2014-01-04 0:18 ` Linus Torvalds
2014-01-04 8:09 ` Vlastimil Babka
2014-01-05 0:27 ` Wanpeng Li
2014-01-06 16:47 ` Motohiro Kosaki
2014-01-06 22:01 ` KOSAKI Motohiro
2014-01-07 5:27 ` Wanpeng Li
2014-01-07 15:01 ` Vlastimil Babka
2014-01-08 1:06 ` Bob Liu
2014-01-08 2:44 ` Linus Torvalds
2014-01-10 17:48 ` Motohiro Kosaki
2014-01-13 14:03 ` Vlastimil Babka
2014-01-14 11:05 ` Vlastimil Babka
2014-01-04 3:31 ` Bob Liu
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=52b120a5.a3b2440a.3acf.ffffd7c3SMTPIN_ADDED_BROKEN@mx.google.com \
--to=liwanp@linux.vnet.ibm.com \
--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=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=vbabka@suse.cz \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox