Bug 295071
Summary: | CFS scheduler not implementing sched_yield correctly | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Robert Soliday <soliday> |
Component: | kernel | Assignee: | Kernel Maintainer List <kernel-maint> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 7 | CC: | chris.brown, davids |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | 2.6.23* | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2007-11-27 20:56:54 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Robert Soliday
2007-09-18 16:40:30 UTC
Ingo has proposed a patch for this, but he (correctly) points out that applications that rely on this behavior are fundamentally broken: http://lkml.org/lkml/2007/9/14/157 Will put the patch in Fedora 7, possibly with the default changed so it emulates the old scheduler. POSIX says, "[t]he 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 implementing this behavior. The reporter fundamentally misunderstands sched_yield. It does not block, so the "yielding" process is always ready-to-run and is burning the CPU in a tight spin just like the "spinning" process is. Hello, I'm reviewing this bug as part of the kernel bug triage project, an attempt to isolate current bugs in the fedora kernel. http://fedoraproject.org/wiki/KernelBugTriage Given the comments #1 and #2 I'm closing this NOTABUG however please re-open if you feel I have erred, preferably with a rebuttal of the statements above. Cheers Chris It looks like Linus Torvalds and Ingo Molnar worked out a solution for this problem in future kernel releases. http://kerneltrap.org/Linux/CFS_and_sched_yield That patch is queued for Fedora 7. In Fedora 7 kernel-2.6.23* Not enabled by default. Activate it with: # sysctl kernel.sched_compat_yield=1 or # echo "1">/proc/sys/kernel/sched_compat_yield |