freebsd-dev/sys/compat/linuxkpi/common/include/linux
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
..
bitmap.h Cleanup the bitmap_xxx() functions in the LinuxKPI: 2017-04-06 13:30:31 +00:00
bitops.h Cleanup the bitmap_xxx() functions in the LinuxKPI: 2017-04-06 13:30:31 +00:00
bottom_half.h Add support for LinuxKPI tasklets. 2017-02-21 13:23:53 +00:00
cache.h
cdev.h Implement register and unregister chrdev in the LinuxKPI. 2016-12-26 01:18:07 +00:00
clocksource.h Update and add various macros to the LinuxKPI and resolve a macro 2016-01-26 15:26:35 +00:00
compat.h Make the LinuxKPI task struct persistent accross system calls. 2017-02-21 12:43:02 +00:00
compiler.h The __stringify() macro in the LinuxKPI should expand any macros 2017-04-07 12:27:49 +00:00
completion.h Make header file standalone by including definitions for needed 2016-05-23 11:57:23 +00:00
delay.h
device.h Use ppsratecheck() for ratelimiting in the LinuxKPI. 2017-03-23 16:23:55 +00:00
dma-attrs.h
dma-mapping.h Implement GFP_DMA32 flag in the LinuxKPI. 2017-02-17 13:31:11 +00:00
dmapool.h sys/compat/linux*: spelling fixes. 2016-04-30 00:53:10 +00:00
err.h Add unlikely() statement to optimise the IS_ERR_VALUE() macro. 2016-05-13 11:30:56 +00:00
errno.h The Linux error defines should all be positive, else frequently used 2016-05-13 09:21:22 +00:00
etherdevice.h Implement eth_zero_addr() in the LinuxKPI. 2017-03-08 09:53:20 +00:00
file.h Make the LinuxKPI task struct persistent accross system calls. 2017-02-21 12:43:02 +00:00
fs.h Fix LINT build. 2016-12-26 10:03:33 +00:00
gfp.h Cleanup the LinuxKPI slab implementation. 2017-03-08 11:09:27 +00:00
hardirq.h
idr.h Add more IDR and IDA related functions to the LinuxKPI. 2016-05-11 10:40:04 +00:00
if_arp.h
if_ether.h
if_vlan.h Implement is_vlan_dev() and vlan_dev_vlan_id() for the LinuxKPI. 2016-01-26 14:33:20 +00:00
in6.h
in.h Add support for more IPv4 and IPv6 related macros in the LinuxKPI. 2017-03-22 15:44:00 +00:00
inetdevice.h Add helper function similar to ip_dev_find() to the LinuxKPI to lookup 2017-03-16 10:02:45 +00:00
interrupt.h Add support for LinuxKPI tasklets. 2017-02-21 13:23:53 +00:00
io-mapping.h
io.h Add __iowrite32_copy() to the Linux kernel compatibility layer. 2016-05-24 09:23:04 +00:00
ioctl.h Define _IOC_SIZE() in the LinuxKPI. 2016-05-13 11:42:36 +00:00
jhash.h
jiffies.h Implement time_is_after_eq_jiffies() function in the LinuxKPI. 2017-03-07 15:37:51 +00:00
kdev_t.h Make the LinuxKPI task struct persistent accross system calls. 2017-02-21 12:43:02 +00:00
kernel.h Use ppsratecheck() for ratelimiting in the LinuxKPI. 2017-03-23 16:23:55 +00:00
kmod.h
kobject.h Minor LinuxKPI code cleanup: 2015-12-31 12:30:19 +00:00
kref.h Implement "kref_put_mutex()" for the LinuxKPI. 2016-05-23 12:06:34 +00:00
kthread.h Make the LinuxKPI task struct persistent accross system calls. 2017-02-21 12:43:02 +00:00
ktime.h Add more ktime related functions to the LinuxKPI. 2016-05-23 12:10:28 +00:00
list.h Implement more list header file functions. 2016-12-26 10:41:51 +00:00
lockdep.h
log2.h
math64.h
miscdevice.h Minor LinuxKPI code cleanup: 2015-12-31 12:30:19 +00:00
mm_types.h Implement minimalistic memory mapping structure, struct mm_struct, and 2017-03-17 10:30:06 +00:00
mm.h Fix compilation of LinuxKPI for PowerPC. 2017-04-09 14:31:41 +00:00
module.h
moduleparam.h Add support for runtime modifiable module parameters in the LinuxKPI. 2016-05-26 09:04:14 +00:00
mutex.h Cleanup the LinuxKPI mutex wrappers. 2017-03-09 17:01:00 +00:00
net.h
netdevice.h Add basic support for VIMAGE to the LinuxKPI and ibcore. 2017-03-16 09:59:35 +00:00
notifier.h Add definition for the NETDEV_CHANGE event and tidy up the LinuxKPI 2016-01-26 14:27:00 +00:00
page.h All these files need sys/vmmeter.h, but now they got it implicitly 2017-04-17 17:07:00 +00:00
pci.h linuxkpi: Fix not-found case of linux_pci_find_irq_dev 2016-12-13 19:58:21 +00:00
pfn_t.h Implement a series of physical page management related functions in 2017-03-27 17:04:11 +00:00
pfn.h Implement a series of physical page management related functions in 2017-03-27 17:04:11 +00:00
pid.h Implement get_pid_task(), pid_task() and some other PID helper 2017-03-17 15:40:24 +00:00
poll.h
preempt.h Implement a series of physical page management related functions in 2017-03-27 17:04:11 +00:00
printk.h
radix-tree.h
random.h Fallback to arc4rand() in the LinuxKPI when read_random() returns 2016-06-07 13:10:13 +00:00
rbtree.h
rculist.h Replace dummy implementation of RCU in the LinuxKPI with one based on 2017-02-21 18:04:21 +00:00
rcupdate.h Replace dummy implementation of RCU in the LinuxKPI with one based on 2017-02-21 18:04:21 +00:00
rwlock.h Make the LinuxKPI task struct persistent accross system calls. 2017-02-21 12:43:02 +00:00
rwsem.h Implement down_write_killable() in the LinuxKPI. 2017-04-05 12:10:02 +00:00
scatterlist.h Convert magic values into macros in the LinuxKPI scatterlist 2017-02-22 20:24:09 +00:00
sched.h Fix problem regarding priority inversion when using the concurrency 2017-04-19 13:03:29 +00:00
semaphore.h Make the LinuxKPI task struct persistent accross system calls. 2017-02-21 12:43:02 +00:00
slab.h Implement vmalloc_32() in the LinuxKPI. 2017-03-27 17:18:04 +00:00
socket.h
spinlock.h Streamline the LinuxKPI spinlock wrappers. 2017-02-21 14:22:14 +00:00
srcu.h Fix problem regarding priority inversion when using the concurrency 2017-04-19 13:03:29 +00:00
string.h Implement more string functions in the LinuxKPI. 2017-02-24 17:36:55 +00:00
sysfs.h Remove the only user of sysctl_add_oid(). 2016-12-13 07:58:30 +00:00
time.h A missing definition needed by ktime_to_ms(). 2016-05-23 13:19:20 +00:00
timer.h Implement add_timer_on() function in the LinuxKPI. 2017-03-06 14:56:57 +00:00
types.h Implement a series of physical page management related functions in 2017-03-27 17:04:11 +00:00
uaccess.h Add comment describing the use of pagefault_disable() and 2017-03-17 08:02:46 +00:00
usb.h
vmalloc.h
wait.h Make the LinuxKPI task struct persistent accross system calls. 2017-02-21 12:43:02 +00:00
workqueue.h Fix implementation of the DECLARE_WORK() macro in the LinuxKPI to fully 2017-03-09 18:37:17 +00:00
ww_mutex.h Implement support for mutexes with deadlock avoidance in the LinuxKPI. 2017-03-09 18:33:40 +00:00