Re: [PATCH V3] powerpc/mm: Fix Multi hit ERAT cause by recent THP update

From: Balbir Singh
Date: Mon Feb 15 2016 - 00:10:13 EST



> Now we can't depend for mm_cpumask, a parallel find_linux_pte_hugepte
> can happen outside that. Now i had a variant for kick_all_cpus_sync that
> ignored idle cpus. But then that needs more verification.
>
> http://article.gmane.org/gmane.linux.ports.ppc.embedded/81105
Can be racy as a CPU moves from non-idle to idle

In

> +ÂÂÂÂÂpmd_hugepage_update(vma->vm_mm, address, pmdp, ~0UL, 0);
> +ÂÂÂÂÂ/*
> +ÂÂÂÂÂÂ* This ensures that generic code that rely on IRQ disabling
> +ÂÂÂÂÂÂ* to prevent a parallel THP split work as expected.
> +ÂÂÂÂÂÂ*/
> +ÂÂÂÂÂkick_all_cpus_sync();

pmdp_invalidate()->pmd_hugepage_update() can still run in parallel withÂ
find_linux_pte_or_hugepte() and race.. Am I missing something?

Balbir Singh