[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181128141051.ff38f23023f652759b06f828@linux-foundation.org>
Date: Wed, 28 Nov 2018 14:10:51 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: "Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com>
Cc: mpe@...erman.id.au, benh@...nel.crashing.org, paulus@...ba.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH V2 4/5] mm/hugetlb: Add prot_modify_start/commit
sequence for hugetlb update
On Wed, 28 Nov 2018 20:04:37 +0530 "Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com> wrote:
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@...ux.ibm.com>
Some explanation of the motivation would be useful.
> include/linux/hugetlb.h | 18 ++++++++++++++++++
> mm/hugetlb.c | 8 +++++---
> 2 files changed, 23 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
> index 087fd5f48c91..e2a3b0c854eb 100644
> --- a/include/linux/hugetlb.h
> +++ b/include/linux/hugetlb.h
> @@ -543,6 +543,24 @@ static inline void set_huge_swap_pte_at(struct mm_struct *mm, unsigned long addr
> set_huge_pte_at(mm, addr, ptep, pte);
> }
> #endif
> +
> +#ifndef huge_ptep_modify_prot_start
> +static inline pte_t huge_ptep_modify_prot_start(struct vm_area_struct *vma,
> + unsigned long addr, pte_t *ptep)
> +{
> + return huge_ptep_get_and_clear(vma->vm_mm, addr, ptep);
> +}
> +#endif
#define huge_ptep_modify_prot_start huge_ptep_modify_prot_start
> +#ifndef huge_ptep_modify_prot_commit
> +static inline void huge_ptep_modify_prot_commit(struct vm_area_struct *vma,
> + unsigned long addr, pte_t *ptep,
> + pte_t old_pte, pte_t pte)
> +{
> + set_huge_pte_at(vma->vm_mm, addr, ptep, pte);
> +}
> +#endif
#define huge_ptep_modify_prot_commit huge_ptep_modify_prot_commit
Powered by blists - more mailing lists