Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1516703
| From | Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 06/12] mm: thp: enable thp migration in generic path |
| Date | 2016-11-08 01:40 +0100 |
| Message-ID | <sB2Cd-29A-9@gated-at.bofh.it> (permalink) |
| References | <sB1Ga-1xZ-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
This patch makes it possible to support thp migration gradually. If you fail
to allocate a destination page as a thp, you just split the source thp as we
do now, and then enter the normal page migration. If you succeed to allocate
destination thp, you enter thp migration. Subsequent patches actually enable
thp migration for each caller of page migration by allowing its get_new_page()
callback to allocate thps.
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
---
mm/migrate.c | 2 +-
mm/rmap.c | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git v4.9-rc2-mmotm-2016-10-27-18-27/mm/migrate.c v4.9-rc2-mmotm-2016-10-27-18-27_patched/mm/migrate.c
index 54f2eb6..97ab8d9 100644
--- v4.9-rc2-mmotm-2016-10-27-18-27/mm/migrate.c
+++ v4.9-rc2-mmotm-2016-10-27-18-27_patched/mm/migrate.c
@@ -1142,7 +1142,7 @@ static ICE_noinline int unmap_and_move(new_page_t get_new_page,
goto out;
}
- if (unlikely(PageTransHuge(page))) {
+ if (unlikely(PageTransHuge(page) && !PageTransHuge(newpage))) {
lock_page(page);
rc = split_huge_page(page);
unlock_page(page);
diff --git v4.9-rc2-mmotm-2016-10-27-18-27/mm/rmap.c v4.9-rc2-mmotm-2016-10-27-18-27_patched/mm/rmap.c
index a4be307..a0b665c 100644
--- v4.9-rc2-mmotm-2016-10-27-18-27/mm/rmap.c
+++ v4.9-rc2-mmotm-2016-10-27-18-27_patched/mm/rmap.c
@@ -1443,6 +1443,13 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
struct rmap_private *rp = arg;
enum ttu_flags flags = rp->flags;
+ if (flags & TTU_MIGRATION) {
+ if (!PageHuge(page) && PageTransCompound(page)) {
+ set_pmd_migration_entry(page, vma, address);
+ goto out;
+ }
+ }
+
/* munlock has nothing to gain from examining un-locked vmas */
if ((flags & TTU_MUNLOCK) && !(vma->vm_flags & VM_LOCKED))
goto out;
--
2.7.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 00/12] mm: page migration enhancement for thp Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> - 2016-11-08 00:40 +0100
[PATCH v2 02/12] mm: mempolicy: add queue_pages_node_check() Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> - 2016-11-08 00:50 +0100
[PATCH v2 07/12] mm: thp: check pmd migration entry in common path Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> - 2016-11-08 01:00 +0100
Re: [PATCH v2 07/12] mm: thp: check pmd migration entry in common path kbuild test robot <lkp@intel.com> - 2016-11-08 01:30 +0100
Re: [PATCH v2 07/12] mm: thp: check pmd migration entry in common path Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> - 2016-11-08 02:30 +0100
Re: [PATCH v2 07/12] mm: thp: check pmd migration entry in common path Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2016-11-10 09:40 +0100
Re: [PATCH v2 07/12] mm: thp: check pmd migration entry in common path Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> - 2016-11-10 10:20 +0100
Re: [PATCH v2 07/12] mm: thp: check pmd migration entry in common path Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> - 2016-11-10 10:30 +0100
Re: [PATCH v2 07/12] mm: thp: check pmd migration entry in common path Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> - 2016-11-10 10:40 +0100
Re: [PATCH v2 07/12] mm: thp: check pmd migration entry in common path "Hillf Danton" <hillf.zj@alibaba-inc.com> - 2016-11-10 10:40 +0100
Re: [PATCH v2 07/12] mm: thp: check pmd migration entry in common path "Hillf Danton" <hillf.zj@alibaba-inc.com> - 2016-11-10 10:30 +0100
[PATCH v2 06/12] mm: thp: enable thp migration in generic path Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> - 2016-11-08 01:40 +0100
Re: [PATCH v2 00/12] mm: page migration enhancement for thp Balbir Singh <bsingharora@gmail.com> - 2016-11-09 03:40 +0100
Re: [PATCH v2 00/12] mm: page migration enhancement for thp Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> - 2016-11-09 06:10 +0100
Re: [PATCH v2 00/12] mm: page migration enhancement for thp Balbir Singh <bsingharora@gmail.com> - 2016-11-09 22:30 +0100
Re: [PATCH v2 00/12] mm: page migration enhancement for thp Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2016-11-09 11:40 +0100
Re: [PATCH v2 00/12] mm: page migration enhancement for thp Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> - 2016-11-10 01:00 +0100
Re: [PATCH v2 00/12] mm: page migration enhancement for thp Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2016-11-11 04:50 +0100
csiph-web