From: Catalin Marinas <catalin.marinas@arm.com>
To: Steve Capper <steve.capper@linaro.org>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"x86@kernel.org" <x86@kernel.org>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
Michal Hocko <mhocko@suse.cz>, Ken Chen <kenchen@google.com>,
Mel Gorman <mgorman@suse.de>, Will Deacon <Will.Deacon@arm.com>
Subject: Re: [RFC PATCH 1/2] mm: hugetlb: Copy huge_pmd_share from x86 to mm.
Date: Mon, 29 Apr 2013 16:26:41 +0100 [thread overview]
Message-ID: <20130429152641.GC12884@arm.com> (raw)
In-Reply-To: <1367247356-11246-2-git-send-email-steve.capper@linaro.org>
Steve,
On Mon, Apr 29, 2013 at 03:55:55PM +0100, Steve Capper wrote:
> Under x86, multiple puds can be made to reference the same bank of
> huge pmds provided that they represent a full PUD_SIZE of shared
> huge memory that is aligned to a PUD_SIZE boundary.
>
> The code to share pmds does not require any architecture specific
> knowledge other than the fact that pmds can be indexed, thus can
> be beneficial to some other architectures.
>
> This patch copies the huge pmd sharing (and unsharing) logic from
> x86/ to mm/ and introduces a new config option to activate it:
> CONFIG_ARCH_WANTS_HUGE_PMD_SHARE.
Just wondering whether more of it could be shared. The following look
pretty close to what you'd write for arm64:
- huge_pte_alloc()
- huge_pte_offset() (there is a pud_large macro on x86 which checks for
present & huge, we can replace it with just pud_huge in this function
as it already checks for present)
- follow_huge_pud()
- follow_huge_pmd()
Of course, arch-specific macros like pud_huge, pmd_huge would have to go
in a header file.
--
Catalin
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Catalin Marinas <catalin.marinas@arm.com>
To: Steve Capper <steve.capper@linaro.org>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"x86@kernel.org" <x86@kernel.org>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
Michal Hocko <mhocko@suse.cz>, Ken Chen <kenchen@google.com>,
Mel Gorman <mgorman@suse.de>, Will Deacon <Will.Deacon@arm.com>
Subject: Re: [RFC PATCH 1/2] mm: hugetlb: Copy huge_pmd_share from x86 to mm.
Date: Mon, 29 Apr 2013 16:26:41 +0100 [thread overview]
Message-ID: <20130429152641.GC12884@arm.com> (raw)
Message-ID: <20130429152641.jCYaxB0dT_dRumL-WWJq1gUzPGAbN_xK67cGMXj8-MA@z> (raw)
In-Reply-To: <1367247356-11246-2-git-send-email-steve.capper@linaro.org>
Steve,
On Mon, Apr 29, 2013 at 03:55:55PM +0100, Steve Capper wrote:
> Under x86, multiple puds can be made to reference the same bank of
> huge pmds provided that they represent a full PUD_SIZE of shared
> huge memory that is aligned to a PUD_SIZE boundary.
>
> The code to share pmds does not require any architecture specific
> knowledge other than the fact that pmds can be indexed, thus can
> be beneficial to some other architectures.
>
> This patch copies the huge pmd sharing (and unsharing) logic from
> x86/ to mm/ and introduces a new config option to activate it:
> CONFIG_ARCH_WANTS_HUGE_PMD_SHARE.
Just wondering whether more of it could be shared. The following look
pretty close to what you'd write for arm64:
- huge_pte_alloc()
- huge_pte_offset() (there is a pud_large macro on x86 which checks for
present & huge, we can replace it with just pud_huge in this function
as it already checks for present)
- follow_huge_pud()
- follow_huge_pmd()
Of course, arch-specific macros like pud_huge, pmd_huge would have to go
in a header file.
--
Catalin
next prev parent reply other threads:[~2013-04-29 15:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-29 14:55 [RFC PATCH 0/2] mm: Promote huge_pmd_share from x86 to mm Steve Capper
2013-04-29 14:55 ` Steve Capper
2013-04-29 14:55 ` [RFC PATCH 1/2] mm: hugetlb: Copy " Steve Capper
2013-04-29 14:55 ` Steve Capper
2013-04-29 15:26 ` Catalin Marinas [this message]
2013-04-29 15:26 ` Catalin Marinas
2013-04-29 15:47 ` Steve Capper
2013-04-29 15:47 ` Steve Capper
2013-04-29 16:07 ` Catalin Marinas
2013-04-29 16:07 ` Catalin Marinas
2013-04-29 14:55 ` [RFC PATCH 2/2] x86: mm: Remove x86 version of huge_pmd_share Steve Capper
2013-04-29 14:55 ` Steve Capper
2013-04-29 20:22 ` [RFC PATCH 0/2] mm: Promote huge_pmd_share from x86 to mm David Rientjes
2013-04-29 20:22 ` David Rientjes
2013-04-29 22:10 ` Catalin Marinas
2013-04-29 22:10 ` Catalin Marinas
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=20130429152641.GC12884@arm.com \
--to=catalin.marinas@arm.com \
--cc=Will.Deacon@arm.com \
--cc=kenchen@google.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mhocko@suse.cz \
--cc=steve.capper@linaro.org \
--cc=x86@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.