> The CFS scheduler does not seem to implement sched_yield correctly. If oneI disagree with the bug report. This seems right. They're both always ready to run. They're at the same priority. Neither ever blocks. There is no reason one should get more CPU than the other. Umm, how does he get that? It's yielding at blinding speed. Nonsense. The task is always ready-to-run. There is no reason its CPU should be low. This bug report is based on a misunderstanding of what yielding means. The Linux page says: "A process can relinquish the processor voluntarily without blocking by calling sched_yield(). The process will then be moved to the end of the queue for its static priority and a new process gets to run." Notice the "without blocking" part? POSIX says: "The sched_yield() function forces the running thread to relinquish the processor until it again becomes the head of its thread list. It takes no arguments." CFS is perfectly complying with both of these. This bug report is a great example of how sched_yield can be misunderstood and misused. You can even argue that the sched_yield process should get even more CPU, since it's voluntarily relinquishing (which should be rewarded) rather than infinitely spinning (which should be punished). (Not that I agree with this argument, I'm just using it to counter-balance the other argument.) DS -
| Justin C. Sherrill | Re: dragonflybsd.org website link? |
| David Woodhouse | Re: -mm merge plans for 2.6.23 |
| Greg Kroah-Hartman | [PATCH 002/196] Chinese: rephrase English introduction in HOWTO |
| Eric Sandeen | Re: [RFC] Heads up on sys_fallocate() |
git: | |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Patrick McHardy | [NET_SCHED 01/15]: sch_atm: fix format string warning |
