Messages in this thread | | | Subject | Re: [PATCH 07/13] powerpc: Preemptible mmu_gather | From | Peter Zijlstra <> | Date | Tue, 13 Apr 2010 12:22:23 +0200 |
| |
On Tue, 2010-04-13 at 11:23 +1000, Benjamin Herrenschmidt wrote: > > static inline void arch_leave_lazy_mmu_mode(void) > > { > > - struct ppc64_tlb_batch *batch = &__get_cpu_var(ppc64_tlb_batch); > > + struct ppc64_tlb_batch *batch = &get_cpu_var(ppc64_tlb_batch); > > + > > + if (batch->active) { > > + if (batch->index) > > + __flush_tlb_pending(batch); > > + batch->active = 0; > > + } > > Can index be > 0 if active == 0 ? I though not, which means you don't > need to add a test on active, do you ?
True I guess, but like this we avoid a write, doesn't really matter I suspect.
> I'm also pondering whether we should just stick something in the > task/thread struct and avoid that whole per-cpu manipulation including > the stuff in process.c in fact.
Can do, I can add batching similar to the generic code to the thread_info thingy.
> Heh, maybe it's time to introduce thread vars ? :-)
Heh, that seems like a real good way to waste a lot of memory fast ;-)
| |