SCHED_ULE & niceness / rtprio

Yar Tikhiy yar at
Wed Jan 23 10:32:31 PST 2008

On Mon, Jan 21, 2008 at 11:53:49PM +0800, Astrodog wrote:
> Just to be sure I understand this correctly... the player stutters
> when you *decrease* its priority (Or increase its niceness) only?

The player stutters when I assign a realtime or idle priority to
it, or when I decrease its niceness, e.g., to -10 or less.

As for the priority question: AFAIK, there are 3 run queue groups
in the kernel, for realtime, normal, and idle priority processes
willing to run.  Normal priority processes can run only if the real
time queue group is empty, and idle priority processes run only if
both the real time and normal queue groups are empty.  My problem
manifests itself if the process is not on the normal queue group.
At the same time, the numeric value of its idle or realtime priority
doesn't seem to matter.  (Note that realtime priority of 16 and
idle priority of 16 are totally different.)  Therefore I cannot
tell whether I increase or decrease its priority.  I just move it
to a different queue group.  Of course, it can be said roughly that
idprio(1) decreases process' priority and rtprio(1) increases it,
but it isn't technically correct because the term `priority' already
refers to the preference of a process within its current queue group.


More information about the freebsd-current mailing list