]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC of 204670:
authorrrs <rrs@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 5 Apr 2010 13:33:54 +0000 (13:33 +0000)
committerrrs <rrs@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 5 Apr 2010 13:33:54 +0000 (13:33 +0000)
commit5f3049c392d5ceaf119ac2a4eef1966779e6f39c
treeedcafa8cdbe999ad3eff4602f91ea3303811167e
parentf8b8f44e97afecfb412c1f658b170bfd7686fa61
MFC of 204670:
-------------------------
sched_getparam was just plain broke for time-share
processes. It did not return an error but instead
just let garbage be passed back. This I fix so
it actually properly translates the priority the
process is at to a posix's high means more priority.
I also fix it so that if the ULE scheduler has bumped
it up to a realtime process you get back a sane value
i.e. the highest priority (63 for time-share).

sched_setscheduler() had the setting of the
timeshare class priority disabled. With some notes
about rejecting the posix high numbers is greater
priority and use nice instead. This fix also
adjusts that to work, with the cavet that a t-s
process may well get bumped up or down i.e. the
setscheduler() will NOT change the nice value only
the current priority. I think this is reasonable
considering if the user wants to play with nice then
he can. At least all the posix'ish interfaces now
respond sanely.
-----------------------

git-svn-id: svn://svn.freebsd.org/base/stable/8@206180 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/kern/kern_resource.c
sys/kern/ksched.c