Hugh Dickins 6e919717c8 mm: m(un)lock avoid ZERO_PAGE
I'm still reluctant to clutter __get_user_pages() with another flag, just
to avoid touching ZERO_PAGE count in mlock(); though we can add that later
if it shows up as an issue in practice.

But when mlocking, we can test page->mapping slightly earlier, to avoid
the potentially bouncy rescheduling of lock_page on ZERO_PAGE - mlock
didn't lock_page in olden ZERO_PAGE days, so we might have regressed.

And when munlocking, it turns out that FOLL_DUMP coincidentally does
what's needed to avoid all updates to ZERO_PAGE, so use that here also.
Plus add comment suggested by KAMEZAWA Hiroyuki.

Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Cc: Rik van Riel <riel@redhat.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Nick Piggin <npiggin@suse.de>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Cc: Minchan Kim <minchan.kim@gmail.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-22 07:17:40 -07:00
..
2009-04-01 08:59:13 -07:00
2009-09-22 07:17:27 -07:00
2009-09-22 07:17:40 -07:00
2009-06-16 19:47:28 -07:00
2009-09-22 07:17:40 -07:00
2009-09-22 07:17:33 -07:00
2009-09-22 07:17:33 -07:00
2009-09-22 07:17:31 -07:00
2009-09-22 07:17:31 -07:00
2009-09-22 07:17:40 -07:00
2009-09-22 07:17:35 -07:00
2009-09-22 07:17:40 -07:00
2009-09-22 07:17:33 -07:00
2009-09-22 07:17:33 -07:00
2009-09-22 07:17:40 -07:00
2008-06-12 18:05:41 -07:00
2007-10-20 01:27:18 +02:00
2009-09-22 07:17:31 -07:00
2009-09-22 07:17:35 -07:00
2009-09-22 07:17:33 -07:00
2009-06-23 12:50:05 -07:00
2009-09-22 07:17:29 -07:00