Re: [PATCH 3/4] mm/tlb, x86/mm: Support invalidating TLB caches for RCU_TABLE_FREE

From: Peter Zijlstra
Date: Fri Aug 24 2018 - 10:18:07 EST


On Fri, Aug 24, 2018 at 03:13:32PM +0200, Peter Zijlstra wrote:
> + * HAVE_RCU_TABLE_FREE
> + *
> + * This provides tlb_remove_table(), to be used instead of tlb_remove_page()
> + * for page directores (__p*_free_tlb()). This provides separate freeing of
> + * the page-table pages themselves in a semi-RCU fashion (see comment below).
> + * Useful if your architecture doesn't use IPIs for remote TLB invalidates
> + * and therefore doesn't naturally serialize with software page-table walkers.
> + *
> + * HAVE_RCU_TABLE_INVALIDATE
> + *
> + * This makes HAVE_RCU_TABLE_FREE call tlb_flush_mmu_tlbonly() before freeing
> + * the page-table pages. Required if you use HAVE_RCU_TABLE_FREE and your
> + * architecture uses the Linux page-tables natively.

Writing that also made me think we maybe should've negated that option.