Opened 18 years ago
Closed 18 years ago
#1659 closed patch (fixed)
replace not working pthread_setschedparam for SCHED_OTHER with setpriority
Reported by: | Owned by: | Isaac Richards | |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | mythtv | Version: | head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
Using pthread_setschedparam() to "nice" the scheduler thread does nothing. This patch changes it to use setpriority()
Attachments (2)
Change History (5)
Changed 18 years ago by
Attachment: | schedprio.patch added |
---|
comment:1 Changed 18 years ago by
comment:2 Changed 18 years ago by
Summary: | the attempt to nice the scheduler thread doesn't work → replace not working pthread_setschedparam for SCHED_OTHER with setpriority |
---|---|
Type: | defect → patch |
Version: | → head |
The only supported priority for policy SCHED_OTHER is 0. And for every other sched_param pthread_setschedparam fails with EINVAL for me. setpriority() seems to work as intended.
Attached patch converts also the other occurances of pthread_setschedparam with SCHED_OTHER to setpriority().
This might solve the playback issues some people see with EIT processing.
Changed 18 years ago by
Attachment: | thread_priority_setting.diff added |
---|
Note: See
TracTickets for help on using
tickets.
There's also an occurrence in libmythtv/previewgenerator.cpp and libmythtv/eitscanner.cpp, neither of which will achieve anything.
For some reason, Linux returns EINVAL on any attempt to set a non-zero priority for SCHED_OTHER pthreads, although setpriority() within the thread works fine.