freebsd-nq/sys/kern
Mateusz Guzik a045941bd2 locks: tweak backoff a little bit
Previous limits were chosen when locking primitives had spurious lock
accesses.

Flipping the starting point to 1 (or rather 2 as the first call shifts it)
provides a modest win when mild contention is seen while not hurting worse
cases. Tested on a bunch of one, two and four socket old and new systems
(Westmere, Skylake, Threadreaper and others) by doing concurrent page faults,
buildkernel/buildworld and other stuff (although not all systems got all the
tests).

Another thing is the upper limit. It is semi-arbitrarily chosen as it was
getting out of hand for slightly less small systems (e.g. a 128-thread one).

Note that backoff is fundamentally a speculative bandaid and this change just
makes it fit a little bit better. It remains completely oblivious to the
hardware topology or the contention pattern. This is being experimented with.
2018-04-08 16:34:10 +00:00
..
bus_if.m
capabilities.conf
clock_if.m
cpufreq_if.m
device_if.m Teach makeobjops.awk to accept PROLOG and EPILOG blocks before 2017-12-31 09:23:19 +00:00
genassym.sh
imgact_aout.c Use C99 designated initializers for struct execsw 2018-03-13 13:09:10 +00:00
imgact_binmisc.c Use C99 designated initializers for struct execsw 2018-03-13 13:09:10 +00:00
imgact_elf32.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
imgact_elf64.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
imgact_elf.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
imgact_gzip.c Use C99 designated initializers for struct execsw 2018-03-13 13:09:10 +00:00
imgact_shell.c Use C99 designated initializers for struct execsw 2018-03-13 13:09:10 +00:00
inflate.c SPDX: use the Beerware identifier. 2017-11-30 20:33:45 +00:00
init_main.c Remove Giant from init creation and vfs_mountroot. 2018-03-21 14:46:54 +00:00
init_sysent.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_acct.c
kern_alq.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_clock.c make SW_WATCHDOG dynamic 2018-01-03 00:56:30 +00:00
kern_clocksource.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_condvar.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_conf.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_cons.c
kern_context.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_cpu.c Revert r327828, r327949, r327953, r328016-r328026, r328041: 2018-01-21 15:42:36 +00:00
kern_cpuset.c Implement several enhancements to NUMA policies. 2018-03-29 02:54:50 +00:00
kern_ctf.c Revert r327828, r327949, r327953, r328016-r328026, r328041: 2018-01-21 15:42:36 +00:00
kern_descrip.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_dtrace.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_dump.c make SW_WATCHDOG dynamic 2018-01-03 00:56:30 +00:00
kern_environment.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_et.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_event.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_exec.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_exit.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_fail.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_ffclock.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_fork.c Reduce contention on the proctree lock during heavy package build. 2018-02-20 02:18:30 +00:00
kern_hhook.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_idle.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_intr.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_jail.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_khelp.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_kthread.c Implement several enhancements to NUMA policies. 2018-03-29 02:54:50 +00:00
kern_ktr.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_ktrace.c
kern_linker.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_lock.c At this point iwmesg isn't initialized yet, so print pointer to lock 2018-03-20 22:05:21 +00:00
kern_lockf.c
kern_lockstat.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_loginclass.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_malloc.c Fix boot_pages exhaustion on machines with many domains and cores, where 2018-02-09 04:45:39 +00:00
kern_mbuf.c Implement NUMA support in uma(9) and malloc(9). Allocations from specific 2018-01-12 23:25:05 +00:00
kern_mib.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_module.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_mtxpool.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_mutex.c Drop KTR_CONTENTION. 2018-03-20 15:51:05 +00:00
kern_ntptime.c Fix several leaks of kernel stack data through paddings. 2018-03-27 18:05:51 +00:00
kern_osd.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_physio.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_pmc.c Revert r327828, r327949, r327953, r328016-r328026, r328041: 2018-01-21 15:42:36 +00:00
kern_poll.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_priv.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_proc.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_procctl.c
kern_prot.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_racct.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_rangelock.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_rctl.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_resource.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_rmlock.c
kern_rwlock.c locks: slightly depessimize lockstat 2018-03-17 19:26:33 +00:00
kern_sdt.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_sema.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_sendfile.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_sharedpage.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_shutdown.c Do not send signals to init directly from shutdown_nice(9), do it from 2018-03-22 20:47:25 +00:00
kern_sig.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_switch.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_sx.c locks: slightly depessimize lockstat 2018-03-17 19:26:33 +00:00
kern_synch.c Allow pause_sbt() to catch signals during sleep by passing C_CATCH flag. 2018-03-03 18:36:38 +00:00
kern_syscalls.c Reduce duplication in dynamic syscall registration code. 2018-02-20 18:08:57 +00:00
kern_sysctl.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_tc.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_thr.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_thread.c Account the size of the vslock-ed memory by the thread. 2018-03-24 13:51:27 +00:00
kern_time.c nanosleep(2): Fix bogus incrementing of rmtp by tc_tick_sbt on [EINTR]. 2018-02-14 18:43:50 +00:00
kern_timeout.c
kern_tslog.c Code for recording timestamps of events, especially function entries/exits. 2017-12-31 09:21:01 +00:00
kern_umtx.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
kern_uuid.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
kern_xxx.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
ksched.c
link_elf_obj.c Ignore relocation tables for non-memory-resident sections. 2018-02-05 23:35:33 +00:00
link_elf.c Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
linker_if.m
Make.tags.inc
Makefile Don't use an .OBJDIR for 'make sysent'. 2018-01-29 19:14:15 +00:00
makesyscalls.sh Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
md4c.c SPDX: some uses of the RSA-MD license. 2017-12-13 16:30:39 +00:00
md5c.c
msi_if.m
p1003_1b.c
pic_if.m
posix4_mib.c
sched_4bsd.c Implement 'domainset', a cpuset based NUMA policy mechanism. This allows 2018-01-12 22:48:23 +00:00
sched_ule.c Restore UP build. 2018-02-23 18:26:31 +00:00
serdev_if.m
stack_protector.c
subr_acl_nfs4.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_acl_posix1e.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_autoconf.c Instrument "boot holds" for the benefit of the TSLOG framework. These 2017-12-31 09:23:52 +00:00
subr_blist.c
subr_bufring.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_bus_dma.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_bus.c Fix LINT build after r328508, add forgotten part in format string 2018-01-29 02:29:08 +00:00
subr_busdma_bufalloc.c Implement NUMA support in uma(9) and malloc(9). Allocations from specific 2018-01-12 23:25:05 +00:00
subr_capability.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_clock.c Replace the existing print_ct() private debugging function with a set of 2018-02-12 16:25:56 +00:00
subr_compressor.c Fix the test for SET_FOREACH termination. 2018-02-15 17:35:40 +00:00
subr_counter.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_devmap.c
subr_devstat.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_disk.c SPDX: use the Beerware identifier. 2017-11-30 20:33:45 +00:00
subr_dummy_vdso_tc.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
subr_eventhandler.c Fix initialization of eventhandler mutex. 2018-03-19 22:43:27 +00:00
subr_fattime.c Use const pointers for input data not modified by clock utility functions. 2018-02-06 22:17:01 +00:00
subr_firmware.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_gtaskqueue.c subr_gtaskqueue: Fix braino from r330715 2018-03-10 01:53:42 +00:00
subr_hash.c Unsign some values related to allocation. 2018-01-22 02:08:10 +00:00
subr_hints.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_intr.c
subr_kdb.c KDB: restart only CPUs stopped by KDB 2018-01-18 07:38:54 +00:00
subr_kobj.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_lock.c locks: tweak backoff a little bit 2018-04-08 16:34:10 +00:00
subr_log.c
subr_mchain.c
subr_module.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_msgbuf.c Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
subr_param.c
subr_pcpu.c Make v_wire_count a per-cpu counter(9) counter. This eliminates a 2018-02-12 22:53:00 +00:00
subr_pctrie.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_pidctrl.c Add a generic Proportional Integral Derivative (PID) controller algorithm and 2018-02-23 22:51:51 +00:00
subr_power.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_prf.c Use the TSLOG framework to record entry/exit timestamps for DELAY and 2017-12-31 09:24:41 +00:00
subr_prof.c
subr_rman.c
subr_rtc.c Fix bad indentation. Whitespace only, no functional changes. 2018-02-13 17:38:08 +00:00
subr_sbuf.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_scanf.c
subr_sfbuf.c Remove SFBUF_OPTIONAL_DIRECT_MAP and such hacks, replacing them across the 2018-01-19 17:46:31 +00:00
subr_sglist.c
subr_sleepqueue.c Use LIST_FOREACH_SAFE in sleepq_chains_remove_matching(). 2018-03-25 20:12:14 +00:00
subr_smp.c Use resume_cpus() instead of restart_cpus() to resume from ACPI suspension. 2017-12-21 09:17:48 +00:00
subr_stack.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_syscall.c
subr_taskqueue.c Revert r327828, r327949, r327953, r328016-r328026, r328041: 2018-01-21 15:42:36 +00:00
subr_terminal.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_trap.c Account the size of the vslock-ed memory by the thread. 2018-03-24 13:51:27 +00:00
subr_turnstile.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_uio.c MIPS: Implement fue*word* and casueword* in assembly. 2018-03-12 22:10:06 +00:00
subr_unit.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
subr_vmem.c Fix three miscalculations in amount of boot pages: 2018-02-07 18:32:51 +00:00
subr_witness.c Start witness much earlier in boot so that we can shrink the pend list and 2018-03-22 19:11:43 +00:00
sys_capability.c Fix broken assertion in r329520. 2018-02-18 20:04:39 +00:00
sys_generic.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
sys_getrandom.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
sys_pipe.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
sys_procdesc.c Fix reaping on process fd close broken after r329449 2018-02-20 20:19:38 +00:00
sys_process.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
sys_socket.c Ensure that the vnet is set when calling pru_sockaddr() and 2018-01-11 20:26:17 +00:00
syscalls.c Regenerate sysent files after r331279. 2018-03-21 01:17:01 +00:00
syscalls.master Added SAL annotatations to system calls. 2018-04-05 20:31:45 +00:00
systrace_args.c Regenerate sysent files after r331279. 2018-03-21 01:17:01 +00:00
sysv_ipc.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
sysv_msg.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
sysv_sem.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
sysv_shm.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
tty_compat.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
tty_info.c
tty_inq.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
tty_outq.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
tty_pts.c Move uio enums to sys/_uio.h. 2018-03-27 15:20:03 +00:00
tty_tty.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
tty_ttydisc.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
tty.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
uipc_accf.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
uipc_debug.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
uipc_domain.c
uipc_mbuf2.c
uipc_mbuf.c
uipc_mbufhash.c
uipc_mqueue.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
uipc_sem.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
uipc_shm.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
uipc_sockbuf.c
uipc_socket.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
uipc_syscalls.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
uipc_usrreq.c Forgot to sort here in r328238. 2018-01-22 02:26:10 +00:00
vfs_acl.c Reduce duplication in __acl_*_(file|link). 2018-02-15 21:24:43 +00:00
vfs_aio.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
vfs_bio.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
vfs_cache.c Plug a name cache lock leak. 2017-12-01 22:51:02 +00:00
vfs_cluster.c
vfs_default.c Include error number in the "fsync: giving up on dirty" message 2018-02-23 21:57:10 +00:00
vfs_export.c Reverse the check to allocate the buffer if cached pointer is NULL. 2017-12-23 17:55:19 +00:00
vfs_extattr.c Reduce duplication in extattr_*_(file|link) syscalls. 2018-02-05 19:06:34 +00:00
vfs_hash.c sys/kern: adoption of SPDX licensing ID tags. 2017-11-27 15:20:12 +00:00
vfs_init.c
vfs_lookup.c
vfs_mount.c vfs_donmount: in certain cases try r/o mount if r/w mount fails 2018-03-27 14:31:42 +00:00
vfs_mountroot.c Remove Giant from init creation and vfs_mountroot. 2018-03-21 14:46:54 +00:00
vfs_subr.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
vfs_syscalls.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
vfs_vnops.c In vn_io_fault1(), reduce the scope where pagefaults are disabled. 2018-03-24 13:13:52 +00:00
vnode_if.src Use long for the last argument to VOP_PATHCONF rather than a register_t. 2018-01-17 22:36:58 +00:00