opnsense-src/sys/compat/linuxkpi/common/src
Jeff Roberson 686bcb5c14 schedlock 4/4
Don't hold the scheduler lock while doing context switches.  Instead we
unlock after selecting the new thread and switch within a spinlock
section leaving interrupts and preemption disabled to prevent local
concurrency.  This means that mi_switch() is entered with the thread
locked but returns without.  This dramatically simplifies scheduler
locking because we will not hold the schedlock while spinning on
blocked lock in switch.

This change has not been made to 4BSD but in principle it would be
more straightforward.

Discussed with:	markj
Reviewed by:	kib
Tested by:	pho
Differential Revision: https://reviews.freebsd.org/D22778
2019-12-15 21:26:50 +00:00
..
linux_compat.c (4/6) Protect page valid with the busy lock. 2019-10-15 03:45:41 +00:00
linux_current.c LinuxKPI: Add group_leader member to struct task_struct. 2019-05-16 17:53:36 +00:00
linux_hrtimer.c Improve high resolution timer support in the LinuxKPI. 2018-06-01 11:33:14 +00:00
linux_idr.c Resolve duplicate symbol name conflict after r345095, when building LINT. 2019-03-13 19:53:20 +00:00
linux_kmod.c
linux_kthread.c schedlock 1/4 2019-12-15 21:11:15 +00:00
linux_lock.c Return correct error code to user-space when a system call receives a 2018-02-22 15:29:19 +00:00
linux_page.c Replace redundant code with a few new vm_page_grab facilities: 2019-09-10 19:08:01 +00:00
linux_pci.c Add missing M_NOWAIT flag 2019-10-23 17:20:20 +00:00
linux_radix.c Implement radix_tree_iter_delete() in the LinuxKPI. 2018-06-01 11:42:09 +00:00
linux_rcu.c schedlock 4/4 2019-12-15 21:26:50 +00:00
linux_schedule.c Implement the init_wait_entry() function macro in the LinuxKPI. 2018-06-06 14:59:23 +00:00
linux_seq_file.c import linux debugfs support 2019-02-23 20:56:41 +00:00
linux_slab.c Rename the SLAB_DESTROY_BY_RCU flag into SLAB_TYPESAFE_BY_RCU in the LinuxKPI 2018-03-04 18:04:37 +00:00
linux_tasklet.c LinuxKPI: Fix build on powerpc/sparc. 2019-05-16 19:32:11 +00:00
linux_usb.c linuxkpi whitespace cleanup 2018-03-23 15:50:01 +00:00
linux_work.c Use true and false when dealing with bool type in the LinuxKPI. 2019-09-11 08:24:47 +00:00