freebsd-dev/sys/vm
Alex Richardson fa2528ac64 Use atomic loads/stores when updating td->td_state
KCSAN complains about racy accesses in the locking code. Those races are
fine since they are inside a TD_SET_RUNNING() loop that expects the value
to be changed by another CPU.

Use relaxed atomic stores/loads to indicate that this variable can be
written/read by multiple CPUs at the same time. This will also prevent
the compiler from doing unexpected re-ordering.

Reported by:	GENERIC-KCSAN
Test Plan:	KCSAN no longer complains, kernel still runs fine.
Reviewed By:	markj, mjg (earlier version)
Differential Revision: https://reviews.freebsd.org/D28569
2021-02-18 14:02:48 +00:00
..
_vm_phys.h vm_phys: Try to clean up NUMA KPIs 2020-11-19 03:59:21 +00:00
_vm_radix.h
default_pager.c vm: clean up empty lines in .c and .h files 2020-09-01 21:20:45 +00:00
device_pager.c
memguard.c vm: clean up empty lines in .c and .h files 2020-09-01 21:20:45 +00:00
memguard.h LinuxKPI: Implement ksize() function. 2020-08-29 19:26:31 +00:00
phys_pager.c Allow consumer to customize physical pager. 2020-09-09 00:00:43 +00:00
pmap.h Add pmap_enter(9) PMAP_ENTER_LARGEPAGE flag and implement it on amd64. 2020-09-09 21:50:24 +00:00
redzone.c vm: clean up empty lines in .c and .h files 2020-09-01 21:20:45 +00:00
redzone.h
sg_pager.c vm: clean up empty lines in .c and .h files 2020-09-01 21:20:45 +00:00
swap_pager.c Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
swap_pager.h
uma_core.c uma: Avoid unmapping direct-mapped slabs 2021-01-03 11:50:31 -05:00
uma_dbg.c
uma_dbg.h
uma_int.h uma: Remove the MINBUCKET flag from the flag name list 2020-12-27 17:01:33 -05:00
uma.h uma: Make uma_zone_set_maxcache() work better with small limits 2020-12-06 22:45:50 +00:00
vm_domainset.c Add interruptible variant of vm_wait(9), vm_wait_intr(9). 2020-09-08 23:28:09 +00:00
vm_domainset.h Add interruptible variant of vm_wait(9), vm_wait_intr(9). 2020-09-08 23:28:09 +00:00
vm_dumpset.h Avoid dump_avail[] redefinition. 2020-10-14 22:51:40 +00:00
vm_extern.h Remove the VM map zone. 2020-08-17 13:02:01 +00:00
vm_fault.c Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
vm_glue.c vmspace: Convert to refcount(9) 2020-11-04 16:30:56 +00:00
vm_init.c Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
vm_kern.c Add a VM flag to prevent reclaim on a failed contig allocation 2021-02-03 16:16:51 -05:00
vm_kern.h Remove the VM map zone. 2020-08-17 13:02:01 +00:00
vm_map.c vm_map_protect(): remove not needed recalculations of new_prot, new_maxprot 2021-01-14 10:02:43 +02:00
vm_map.h vm_map_protect: allow to set prot and max_prot in one go. 2021-01-13 01:35:22 +02:00
vm_meter.c Use atomic loads/stores when updating td->td_state 2021-02-18 14:02:48 +00:00
vm_mmap.c Rename kern_mmap_req to kern_mmap 2021-01-25 21:50:37 +00:00
vm_object.c Allow consumer to customize physical pager. 2020-09-09 00:00:43 +00:00
vm_object.h Allow consumer to customize physical pager. 2020-09-09 00:00:43 +00:00
vm_page.c vm: Honour the "noreuse" flag to vm_page_unwire_managed() 2021-02-10 11:10:27 -05:00
vm_page.h Add a VM flag to prevent reclaim on a failed contig allocation 2021-02-03 16:16:51 -05:00
vm_pageout.c vm_pageout: Avoid rounding down the inactive scan target 2020-10-02 19:16:06 +00:00
vm_pageout.h Add interruptible variant of vm_wait(9), vm_wait_intr(9). 2020-09-08 23:28:09 +00:00
vm_pagequeue.h vm_phys: Try to clean up NUMA KPIs 2020-11-19 03:59:21 +00:00
vm_pager.c Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
vm_pager.h Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
vm_param.h
vm_phys.c vm_phys: Try to clean up NUMA KPIs 2020-11-19 03:59:21 +00:00
vm_phys.h vm_phys: Try to clean up NUMA KPIs 2020-11-19 03:59:21 +00:00
vm_radix.c vm: clean up empty lines in .c and .h files 2020-09-01 21:20:45 +00:00
vm_radix.h
vm_reserv.c vm_phys: Try to clean up NUMA KPIs 2020-11-19 03:59:21 +00:00
vm_reserv.h
vm_swapout_dummy.c
vm_swapout.c
vm_unix.c Prepare to handle non-trivial errors from vm_map_delete(). 2020-09-09 21:34:31 +00:00
vm.h Add a VA_IS_CLEANMAP() macro. 2021-02-17 16:32:11 -08:00
vnode_pager.c Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
vnode_pager.h