This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/14829] New: sched_* functions wrongly alter thread scheduling, rather than process


http://sourceware.org/bugzilla/show_bug.cgi?id=14829

             Bug #: 14829
           Summary: sched_* functions wrongly alter thread scheduling,
                    rather than process
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: unassigned@sourceware.org
        ReportedBy: bugdal@aerifal.cx
                CC: drepper.fsp@gmail.com
    Classification: Unclassified


Per POSIX (XSH 2.8.4 Process Scheduling, subheading Scheduling Policies):

"For threads with system scheduling contention scope, the process scheduling
attributes shall have no effect on the scheduling attributes or behavior either
of the thread or an underlying kernel scheduling entity dedicated to that
thread."

Linux does not seem to support process-level scheduling attributes at all;
glibc/NPTL only accept system scheduling contention scope, and returns ENOTSUP
when an attempt is made to create a thread with process contention scope. As
such, my reading of the above text is that the sched_* functions should be
mostly/entirely no-ops. Even if this weren't the case, it's certainly incorrect
for them to modify the scheduling attributes of the single thread whose TID
happens to be equal to the PID.

I'm unsure what the best way to resolve this issue against application
expectations is, but the current behavior is non-conforming and does the wrong
thing in multi-threaded applications trying to use these functions for their
standard purposes.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]