Messages in this thread | | | Date | Tue, 21 Mar 2000 18:13:38 -0800 | From | Jun Sun <> | Subject | Re: scheduler ignores need_resched flag in 2.2.x and 2.3.x? |
| |
Dimitris Michailidis wrote: > > Jun Sun <jsun@mvista.com> writes: > > If we choose the above way to fix the lost need_resched flag, we would > > also > > need to apply the similar fix to two other functions for the SMP version > > : > > > > 1. smp_local_timer_interrupt() > > 2. update_process_times() > > These two are fine. They set the need_resched flag of the process whose > counter they decrement, and if the timer interrupt arrives right before a > context switch they charge the process being descheduled. Why would you > change this? If you want to be more correct than we are now you can add > > prev->need_resched = 0 > > in __schedule_tail() to make sure a process starts out with a clean > need_resched when it resumes execution, but that's minor. > > -- > Dimitris Michailidis dimitris@engr.sgi.com
You are right!
I was looking for "lost need_resched flag" scenarios. In the above cases, need_resched is "lost", but does no harm because the flag is set in order for the CURRENT process to yield the CPU. This is in contrast with the case when the flag is set to schedule some newly available processes.
Jun
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |