]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: directly use __mlock_vma_pages_range() in find_extend_vma()
authorMichel Lespinasse <walken@google.com>
Thu, 7 Feb 2013 01:26:19 +0000 (12:26 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 18 Feb 2013 05:46:21 +0000 (16:46 +1100)
commit9a17d55ca4d155c0446312c2471ca17f779ccfc7
tree7dd2fe4f89327fb2b15a55bebbb8681d155d8562
parent098f21f8fbf01a8e7cf47d9b2300df21f3110669
mm: directly use __mlock_vma_pages_range() in find_extend_vma()

In find_extend_vma(), we don't need mlock_vma_pages_range() to verify the
vma type - we know we're working with a stack. So, we can call directly
into __mlock_vma_pages_range(), and remove the last make_pages_present()
call site.

Note that we don't use mm_populate() here, so we can't release the mmap_sem
while allocating new stack pages. This is deemed acceptable, because the
stack vmas grow by a bounded number of pages at a time, and these are
anon pages so we don't have to read from disk to populate them.

Signed-off-by: Michel Lespinasse <walken@google.com>
Acked-by: Rik van Riel <riel@redhat.com>
Tested-by: Andy Lutomirski <luto@amacapital.net>
Cc: Greg Ungerer <gregungerer@westnet.com.au>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mm.h
mm/internal.h
mm/memory.c
mm/mlock.c
mm/mmap.c