> I'm still a bit confused with "kernel preemption". One thing for sure > is that disabling kernel preemption does indeed fix my problem. > So, my question is, what if a task in the middle of being schedule > gets preempted by an IRQ handler, where will this task restart > execution ? Back at the beginning of schedule or where it left of ?
I very much doubt that schedule itself can be preempted :) > The idea behind my patch was to get rid of that nr_free_contexts > counter that is (I thing) redundant with the context_map.