On Wed, Aug 04, 2004 at 02:51:40PM -0700, Tom Rini wrote: > On Tue, Aug 03, 2004 at 12:40:48PM -0700, Jun Sun wrote: > > > On Tue, Aug 03, 2004 at 12:22:44PM -0700, Song Wang wrote: > > > Hi, > > > > > > Has anyone tried to enable kernel preemption on > > > Linux mips 2.6 kernel (mips32) and test it? If > > > so, which version does it work? > > > > > > I tried on 2.6.3 and it didn't work. > > > > > > > Try the latest kernel. I checked preemption around 2.6.5 time > > and I believe all the obvious problems are fixed then. > > > > There are still some issues with both SMP and PREEMPT, but most > > people won't see them in normal cases. > > MIPS or generic? It's claimed, at least, that SMP&&PREEMPT have no > fatal, generic, issues now (I forget if that was the case around 2.6.5). > It is MIPS specific problems I was referring to (such as unsafe smp_processor_id() reference etc). If you think about it the real problem is that kernel has non-migratable regions, a section where process should not migrate from one CPU to another. Before preemtible kernel is introduced such non-migratable regions are not a problem because they can't migrate during those regions. So a potentially better solution is to introduce non-migratable regions during which scheduler promises not to migrate the processes. Under such promises a process can actually be preempted while it is in such a region. Jun