freebsd-nq/sys/compat/linuxkpi/common/include
Hans Petter Selasky f3de9af633 Fix problem regarding priority inversion when using the concurrency
kit, CK, in the LinuxKPI.

When threads are pinned to a CPU core or when there is only one CPU,
it can happen that a higher priority thread can call the CK
synchronize function while a lower priority thread holds the read
lock. Because the CK's synchronize is a simple wait loop this can lead
to a deadlock situation. To solve this problem use the recently
introduced CK's wait callback function.

When detecting a CK blocking condition figure out the lowest priority
among the blockers and update the calling thread's priority and
yield. If another CPU core is holding the read lock, pin the thread to
the blocked CPU core and update the priority. The calling threads
priority and CPU bindings are restored before return.

If a thread holding a CK read lock is detected to be sleeping, pause()
will be used instead of yield().

MFC after:		1 week
Sponsored by:		Mellanox Technologies
2017-04-19 13:03:29 +00:00
..
asm Implement a series of physical page management related functions in 2017-03-27 17:04:11 +00:00
linux Fix problem regarding priority inversion when using the concurrency 2017-04-19 13:03:29 +00:00
net Add full VNET support to the inet_get_local_port_range() function in 2017-03-22 15:46:31 +00:00