Files
linux/arch/x86/include/asm
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
..
2014-08-26 13:45:50 -04:00
2009-01-29 14:16:51 +01:00
2008-10-22 22:55:23 -07:00
2012-03-28 18:11:12 +01:00
2014-08-26 13:45:49 -04:00
2011-05-02 17:24:48 +02:00
2008-10-22 22:55:23 -07:00
2014-10-03 22:15:56 +01:00
2014-05-02 11:34:17 -07:00
2012-03-28 18:11:12 +01:00
2010-02-16 21:22:26 -08:00
2014-03-04 21:47:51 +01:00
2011-04-18 09:26:48 -07:00
2012-03-20 21:48:30 +08:00
2014-05-08 08:15:34 +02:00
2013-08-05 06:35:33 -07:00
2013-02-03 18:16:27 -05:00
2009-08-27 00:35:56 +02:00
2010-10-26 16:52:08 -07:00
2012-06-25 13:48:30 +02:00
2014-09-22 13:35:52 +02:00
2009-06-13 15:37:30 +02:00
2011-07-22 14:39:50 +09:30
2013-04-22 15:45:03 +09:30
2010-06-09 11:12:36 +02:00
2008-10-22 22:55:23 -07:00
2014-02-27 08:07:39 -08:00
2014-11-18 00:58:54 +01:00
2008-10-22 22:55:23 -07:00
2014-09-01 10:15:31 +02:00
2014-10-28 10:47:56 +01:00
2011-03-15 15:34:15 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:20 -07:00
2008-10-22 22:55:23 -07:00
2012-02-20 12:52:05 -08:00
2014-06-06 16:08:11 -07:00
2009-06-15 12:40:02 +02:00
2014-06-04 16:53:57 -07:00
2014-04-18 14:20:46 +02:00
2008-10-22 22:55:23 -07:00
2014-11-23 13:56:19 -08:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2008-10-22 22:55:23 -07:00
2012-03-28 18:11:12 +01:00
2008-10-22 22:55:20 -07:00