freebsd-skq/sys/kern
Konstantin Belousov 5db9ed8062 If callout_stop_safe() noted that the callout is currently executing,
but next invocation is cancelled while migrating,
sleepq_check_timeout() needs to be informed that the callout is
stopped.  Otherwise the thread switches off CPU and never become
runnable, since running callout could have already raced with us,
while the migrating and cancelled callout could be one which is
expected to set TDP_TIMOFAIL flag for us.  This contradicts with the
expected behaviour of callout_stop() for other callers, which
e.g. decrement references from the callout callbacks.

Add a new flag CS_MIGRBLOCK requesting report of the situation as
'successfully stopped'.

Reviewed by:	jhb (previous version)
Tested by:	cognet, pho
PR:	200992
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D5221
2016-03-02 18:46:17 +00:00
..
bus_if.m Introduce bus_get_bus_tag() method 2016-02-18 13:00:04 +00:00
capabilities.conf
clock_if.m
cpufreq_if.m
device_if.m
genassym.sh
imgact_aout.c Implement vsyscall hack. Prior to 2.13 glibc uses vsyscall 2016-01-09 20:18:53 +00:00
imgact_binmisc.c
imgact_elf32.c
imgact_elf64.c
imgact_elf.c When matching brand to the ELF binary by notes, try to find a brand 2016-02-04 20:55:49 +00:00
imgact_gzip.c
imgact_shell.c
inflate.c
init_main.c Rename P_KTHREAD struct proc p_flag to P_KPROC. 2016-02-09 16:30:16 +00:00
init_sysent.c
kern_acct.c
kern_alq.c
kern_clock.c
kern_clocksource.c
kern_condvar.c Use SCHEDULER_STOPPED() in cv_*wait*() instead of checking panicstr. 2016-03-01 22:51:44 +00:00
kern_conf.c Provide yet another KPI for cdev creation, make_dev_s(9). 2016-01-07 20:08:02 +00:00
kern_cons.c
kern_context.c
kern_cpu.c
kern_cpuset.c
kern_ctf.c
kern_descrip.c
kern_dtrace.c
kern_dump.c
kern_environment.c Allow a dynamic env to override a compiled-in static env by passing in the 2016-02-21 18:35:01 +00:00
kern_et.c
kern_event.c Ensure that we test the event condition when a disabled kevent is enabled. 2016-02-19 01:49:33 +00:00
kern_exec.c Correct a comment. 2016-03-01 23:58:53 +00:00
kern_exit.c session: avoid proctree lock on proc exit when possible 2016-01-20 23:33:58 +00:00
kern_fail.c
kern_ffclock.c
kern_fork.c Rename P_KTHREAD struct proc p_flag to P_KPROC. 2016-02-09 16:30:16 +00:00
kern_gzio.c
kern_hhook.c
kern_idle.c
kern_intr.c
kern_jail.c Fix jail name checking that disallowed anything that starts with '0'. 2015-12-15 17:25:00 +00:00
kern_khelp.c
kern_kthread.c Rename P_KTHREAD struct proc p_flag to P_KPROC. 2016-02-09 16:30:16 +00:00
kern_ktr.c Fix the logic in the ddb command 'show ktr /a'. Prior to r118269 it would 2016-01-31 17:32:20 +00:00
kern_ktrace.c ktrace: tidy up ktrstruct 2016-01-27 19:55:02 +00:00
kern_linker.c Create the MDT_PNP_INFO metadata record to communicate PNP info about 2015-12-11 05:27:53 +00:00
kern_lock.c
kern_lockf.c
kern_lockstat.c
kern_loginclass.c
kern_malloc.c Include sys/_task.h into uma_int.h, so that taskqueue.h isn't a 2016-02-09 20:22:35 +00:00
kern_mbuf.c Fix regression in r296242 affecting several drivers. For EXT_NET_DRV, 2016-03-02 02:12:01 +00:00
kern_mib.c Fix build after r295934. 2016-02-23 23:37:10 +00:00
kern_module.c
kern_mtxpool.c
kern_mutex.c
kern_ntptime.c
kern_numa.c
kern_osd.c
kern_physio.c Create an API to reset a struct bio (g_reset_bio). This is mandatory 2016-02-17 17:16:02 +00:00
kern_pmc.c
kern_poll.c
kern_priv.c
kern_proc.c Rename P_KTHREAD struct proc p_flag to P_KPROC. 2016-02-09 16:30:16 +00:00
kern_procctl.c
kern_prot.c Call crextend() before copying old credentials to the new credentials 2016-01-14 10:16:25 +00:00
kern_racct.c Rename P_KTHREAD struct proc p_flag to P_KPROC. 2016-02-09 16:30:16 +00:00
kern_rangelock.c
kern_rctl.c Fix the way RCTL handles rules' rrl_exceeded on credenials change. 2016-01-26 11:28:55 +00:00
kern_resource.c Implement process-shared locks support for libthr.so.3, without 2016-02-28 17:52:33 +00:00
kern_rmlock.c
kern_rwlock.c
kern_sdt.c
kern_sema.c
kern_sendfile.c New way to manage reference counting of mbuf external storage. 2016-03-01 00:17:14 +00:00
kern_sharedpage.c
kern_shutdown.c
kern_sig.c Add ptrace(2) reporting for LWP events. 2015-12-29 23:25:26 +00:00
kern_switch.c
kern_sx.c
kern_synch.c
kern_syscalls.c
kern_sysctl.c Evaluate the sysctl_running fail point before taking the sysctl lock. 2016-01-26 01:15:18 +00:00
kern_tc.c
kern_thr.c Add ptrace(2) reporting for LWP events. 2015-12-29 23:25:26 +00:00
kern_thread.c Call kern_thr_exit() instead of duplicating it. 2015-12-29 23:16:20 +00:00
kern_time.c Verify that tv_sec value specified in settimeofday() and clock_settime() 2015-12-27 15:37:07 +00:00
kern_timeout.c If callout_stop_safe() noted that the callout is currently executing, 2016-03-02 18:46:17 +00:00
kern_umtx.c Implement process-shared locks support for libthr.so.3, without 2016-02-28 17:52:33 +00:00
kern_uuid.c
kern_xxx.c
ksched.c
link_elf_obj.c Remove useless checks for NULL before calling free(9), in the kernel 2016-02-10 21:35:00 +00:00
link_elf.c Remove useless checks for NULL before calling free(9), in the kernel 2016-02-10 21:35:00 +00:00
linker_if.m
Make.tags.inc
Makefile
makesyscalls.sh
md4c.c
md5c.c
p1003_1b.c
pic_if.m [intrng] Migrate the intrng code from sys/arm/arm to sys/kern/subr_intr.c. 2015-12-18 05:43:59 +00:00
posix4_mib.c
sched_4bsd.c
sched_ule.c
serdev_if.m
stack_protector.c
subr_acl_nfs4.c
subr_acl_posix1e.c
subr_autoconf.c
subr_blist.c
subr_bufring.c
subr_bus_dma.c Fix a bug introduced in r291716: 2016-01-11 20:38:39 +00:00
subr_bus.c Introduce a RMAN_IS_DEFAULT_RANGE() macro, and use it. 2016-02-20 01:32:58 +00:00
subr_busdma_bufalloc.c
subr_capability.c
subr_clock.c
subr_counter.c
subr_devstat.c
subr_disk.c
subr_dummy_vdso_tc.c
subr_eventhandler.c
subr_fattime.c
subr_firmware.c
subr_hash.c
subr_hints.c
subr_intr.c Remove an alternative way for dealing with root interrupt controller 2016-03-01 11:27:58 +00:00
subr_kdb.c
subr_kobj.c
subr_lock.c
subr_log.c
subr_mbpool.c
subr_mchain.c These files were getting sys/malloc.h and vm/uma.h with header pollution 2016-02-01 17:41:21 +00:00
subr_module.c
subr_msgbuf.c
subr_param.c
subr_pcpu.c
subr_pctrie.c
subr_power.c
subr_prf.c
subr_prof.c
subr_rman.c Convert rman to use rman_res_t instead of u_long 2016-01-27 02:23:54 +00:00
subr_rtc.c
subr_sbuf.c
subr_scanf.c
subr_sfbuf.c
subr_sglist.c
subr_sleepqueue.c If callout_stop_safe() noted that the callout is currently executing, 2016-03-02 18:46:17 +00:00
subr_smp.c
subr_stack.c
subr_syscall.c Support an arbitrary number of arguments to DTrace syscall probes. 2015-12-17 00:00:27 +00:00
subr_taskqueue.c Remove taskqueue_enqueue_fast(). 2016-03-01 17:47:32 +00:00
subr_terminal.c
subr_trap.c
subr_turnstile.c Finish r173600. There is no need to test a condition if both cases 2016-02-10 21:16:37 +00:00
subr_uio.c
subr_unit.c
subr_vmem.c
subr_witness.c
sys_capability.c
sys_generic.c Improve error handling for posix_fallocate(2) and posix_fadvise(2). 2016-02-25 19:58:23 +00:00
sys_pipe.c
sys_procdesc.c
sys_process.c Add ptrace(2) reporting for LWP events. 2015-12-29 23:25:26 +00:00
sys_socket.c Refactor the AIO subsystem to permit file-type-specific handling and 2016-03-01 18:12:14 +00:00
syscalls.c
syscalls.master
systrace_args.c
sysv_ipc.c
sysv_msg.c
sysv_sem.c semget(): Check for [EEXIST] error first. 2016-02-07 22:12:39 +00:00
sysv_shm.c
tty_compat.c
tty_info.c
tty_inq.c
tty_outq.c
tty_pts.c
tty_tty.c
tty_ttydisc.c Don't clear the software flow control flag before draining for last 2016-01-26 14:46:39 +00:00
tty.c Don't clear the software flow control flag before draining for last 2016-01-26 14:46:39 +00:00
uipc_accf.c
uipc_debug.c Refactor the AIO subsystem to permit file-type-specific handling and 2016-03-01 18:12:14 +00:00
uipc_domain.c
uipc_mbuf2.c
uipc_mbuf.c New way to manage reference counting of mbuf external storage. 2016-03-01 00:17:14 +00:00
uipc_mbufhash.c
uipc_mqueue.c
uipc_sem.c
uipc_shm.c Implement process-shared locks support for libthr.so.3, without 2016-02-28 17:52:33 +00:00
uipc_sockbuf.c Refactor the AIO subsystem to permit file-type-specific handling and 2016-03-01 18:12:14 +00:00
uipc_socket.c Refactor the AIO subsystem to permit file-type-specific handling and 2016-03-01 18:12:14 +00:00
uipc_syscalls.c - Separate sendfile(2) implementation from uipc_syscalls.c into 2016-01-22 02:23:18 +00:00
uipc_usrreq.c Remove the errno argument from unp_drop(). 2016-02-26 12:46:34 +00:00
vfs_acl.c
vfs_aio.c Refactor the AIO subsystem to permit file-type-specific handling and 2016-03-01 18:12:14 +00:00
vfs_bio.c Minor grammar fix in comment. 2016-02-07 16:18:12 +00:00
vfs_cache.c Provide more correct sizing of the KVA consumed by a vnode, used by 2016-02-24 15:15:46 +00:00
vfs_cluster.c The bread() function was inconsistent about whether it would return 2016-01-27 21:23:01 +00:00
vfs_default.c Two fixes for excessive iterations after r292326. 2016-01-05 14:48:40 +00:00
vfs_export.c MFP r287070,r287073: split radix implementation and route table structure. 2016-01-25 06:33:15 +00:00
vfs_extattr.c
vfs_hash.c
vfs_init.c
vfs_lookup.c
vfs_mount.c Do not copy by field when converting struct oexport_args to struct 2016-02-04 16:32:21 +00:00
vfs_mountroot.c
vfs_subr.c Provide more correct sizing of the KVA consumed by a vnode, used by 2016-02-24 15:15:46 +00:00
vfs_syscalls.c Improve error handling for posix_fallocate(2) and posix_fadvise(2). 2016-02-25 19:58:23 +00:00
vfs_vnops.c The struct file f_advice member is overlaid with the devfs f_cdevpriv 2016-01-22 20:35:20 +00:00
vnode_if.src A change to KPI of vm_pager_get_pages() and underlying VOP_GETPAGES(). 2015-12-16 21:30:45 +00:00