Re: Inefficient TLB flushing

From: Andrew Morton
Date: Wed Nov 12 2003 - 22:28:37 EST


Jack Steiner <steiner@xxxxxxx> wrote:
>
> > Either that, or add a new interface function
> >
> > int mmu_gather_is_full_mm(mmu_gather *tlb);
> >
> > and use it...
> >
>
> How implementation independent should it be? Currently, there is only one
> field in the mmu_gather structure that must be preserved. However, if we
> want to make the interface truly implementation independent, it seems
> like we should define something like:
>
> if (need_resched()) {
> struct mmu_gather_state state;
> tlb_mmu_gather_save_state(*tlbp, &state);
> tlb_finish_mmu(*tlbp, tlb_start, start);
> ...
> *tlbp = tlb_mmu_gather_restore_state(&state);
> }
>
> Is this overkill?

Think so ;) The `full_mm_flush' boolean is the only state thing we can pass
into tlb_gather_mmu anyway.

>
> Should we use the patch given above for 2.6.0 & replace it with an implementation
> independent interface for 2.6.1?

Just the little wrapper which doesn't assume the presence of
mmu_gather.full_mm should suffice.

-
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/