lkml.org 
[lkml]   [2019]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Use flush tlb last level when change protection
On Sat, Feb 23, 2019 at 02:47:27PM +0800, Xuefeng Wang wrote:
> The protection attributes are only kept in last level tlb, so
> protection changing only need invalidate last level tlb, exclude
> the PWC entries.
>
> Signed-off-by: Xuefeng Wang <wxf.wang@hisilicon.com>
> ---
> mm/mprotect.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/mprotect.c b/mm/mprotect.c
> index 36cb358..0c4303d 100644
> --- a/mm/mprotect.c
> +++ b/mm/mprotect.c
> @@ -287,7 +287,7 @@ static unsigned long change_protection_range(struct vm_area_struct *vma,
>
> /* Only flush the TLB if we actually modified any entries: */
> if (pages)
> - flush_tlb_range(vma, start, end);
> + __flush_tlb_range(vma, start, end, PAGE_SIZE, true);
> dec_tlb_flush_pending(mm);

You are changing a generic file to call an arm64-internal function,
breaking all the other architectures, so NAK.

Do you actually see any performance improvement?

--
Catalin

\
 
 \ /
  Last update: 2019-02-24 12:10    [W:0.055 / U:24.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site