From: Zi Yan <zi.yan@sent.com>
To: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: Zi Yan <zi.yan@cs.rutgers.edu>,
Vineet Gupta <vgupta@synopsys.com>,
linux-snps-arc@lists.infradead.org,
Russell King <linux@armlinux.org.uk>,
Christoffer Dall <christoffer.dall@linaro.org>,
Marc Zyngier <marc.zyngier@arm.com>,
linux-arm-kernel@lists.infradead.org,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
Steve Capper <steve.capper@arm.com>,
Kristina Martsenko <kristina.martsenko@arm.com>,
Dan Williams <dan.j.williams@intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
x86@kernel.org, Ralf Baechle <ralf@linux-mips.org>,
James Hogan <jhogan@kernel.org>, Michal Hocko <mhocko@suse.com>,
linux-mips@linux-mips.org,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Ram Pai <linuxram@us.ibm.com>,
Balbir Singh <bsingharora@gmail.com>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
linuxppc-dev@lists.ozlabs.org,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Janosch Frank <frankja@linux.vnet.ibm.com>,
linux-s390@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
sparclinux@vger.kernel.org, "Huang, Ying" <ying.huang@intel.com>
Subject: [RFC PATCH 0/9] Enable THP migration for all possible architectures
Date: Thu, 26 Apr 2018 10:27:55 -0400 [thread overview]
Message-ID: <20180426142804.180152-1-zi.yan@sent.com> (raw)
From: Zi Yan <zi.yan@cs.rutgers.edu>
Hi all,
THP migration is only enabled on x86_64 with a special
ARCH_ENABLE_THP_MIGRATION macro. This patchset enables THP migration for
all architectures that uses transparent hugepage, so that special macro can
be dropped. Instead, THP migration is enabled/disabled via
/sys/kernel/mm/transparent_hugepage/enable_thp_migration.
I grepped for TRANSPARENT_HUGEPAGE in arch folder and got 9 architectures that
are supporting transparent hugepage. I mechanically add __pmd_to_swp_entry() and
__swp_entry_to_pmd() based on existing __pte_to_swp_entry() and
__swp_entry_to_pte() for all these architectures, except tile which is going to
be dropped.
I have successfully compiled all these architectures, but have NOT tested them
due to lack of real hardware. I appreciate your help, if the maintainers of
these architectures can do a quick test with the code from
https://github.com/x-y-z/thp-migration-bench . Please apply patch 9 as well
to enable THP migration.
By enabling THP migration, migrating a 2MB THP on x86_64 machines takes only 1/3
time of migrating equivalent 512 4KB pages.
Hi Naoya, I also add soft dirty support for powerpc and s390. It would be great
if you can take a look at patch 6 & 7.
Feel free to give comments. Thanks.
Cc: linux-mm@kvack.org
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: linux-snps-arc@lists.infradead.org
Cc: Russell King <linux@armlinux.org.uk>
Cc: Christoffer Dall <christoffer.dall@linaro.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Steve Capper <steve.capper@arm.com>
Cc: Kristina Martsenko <kristina.martsenko@arm.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: x86@kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: linux-mips@linux-mips.org
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Ram Pai <linuxram@us.ibm.com>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Janosch Frank <frankja@linux.vnet.ibm.com>
Cc: linux-s390@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Cc: "Huang, Ying" <ying.huang@intel.com>
Zi Yan (9):
arc: mm: migrate: add pmd swap entry to support thp migration.
arm: mm: migrate: add pmd swap entry to support thp migration.
arm64: mm: migrate: add pmd swap entry to support thp migration.
i386: mm: migrate: add pmd swap entry to support thp migration.
mips: mm: migrate: add pmd swap entry to support thp migration.
powerpc: mm: migrate: add pmd swap entry to support thp migration.
s390: mm: migrate: add pmd swap entry to support thp migration.
sparc: mm: migrate: add pmd swap entry to support thp migration.
mm: migrate: enable thp migration for all possible architectures.
arch/arc/include/asm/pgtable.h | 2 ++
arch/arm/include/asm/pgtable.h | 2 ++
arch/arm64/include/asm/pgtable.h | 2 ++
arch/mips/include/asm/pgtable-64.h | 2 ++
arch/powerpc/include/asm/book3s/32/pgtable.h | 2 ++
arch/powerpc/include/asm/book3s/64/pgtable.h | 17 ++++++++++++
arch/powerpc/include/asm/nohash/32/pgtable.h | 2 ++
arch/powerpc/include/asm/nohash/64/pgtable.h | 2 ++
arch/s390/include/asm/pgtable.h | 5 ++++
arch/sparc/include/asm/pgtable_32.h | 2 ++
arch/sparc/include/asm/pgtable_64.h | 2 ++
arch/x86/Kconfig | 4 ---
arch/x86/include/asm/pgtable-2level.h | 2 ++
arch/x86/include/asm/pgtable-3level.h | 2 ++
arch/x86/include/asm/pgtable.h | 2 --
fs/proc/task_mmu.c | 2 --
include/asm-generic/pgtable.h | 21 ++-------------
include/linux/huge_mm.h | 9 +++----
include/linux/swapops.h | 4 +--
mm/Kconfig | 3 ---
mm/huge_memory.c | 27 +++++++++++++-------
mm/migrate.c | 6 ++---
mm/rmap.c | 5 ++--
23 files changed, 73 insertions(+), 54 deletions(-)
--
2.17.0
next reply other threads:[~2018-04-26 14:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-26 14:27 Zi Yan [this message]
2018-04-26 14:27 ` [RFC PATCH 1/9] arc: mm: migrate: add pmd swap entry to support thp migration Zi Yan
2018-04-26 14:27 ` [RFC PATCH 2/9] arm: " Zi Yan
2018-04-26 14:27 ` [RFC PATCH 3/9] arm64: " Zi Yan
2018-04-26 14:27 ` [RFC PATCH 4/9] i386: " Zi Yan
2018-04-26 14:28 ` [RFC PATCH 5/9] mips: " Zi Yan
2018-04-26 14:28 ` [RFC PATCH 6/9] powerpc: " Zi Yan
2018-04-26 14:28 ` [RFC PATCH 7/9] s390: " Zi Yan
2018-04-26 14:28 ` [RFC PATCH 8/9] sparc: " Zi Yan
2018-04-26 14:28 ` [RFC PATCH 9/9] mm: migrate: enable thp migration for all possible architectures Zi Yan
2018-04-27 17:36 ` [RFC PATCH 0/9] Enable THP " Gerald Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180426142804.180152-1-zi.yan@sent.com \
--to=zi.yan@sent.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=bsingharora@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=christoffer.dall@linaro.org \
--cc=dan.j.williams@intel.com \
--cc=davem@davemloft.net \
--cc=frankja@linux.vnet.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=jhogan@kernel.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=kristina.martsenko@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-mm@kvack.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=linuxram@us.ibm.com \
--cc=marc.zyngier@arm.com \
--cc=mhocko@suse.com \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=paulus@samba.org \
--cc=ralf@linux-mips.org \
--cc=schwidefsky@de.ibm.com \
--cc=sparclinux@vger.kernel.org \
--cc=steve.capper@arm.com \
--cc=tglx@linutronix.de \
--cc=vgupta@synopsys.com \
--cc=will.deacon@arm.com \
--cc=x86@kernel.org \
--cc=ying.huang@intel.com \
--cc=zi.yan@cs.rutgers.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox