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
..
2013-12-11 16:21:00 +00:00
2014-11-25 15:56:21 +00:00
2014-12-04 10:28:24 +00:00
2014-12-04 23:30:26 -08:00
2012-09-17 10:24:44 +01:00
2014-05-12 16:43:28 +01:00
2014-10-03 06:06:23 +02:00
2014-06-06 10:43:28 -07:00
2014-04-18 11:40:33 +02:00
2014-12-03 10:19:35 +00:00
2014-12-01 13:31:12 +00:00
2014-09-08 14:39:18 +01:00
2014-11-20 12:05:18 +00:00
2014-11-28 10:24:59 +00:00
2012-09-17 13:42:21 +01:00
2014-10-03 14:51:02 +01:00
2014-11-25 15:56:44 +00:00
2014-12-04 09:57:41 +00:00
2014-09-12 10:48:55 +01:00
2012-09-17 13:41:59 +01:00
2014-11-25 15:56:21 +00:00
2014-09-25 15:35:41 +01:00
2013-06-11 18:15:55 +01:00
2014-09-22 11:48:31 +01:00
2014-11-05 09:03:25 +01:00
2014-07-07 20:29:47 +01:00
2014-10-24 15:47:49 +01:00
2014-05-09 15:47:47 +01:00
2013-03-26 16:02:23 +00:00
2012-09-17 13:42:21 +01:00
2012-09-17 13:42:04 +01:00
2014-11-26 11:32:17 +00:00
2014-05-08 11:31:57 +02:00
2014-07-18 10:21:17 +01:00
2014-05-29 09:08:33 +01:00
2014-02-07 16:46:07 +00:00
2014-09-03 13:11:00 +00:00
2013-06-14 09:52:40 +01:00
2014-08-28 20:01:36 +01:00
2014-11-17 10:43:42 +00:00
2013-06-07 10:39:45 +00:00
2014-11-20 16:34:48 +00:00
2014-12-09 17:25:00 -08:00
2014-10-21 17:01:07 +01:00
2014-12-04 10:10:59 +00:00
2014-02-26 11:16:25 +00:00
2014-01-08 15:23:53 +00:00
2014-10-18 14:24:36 -07:00
2014-09-25 15:35:41 +01:00
2014-11-06 17:25:28 +00:00
2014-07-11 04:57:45 -07:00
2014-07-11 04:57:44 -07:00
2014-09-26 14:39:45 +02:00
2014-09-27 11:03:33 +02:00
2013-06-07 14:03:38 +01:00
2014-10-14 05:48:19 -07:00
2014-04-30 04:18:57 -07:00
2012-10-20 11:12:01 +01:00
2012-09-17 13:41:56 +01:00
2014-12-09 17:25:00 -08:00
2013-06-07 18:00:11 +01:00
2014-06-05 13:15:32 -07:00
2012-09-17 13:42:19 +01:00
2014-05-08 11:31:57 +02:00
2014-11-20 16:33:45 +00:00
2014-08-08 15:57:27 -07:00
2014-09-30 17:08:57 -06:00
2014-11-20 12:05:18 +00:00
2013-01-29 16:56:17 +00:00
2014-11-20 12:05:18 +00:00
2014-07-23 15:27:51 +01:00
2014-07-23 15:27:56 +01:00
2014-12-10 17:41:08 -08:00
2012-09-17 13:42:17 +01:00
2014-09-08 14:39:18 +01:00
2014-08-29 16:11:10 +01:00
2014-05-15 10:16:00 -04:00
2014-08-29 16:11:00 +01:00
2014-11-28 10:24:59 +00:00
2012-09-17 13:42:07 +01:00
2014-08-06 12:56:16 +02:00
2013-12-16 17:17:30 +00:00
2014-09-13 18:46:13 +02:00
2014-08-19 20:23:02 +01:00
2013-10-25 16:10:22 +01:00
2014-02-07 16:46:07 +00:00
2014-07-09 12:23:48 +01:00
2012-09-17 10:24:46 +01:00
2012-10-11 11:05:13 +01:00
2014-05-23 15:17:12 +01:00
2014-09-12 10:48:55 +01:00
2013-06-07 10:39:45 +00:00
2014-07-10 11:06:00 +01:00
2013-02-14 09:17:29 -05:00
2014-07-25 13:12:15 +01:00
2013-07-19 15:57:08 +01:00
2014-09-08 14:39:19 +01:00
2013-06-10 17:58:20 +01:00
2014-11-17 10:12:42 +00:00
2014-07-24 18:41:13 +01:00
2014-05-16 17:12:04 +01:00
2014-11-20 16:33:43 +00:00
2014-03-20 17:41:27 +00:00
2013-03-18 10:42:16 +00:00
2014-12-09 13:12:47 -08:00
2014-11-28 10:24:59 +00:00
2012-09-17 13:42:09 +01:00
2012-09-17 13:42:09 +01:00
2014-07-11 04:57:35 -07:00
2013-12-19 17:43:08 +00:00