HAMMER (and kernel) - Fix cpu-bound kernel thread issue.
* HAMMER now calls a new kernel function, lwkt_user_yield(), in its
ioctl-based loops (such as the reblocker).
* Add a new LWKT function called lwkt_user_yield(). This function
causes a kernel thread to yield at user priority (instead of kernel
priority).
This function also deals with a nasty issue related to the MP lock.
A cpu-bound kernel thread holding the MP lock can prevent other
cpus from serving interrupt threads which also need the MP lock.
Detect the condition and release the MP lock for 10uS to give the
other cpus a chance to pick it up. This is a bad hack but it
actually does work.
* Move passive_release() from MD code to kern/lwkt_thread.c and add
an inline for the passive release recovery function. Adjust all
platforms to use the new API instead of rolling the same code for
each platform.
Reported-by: Many, but especially Hasso Tepper <hasso@estpak.ee>