smaps: teach smaps_pte_range() about THP pmds
smaps: teach smaps_pte_range() about THP pmds

This adds code to explicitly detect and handle pmd_trans_huge() pmds.  It
then passes HPAGE_SIZE units in to the smap_pte_entry() function instead
of PAGE_SIZE.

This means that using /proc/$pid/smaps now will no longer cause THPs to be
broken down in to small pages.

Signed-off-by: Dave Hansen <bfcdf3e6ca6cef45543bfbb57509c92aec9a39fb@linux.vnet.ibm.com>
Reviewed-by: Eric B Munson <51d9dbd4ea8b7943d3deb397de3f8cbc23693656@mgebm.net>
Tested-by: Eric B Munson <51d9dbd4ea8b7943d3deb397de3f8cbc23693656@mgebm.net>
Acked-by: Andrea Arcangeli <6cb163d975a8c4c46420677e0054b55c39bdb339@redhat.com>
Acked-by: David Rientjes <d8cd2994e15bc61ddb2b113030bda55eebc3a0fe@google.com>
Cc: Mel Gorman <2f629c4d93e35c3d371f0463b040c6ef04a5c1e5@csn.ul.ie>
Cc: Michael J Wolf <a4039193fa4a60b34ea069de4f7100c33b065fa9@us.ibm.com>
Cc: Andrea Arcangeli <6cb163d975a8c4c46420677e0054b55c39bdb339@redhat.com>
Cc: Johannes Weiner <331be22c6b63ca3e0a03d408c2d906b1b02cd5f2@cmpxchg.org>
Cc: Matt Mackall <4121265491a72225438dfd0e91a228f361407ae2@selenic.com>
Cc: Jeremy Fitzhardinge <b3f594e10a9edcf5413cf1190121d45078c62290@goop.org>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>

KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas