KOSAKI Motohiro 6c6d528043 pagewalk: don't look up vma if walk->hugetlb_entry is unused
Currently, walk_page_range() calls find_vma() every page table for walk
iteration.  but it's completely unnecessary if walk->hugetlb_entry is
unused.  And we don't have to assume find_vma() is a lightweight
operation.  So this patch checks the walk->hugetlb_entry and avoids the
find_vma() call if possible.

This patch also makes some cleanups.  1) remove ugly uninitialized_var()
and 2) #ifdef in function body.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Hiroyuki Kamezawa <kamezawa.hiroyuki@gmail.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-07-25 20:57:08 -07:00
..
2009-04-01 08:59:13 -07:00
2011-07-20 20:47:46 -04:00
2011-05-26 09:20:31 -07:00
2011-03-31 11:26:23 -03:00
2011-07-20 20:47:46 -04:00
2009-09-22 07:17:35 -07:00
2011-05-26 09:20:31 -07:00
2010-03-24 16:31:21 -07:00
2011-01-13 17:32:46 -08:00
2011-05-25 08:39:18 -07:00
2010-05-21 18:31:21 -04:00
2011-06-22 19:26:27 +02:00
2011-03-10 08:52:27 +01:00
2011-05-20 12:50:29 -07:00
2011-06-27 18:00:12 -07:00
2011-07-25 20:57:07 -07:00
2011-03-10 08:52:07 +01:00
2011-07-20 20:47:46 -04:00
2011-05-25 08:39:05 -07:00