Files
android_kernel_xiaomi_sm8450/include/linux
Zi Yan 84c3fc4e9c mm: thp: check pmd migration entry in common path
When THP migration is being used, memory management code needs to handle
pmd migration entries properly.  This patch uses !pmd_present() or
is_swap_pmd() (depending on whether pmd_none() needs separate code or
not) to check pmd migration entries at the places where a pmd entry is
present.

Since pmd-related code uses split_huge_page(), split_huge_pmd(),
pmd_trans_huge(), pmd_trans_unstable(), or
pmd_none_or_trans_huge_or_clear_bad(), this patch:

1. adds pmd migration entry split code in split_huge_pmd(),

2. takes care of pmd migration entries whenever pmd_trans_huge() is present,

3. makes pmd_none_or_trans_huge_or_clear_bad() pmd migration entry aware.

Since split_huge_page() uses split_huge_pmd() and pmd_trans_unstable()
is equivalent to pmd_none_or_trans_huge_or_clear_bad(), we do not change
them.

Until this commit, a pmd entry should be:
1. pointing to a pte page,
2. is_swap_pmd(),
3. pmd_trans_huge(),
4. pmd_devmap(), or
5. pmd_none().

Signed-off-by: Zi Yan <zi.yan@cs.rutgers.edu>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: David Nellans <dnellans@nvidia.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-09-08 18:26:45 -07:00
..
2017-06-08 18:52:36 -07:00
2017-07-17 17:26:14 +02:00
2017-07-06 16:24:33 -07:00
2017-07-03 16:56:28 -06:00
2017-06-05 16:59:12 +02:00
2017-08-31 17:32:38 -04:00
2017-06-22 15:43:47 +01:00
2017-09-04 00:05:22 +02:00
2017-09-04 00:06:02 +02:00
2017-08-10 12:28:57 +02:00
2017-06-09 11:52:07 +02:00
2017-08-24 13:23:03 -07:00
2017-07-17 13:42:48 +02:00
2017-07-07 20:09:10 -04:00
2017-05-18 10:07:41 -04:00
2017-05-18 10:07:40 -04:00
2017-06-21 14:37:12 -04:00
2017-07-10 16:32:34 -07:00
2017-08-14 13:33:39 -07:00
2017-05-03 15:52:10 -07:00
2017-08-01 12:03:10 -07:00
2017-08-28 20:51:22 +02:00
2017-08-18 15:32:01 -07:00
2017-09-06 17:27:29 -07:00
2017-09-06 17:27:30 -07:00
2017-07-13 16:00:15 -04:00
2017-07-06 11:30:07 -04:00
2017-07-25 18:05:25 +02:00
2017-05-26 10:10:37 +02:00
2017-09-06 17:27:26 -07:00
2017-08-06 20:55:29 -07:00
2017-08-06 20:55:29 -07:00
2017-08-21 12:47:31 -07:00
2017-08-16 16:28:47 -07:00
2017-06-29 10:48:57 +01:00
2017-07-12 23:11:23 +02:00
2017-06-08 10:35:49 +02:00
2017-08-01 12:03:10 -07:00
2017-07-06 16:24:30 -07:00
2017-08-16 16:28:47 -07:00
2017-08-03 21:37:29 -07:00
2017-06-08 18:52:42 -07:00
2017-06-01 14:53:04 -04:00
2017-08-28 16:15:42 +02:00
2017-07-24 17:50:37 +02:00
2017-05-09 16:43:22 +03:00
2017-08-31 18:50:14 +02:00
2017-08-18 15:32:01 -07:00
2017-09-05 06:34:17 -07:00