linux/arch/arm64
Kirill A. Shutemov c164e038ee mm: fix huge zero page accounting in smaps report
As a small zero page, huge zero page should not be accounted in smaps
report as normal page.

For small pages we rely on vm_normal_page() to filter out zero page, but
vm_normal_page() is not designed to handle pmds.  We only get here due
hackish cast pmd to pte in smaps_pte_range() -- pte and pmd format is not
necessary compatible on each and every architecture.

Let's add separate codepath to handle pmds.  follow_trans_huge_pmd() will
detect huge zero page for us.

We would need pmd_dirty() helper to do this properly.  The patch adds it
to THP-enabled architectures which don't yet have one.

[akpm@linux-foundation.org: use do_div to fix 32-bit build]
Signed-off-by: "Kirill A. Shutemov" <kirill@shutemov.name>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Tested-by: Fengwei Yin <yfw.kernel@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-12-10 17:41:08 -08:00
..
boot ARM64: SoC changes for 3.19 2014-12-09 17:17:47 -08:00
configs arm64: defconfig: update defconfig for 3.18 2014-11-05 17:07:58 +00:00
crypto arm64/crypto: use crypto instructions to generate AES key schedule 2014-11-06 17:25:28 +00:00
include mm: fix huge zero page accounting in smaps report 2014-12-10 17:41:08 -08:00
kernel arm64 updates for 3.19 2014-12-09 13:12:47 -08:00
kvm arm64 updates for 3.19 2014-12-09 13:12:47 -08:00
lib arm64: __clear_user: handle exceptions on strb 2014-11-13 15:21:26 +00:00
mm arm64: remove the unnecessary arm64_swiotlb_init() 2014-12-05 12:19:52 +00:00
net arm64: bpf: lift restriction on last instruction 2014-12-03 18:04:09 +00:00
xen arm: xen: implement multicall hypercall support. 2014-04-24 13:09:46 +01:00
Kconfig asm-generic: asm/io.h rewrite 2014-12-09 17:25:00 -08:00
Kconfig.debug arm64: add support to dump the kernel page tables 2014-11-26 17:19:18 +00:00
Makefile dts, arm/arm64: Remove dtbs build rules in sub-makes 2014-10-21 18:06:58 +02:00