Re: [PATCH 06/17] arm: mmu_gather rework
From: Peter Zijlstra
Date: Mon Feb 28 2011 - 07:26:31 EST
On Mon, 2011-02-28 at 12:06 +0000, Russell King wrote:
> As I think I mentioned, the TLB shootdown interface either needs rewriting
> from scratch as its currently a broken design, or it needs tlb_gather_mmu()
> to take a proper mode argument, rather than this useless 'fullmm' argument
> which only gives half the story.
> The fact is that the interface has three modes, and distinguishing between
> them requires a certain amount of black magic. Explicitly, the !fullmm
> case has two modes, and it requires implementations to remember whether
> tlb_start_vma() has been called before tlb_finish_mm() or not.
> Maybe this will help you understand the ARM implementation - this doesn't
> change the functionality, but may make things clearer.
I've actually implemented that, but it didn't really help much.
Mostly because you want your TLB flush to be after freeing the
page-tables, not before it.
So I want to avoid having to flush at tlb_end_vma() _and_ at
tlb_finish_mmu(), and doing that needs a flush_tlb_range() that doesn't
need a vma.
ARM also does the whole IPI thing on TLB flush, so a gup_fast()
implementation for arm would also need that TLB flush after page-table
tear-down, not on tlb_end_vma().
And once you want a single TLB invalidate, it doesn't matter if you want
to track ranges for p*_free_tlb() too.
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/