Re: [PATCH v3 4/7] x86/tlb: add tlb flush all factor for specificCPUs

From: H. Peter Anvin
Date: Tue May 08 2012 - 11:19:05 EST


On 05/08/2012 07:03 AM, Alex Shi wrote:
>
> - if (!cpu_has_invlpg || vma->vm_flags & VM_HUGETLB) {
> + if (!cpu_has_invlpg || vma->vm_flags & VM_HUGETLB
> + || !tlb_flushall_factor) {

OK nevermind on the division by zero, but this yet another test being
performed.

If nothing else you could fold these tests and make tlb_flushall_factor
zero if !cpu_has_invlpg.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/