All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc/mm/tlbflush: update the mmu_gather page size while iterating address range
@ 2018-08-09 13:36 Aneesh Kumar K.V
  2018-08-10  0:58 ` Nicholas Piggin
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Aneesh Kumar K.V @ 2018-08-09 13:36 UTC (permalink / raw)
  To: npiggin, benh, paulus, mpe; +Cc: linuxppc-dev, Aneesh Kumar K.V

This patch makes sure we update the mmu_gather page size even if we are
requesting for a fullmm flush. This avoids triggering VM_WARN_ON in code
paths like __tlb_remove_page_size that explicitly check for removing range page
size to be same as mmu gather page size.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
 arch/powerpc/include/asm/tlb.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/include/asm/tlb.h b/arch/powerpc/include/asm/tlb.h
index 97ecef697e1b..f0e571b2dc7c 100644
--- a/arch/powerpc/include/asm/tlb.h
+++ b/arch/powerpc/include/asm/tlb.h
@@ -49,13 +49,11 @@ static inline void __tlb_remove_tlb_entry(struct mmu_gather *tlb, pte_t *ptep,
 static inline void tlb_remove_check_page_size_change(struct mmu_gather *tlb,
 						     unsigned int page_size)
 {
-	if (tlb->fullmm)
-		return;
-
 	if (!tlb->page_size)
 		tlb->page_size = page_size;
 	else if (tlb->page_size != page_size) {
-		tlb_flush_mmu(tlb);
+		if (!tlb->fullmm)
+			tlb_flush_mmu(tlb);
 		/*
 		 * update the page size after flush for the new
 		 * mmu_gather.
-- 
2.17.1

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

* Re: [PATCH] powerpc/mm/tlbflush: update the mmu_gather page size while iterating address range
  2018-08-09 13:36 [PATCH] powerpc/mm/tlbflush: update the mmu_gather page size while iterating address range Aneesh Kumar K.V
@ 2018-08-10  0:58 ` Nicholas Piggin
  2018-08-10  7:09 ` Michael Ellerman
  2018-08-13 11:23 ` Michael Ellerman
  2 siblings, 0 replies; 4+ messages in thread
From: Nicholas Piggin @ 2018-08-10  0:58 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: benh, paulus, mpe, linuxppc-dev

On Thu,  9 Aug 2018 19:06:59 +0530
"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com> wrote:

> This patch makes sure we update the mmu_gather page size even if we are
> requesting for a fullmm flush. This avoids triggering VM_WARN_ON in code
> paths like __tlb_remove_page_size that explicitly check for removing range page
> size to be same as mmu gather page size.
> 
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>

Acked-by: Nicholas Piggin <npiggin@gmail.com>

Thanks, sorry bout that.

> ---
>  arch/powerpc/include/asm/tlb.h | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/tlb.h b/arch/powerpc/include/asm/tlb.h
> index 97ecef697e1b..f0e571b2dc7c 100644
> --- a/arch/powerpc/include/asm/tlb.h
> +++ b/arch/powerpc/include/asm/tlb.h
> @@ -49,13 +49,11 @@ static inline void __tlb_remove_tlb_entry(struct mmu_gather *tlb, pte_t *ptep,
>  static inline void tlb_remove_check_page_size_change(struct mmu_gather *tlb,
>  						     unsigned int page_size)
>  {
> -	if (tlb->fullmm)
> -		return;
> -
>  	if (!tlb->page_size)
>  		tlb->page_size = page_size;
>  	else if (tlb->page_size != page_size) {
> -		tlb_flush_mmu(tlb);
> +		if (!tlb->fullmm)
> +			tlb_flush_mmu(tlb);
>  		/*
>  		 * update the page size after flush for the new
>  		 * mmu_gather.

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

* Re: [PATCH] powerpc/mm/tlbflush: update the mmu_gather page size while iterating address range
  2018-08-09 13:36 [PATCH] powerpc/mm/tlbflush: update the mmu_gather page size while iterating address range Aneesh Kumar K.V
  2018-08-10  0:58 ` Nicholas Piggin
@ 2018-08-10  7:09 ` Michael Ellerman
  2018-08-13 11:23 ` Michael Ellerman
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2018-08-10  7:09 UTC (permalink / raw)
  To: Aneesh Kumar K.V, npiggin, benh, paulus; +Cc: linuxppc-dev, Aneesh Kumar K.V

"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com> writes:

> This patch makes sure we update the mmu_gather page size even if we are
> requesting for a fullmm flush. This avoids triggering VM_WARN_ON in code
> paths like __tlb_remove_page_size that explicitly check for removing range page
> size to be same as mmu gather page size.

I take it this is a fix for 5a6099346c41 ("powerpc/64s/radix: tlb do not flush on page size when fullmm") ?

cheers

> diff --git a/arch/powerpc/include/asm/tlb.h b/arch/powerpc/include/asm/tlb.h
> index 97ecef697e1b..f0e571b2dc7c 100644
> --- a/arch/powerpc/include/asm/tlb.h
> +++ b/arch/powerpc/include/asm/tlb.h
> @@ -49,13 +49,11 @@ static inline void __tlb_remove_tlb_entry(struct mmu_gather *tlb, pte_t *ptep,
>  static inline void tlb_remove_check_page_size_change(struct mmu_gather *tlb,
>  						     unsigned int page_size)
>  {
> -	if (tlb->fullmm)
> -		return;
> -
>  	if (!tlb->page_size)
>  		tlb->page_size = page_size;
>  	else if (tlb->page_size != page_size) {
> -		tlb_flush_mmu(tlb);
> +		if (!tlb->fullmm)
> +			tlb_flush_mmu(tlb);
>  		/*
>  		 * update the page size after flush for the new
>  		 * mmu_gather.
> -- 
> 2.17.1

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

* Re: powerpc/mm/tlbflush: update the mmu_gather page size while iterating address range
  2018-08-09 13:36 [PATCH] powerpc/mm/tlbflush: update the mmu_gather page size while iterating address range Aneesh Kumar K.V
  2018-08-10  0:58 ` Nicholas Piggin
  2018-08-10  7:09 ` Michael Ellerman
@ 2018-08-13 11:23 ` Michael Ellerman
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2018-08-13 11:23 UTC (permalink / raw)
  To: Aneesh Kumar K.V, npiggin, benh, paulus; +Cc: Aneesh Kumar K.V, linuxppc-dev

On Thu, 2018-08-09 at 13:36:59 UTC, "Aneesh Kumar K.V" wrote:
> This patch makes sure we update the mmu_gather page size even if we are
> requesting for a fullmm flush. This avoids triggering VM_WARN_ON in code
> paths like __tlb_remove_page_size that explicitly check for removing range page
> size to be same as mmu gather page size.
> 
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
> Acked-by: Nicholas Piggin <npiggin@gmail.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/0b6aa1a20add96437c46db77c9bae2

cheers

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

end of thread, other threads:[~2018-08-13 11:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-09 13:36 [PATCH] powerpc/mm/tlbflush: update the mmu_gather page size while iterating address range Aneesh Kumar K.V
2018-08-10  0:58 ` Nicholas Piggin
2018-08-10  7:09 ` Michael Ellerman
2018-08-13 11:23 ` Michael Ellerman

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.