linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/tlb: correct vmflag test for checking VM_HUGETLB
@ 2012-11-12 17:17 Joonsoo Kim
  2012-11-14  0:27 ` Alex Shi
  0 siblings, 1 reply; 2+ messages in thread
From: Joonsoo Kim @ 2012-11-12 17:17 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: linux-kernel, linux-mm, x86, Joonsoo Kim, Alex Shi,
	Thomas Gleixner, Ingo Molnar

commit 611ae8e3f5204f7480b3b405993b3352cfa16662('enable tlb flush range
support for x86') change flush_tlb_mm_range() considerably. After this,
we test whether vmflag equal to VM_HUGETLB and it may be always failed,
because vmflag usually has other flags simultaneously.
Our intention is to check whether this vma is for hughtlb, so correct it
according to this purpose.

Cc: Alex Shi <alex.shi@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Joonsoo Kim <js1304@gmail.com>

diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
index 0777f04..60f926c 100644
--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -197,7 +197,7 @@ void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start,
 	}
 
 	if (end == TLB_FLUSH_ALL || tlb_flushall_shift == -1
-					|| vmflag == VM_HUGETLB) {
+					|| vmflag & VM_HUGETLB) {
 		local_flush_tlb();
 		goto flush_all;
 	}
-- 
1.7.9.5

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] x86/tlb: correct vmflag test for checking VM_HUGETLB
  2012-11-12 17:17 [PATCH] x86/tlb: correct vmflag test for checking VM_HUGETLB Joonsoo Kim
@ 2012-11-14  0:27 ` Alex Shi
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Shi @ 2012-11-14  0:27 UTC (permalink / raw)
  To: Joonsoo Kim
  Cc: H. Peter Anvin, linux-kernel, linux-mm, x86, Thomas Gleixner,
	Ingo Molnar

On 11/13/2012 01:17 AM, Joonsoo Kim wrote:
> commit 611ae8e3f5204f7480b3b405993b3352cfa16662('enable tlb flush range
> support for x86') change flush_tlb_mm_range() considerably. After this,
> we test whether vmflag equal to VM_HUGETLB and it may be always failed,
> because vmflag usually has other flags simultaneously.
> Our intention is to check whether this vma is for hughtlb, so correct it
> according to this purpose.
> 
> Cc: Alex Shi <alex.shi@intel.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Signed-off-by: Joonsoo Kim <js1304@gmail.com>
> 

Acked-by: Alex Shi <alex.shi@intel.com>

> diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
> index 0777f04..60f926c 100644
> --- a/arch/x86/mm/tlb.c
> +++ b/arch/x86/mm/tlb.c
> @@ -197,7 +197,7 @@ void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start,
>  	}
>  
>  	if (end == TLB_FLUSH_ALL || tlb_flushall_shift == -1
> -					|| vmflag == VM_HUGETLB) {
> +					|| vmflag & VM_HUGETLB) {
>  		local_flush_tlb();
>  		goto flush_all;
>  	}
> 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2012-11-14  0:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-12 17:17 [PATCH] x86/tlb: correct vmflag test for checking VM_HUGETLB Joonsoo Kim
2012-11-14  0:27 ` Alex Shi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).