mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3] x86/mm/tlb: update some comments in pte_flags_need_flush
@ 2022-09-30  2:24 Xin Hao
  2022-09-30  3:06 ` Randy Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: Xin Hao @ 2022-09-30  2:24 UTC (permalink / raw)
  To: namit
  Cc: rdunlap, tglx, mingo, bp, dave.hansen, x86, peterz, hpa, jroedel,
	xhao, akpm, linux-kernel

There just changed the comment about 'flush_on_clear' check, which make
the explanation more reasonable.

Suggested-by: Nadav Amit <namit@vmware.com>
Suggested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Xin Hao <xhao@linux.alibaba.com>
---

Changes from v2
(https://lore.kernel.org/lkml/20220929091040.45390-1-xhao@linux.alibaba.com/)
- fix some comments suggested-by Nadav Amit <namit@vmware.com> and
Randy Dunlap <rdunlap@infradead.org>

 arch/x86/include/asm/tlbflush.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
index cda3118f3b27..2a17698fb194 100644
--- a/arch/x86/include/asm/tlbflush.h
+++ b/arch/x86/include/asm/tlbflush.h
@@ -291,8 +291,8 @@ static inline bool pte_flags_need_flush(unsigned long oldflags,
 		diff &= ~_PAGE_ACCESSED;

 	/*
-	 * Did any of the 'flush_on_clear' flags was clleared set from between
-	 * 'oldflags' and 'newflags'?
+	 * Consider the 'flush_on_clear' flags that are set on 'oldflags',
+	 * Flush if any of these flags is cleared on 'newflags'.
 	 */
 	if (diff & oldflags & flush_on_clear)
 		return true;
--
2.31.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v3] x86/mm/tlb: update some comments in pte_flags_need_flush
  2022-09-30  2:24 [PATCH v3] x86/mm/tlb: update some comments in pte_flags_need_flush Xin Hao
@ 2022-09-30  3:06 ` Randy Dunlap
  0 siblings, 0 replies; 2+ messages in thread
From: Randy Dunlap @ 2022-09-30  3:06 UTC (permalink / raw)
  To: Xin Hao, namit
  Cc: tglx, mingo, bp, dave.hansen, x86, peterz, hpa, jroedel, akpm,
	linux-kernel



On 9/29/22 19:24, Xin Hao wrote:
> There just changed the comment about 'flush_on_clear' check, which make
> the explanation more reasonable.
> 
> Suggested-by: Nadav Amit <namit@vmware.com>
> Suggested-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Xin Hao <xhao@linux.alibaba.com>

Acked-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
> 
> Changes from v2
> (https://lore.kernel.org/lkml/20220929091040.45390-1-xhao@linux.alibaba.com/)
> - fix some comments suggested-by Nadav Amit <namit@vmware.com> and
> Randy Dunlap <rdunlap@infradead.org>
> 
>  arch/x86/include/asm/tlbflush.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
> index cda3118f3b27..2a17698fb194 100644
> --- a/arch/x86/include/asm/tlbflush.h
> +++ b/arch/x86/include/asm/tlbflush.h
> @@ -291,8 +291,8 @@ static inline bool pte_flags_need_flush(unsigned long oldflags,
>  		diff &= ~_PAGE_ACCESSED;
> 
>  	/*
> -	 * Did any of the 'flush_on_clear' flags was clleared set from between
> -	 * 'oldflags' and 'newflags'?
> +	 * Consider the 'flush_on_clear' flags that are set on 'oldflags',
> +	 * Flush if any of these flags is cleared on 'newflags'.
>  	 */
>  	if (diff & oldflags & flush_on_clear)
>  		return true;
> --
> 2.31.0

-- 
~Randy

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-30  3:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-30  2:24 [PATCH v3] x86/mm/tlb: update some comments in pte_flags_need_flush Xin Hao
2022-09-30  3:06 ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®