Messages in this thread | | | From | Borislav Deianov <> | Date | Thu, 14 Oct 1999 17:52:40 +0200 | Subject | Re: [PATCH] scheduler cleanup |
| |
On Thu, Oct 14, 1999 at 03:25:45AM +0100, Artur Skawina wrote: > Borislav Deianov wrote: > > > > > o sched_yield() works better for SCHED_OTHER threads, ie a process > > > calling sched_yield() won't continue to run if there are other > > > "normal" processes waiting for a CPU > > > > I bet you don't mean that, it still depends on the dynamic > > priority. > > No, i meant what i said above. While returning from > sched_yield() the current SCHED_OTHER thread will be treated > just like if it had current->counter==0.
OK, I see - goodness() will return 0 if SCHED_YIELD is set for a process.
> > I think I see what Andrea means here. Scenario: CPU 0 runs process A, > > CPU 1 is idle, runqueue has only A. RT process B wakes up, previously > > run on CPU 0 and decides switching to CPU 1 is too expensive. Process > > A calls sched_yield(). You better reschedule. > > "decides switching to CPU 1 is too expensive" does not happen when CPU1 > is idle. see wake_up_process()/reschedule_idle().
Andrea is right here.
Best, Borislav
- 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/
| |