. > >> If neither is true, we don't preempt (thus not calling mpswitch(), not >> releasing the kernel lock etc etc). For this reason it doesn't work >> well on SMP. Unfortunately the above conditions may be false if for ex >> 2 processes are spread out across 2 cpus: the cpu with the biglock will >> not mark the proc as need-to-switch (because it's the only process on >> the runqueue, iirc there's an optimization for that). > > I think you remember incorrectly. As far as I can tell > SPCF_SHOULDYIELD is always set when a process overruns its allocated > timeslice.
I think what's meant is that the flag isn't set until the timeslice expires. The system will overall be more reactive if we yield the big lock before the end of the timeslice. > > I think it is worth to get this diff tested without worrying about > biglock contention first. Agreed here.