Messages in this thread | | | Date | Wed, 13 Oct 1999 04:33:29 +0100 | From | Artur Skawina <> | Subject | Re: [PATCH] scheduler cleanup |
| |
Andrea Arcangeli wrote: > > I had a fast look at the patch and one thing looks obviously wrong: > > + * A thread calling sched_yield() wants to give up its timeslice and let > + * other equal priority threads to run. > + * We optimize by ignoring the request completely when the number of > + * currently runnable processes is <= the number of available CPUs. > > You can't expect the other running tasks to reschedule idle CPUs as they > may be very fast tasks that needs to run on your CPU as they don't want to > trash the CPU cache. So you must _always_ reschedule if SCHED_YIELD is > asked.
hmm, while the check certainly isn't necessary (it's supposed to help in pathological situations when sys_sched_yield() is needlessly called, and mainly reduce lock contention), i don't see the problem...
- 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/
| |