From: Kefeng Wang <wangkefeng.wang@huawei.com>
To: Nanyong Sun <sunnanyong@huawei.com>, <catalin.marinas@arm.com>,
<will@kernel.org>, <mike.kravetz@oracle.com>,
<muchun.song@linux.dev>, <akpm@linux-foundation.org>,
<anshuman.khandual@arm.com>
Cc: <willy@infradead.org>, <linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>
Subject: Re: [PATCH 1/3] mm: HVO: introduce helper function to update and flush pgtable
Date: Fri, 15 Dec 2023 14:16:54 +0800 [thread overview]
Message-ID: <f7950e7c-12b8-44b4-bfa9-fb2cb16944c0@huawei.com> (raw)
In-Reply-To: <20231214073912.1938330-2-sunnanyong@huawei.com>
On 2023/12/14 15:39, Nanyong Sun wrote:
> Add pmd/pte update and tlb flush helper function to update page
> table. This refactoring patch is designed to facilitate each
> architecture to implement its own special logic in preparation
> for the arm64 architecture to follow the necessary break-before-make
> sequence when updating page tables.
>
> Signed-off-by: Nanyong Sun <sunnanyong@huawei.com>
> ---
> mm/hugetlb_vmemmap.c | 55 ++++++++++++++++++++++++++++++++++----------
> 1 file changed, 43 insertions(+), 12 deletions(-)
>
> diff --git a/mm/hugetlb_vmemmap.c b/mm/hugetlb_vmemmap.c
> index 87818ee7f01d..49e8b351def3 100644
> --- a/mm/hugetlb_vmemmap.c
> +++ b/mm/hugetlb_vmemmap.c
> @@ -45,6 +45,37 @@ struct vmemmap_remap_walk {
> unsigned long flags;
> };
>
> +#ifndef vmemmap_update_pmd
> +static inline void vmemmap_update_pmd(unsigned long start,
> + pmd_t *pmd, pte_t *pgtable)
pgtable -> ptep
> +{
> + pmd_populate_kernel(&init_mm, pmd, pgtable);
> +}
> +#endif
> +
> +#ifndef vmemmap_update_pte
> +static inline void vmemmap_update_pte(unsigned long addr,
> + pte_t *pte, pte_t entry)
pte -> ptep
entry -> pte
> +{
> + set_pte_at(&init_mm, addr, pte, entry);
> +}
> +#endif
next prev parent reply other threads:[~2023-12-15 6:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-14 7:39 [PATCH 0/3] A Solution to Re-enable hugetlb vmemmap optimize on Arm Nanyong Sun
2023-12-14 7:39 ` [PATCH 1/3] mm: HVO: introduce helper function to update and flush pgtable Nanyong Sun
2023-12-15 3:36 ` Muchun Song
2023-12-18 9:53 ` Nanyong Sun
2023-12-15 6:16 ` Kefeng Wang [this message]
2023-12-18 9:54 ` Nanyong Sun
2023-12-14 7:39 ` [PATCH 2/3] arm64: mm: HVO: support BBM of vmemmap pgtable safely Nanyong Sun
2023-12-15 4:36 ` Muchun Song
2023-12-15 6:32 ` Kefeng Wang
2024-02-08 2:35 ` Jane Chu
2023-12-14 7:39 ` [PATCH 3/3] arm64: mm: Re-enable OPTIMIZE_HUGETLB_VMEMMAP Nanyong Sun
2023-12-15 4:37 ` Muchun Song
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=f7950e7c-12b8-44b4-bfa9-fb2cb16944c0@huawei.com \
--to=wangkefeng.wang@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=muchun.song@linux.dev \
--cc=sunnanyong@huawei.com \
--cc=will@kernel.org \
--cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox