On Thu, Jun 30, 2005 at 09:26:07AM +1000, Benjamin Herrenschmidt wrote: > > > Execution is resumed exactly where it has been interrupted. > > > > > The idea behind my patch was to get rid of that nr_free_contexts counter > > > that is (I thing) redundant with the context_map. > > > > Apparently its there to avoid the spinlock exactly on !FEW_CONTEXTS > > machines. > > > > I suppose that what happens is that get_mmu_context() gets preempted after > > stealing > > a context (so nr_free_contexts = 0), but before setting next_mmu_context to > > the > > next entry > > > > next_mmu_context = (ctx + 1) & LAST_CONTEXT; > > Ugh ? Can switch_mm() be preempted at all ? Did I miss yet another > "let's open 10 gazillion races for gun" Ingo patch ?
No, it can't. schedule() disables preemption at the very beginning. -- Eugene
