sched_userret priority adjustment patch for sched_4bsd

Stephan Uphoff ups at tree.com
Sat Sep 25 10:29:18 PDT 2004


When a thread is about to return to user space it resets its priority to
the user level priority.
However after lowering the permission its priority it needs to check if
its priority is still better than all other runable threads.
This is currently not implemented.
Without the check the thread can block kernel or user threads with
better priority until a switch is forced by by an interrupt.

The attached patch checks the relevant runqueues and threads without
slots in the same ksegrp and forces a thread switch if the currently
running thread is no longer the best thread to run after it changed its
priority.   

The patch should improve interactive response under heavy load somewhat.
It needs a lot of testing.

	Stephan




-------------- next part --------------
A non-text attachment was scrubbed...
Name: sched_userret_patch
Type: text/x-patch
Size: 2421 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20040925/a9fbd7ae/sched_userret_patch.bin


More information about the freebsd-arch mailing list