Commit Graph

271808 Commits

Author SHA1 Message Date
ad ce41050c72 Regen. 2019-12-01 13:46:34 +00:00
ad c03599c0cd Make nc_hittime volatile to defeat compiler cleverness. 2019-12-01 13:45:42 +00:00
ad 566436656a namecache changes:
- Delete the per-entry lock, and borrow the associated vnode's v_interlock
  instead.  We need to acquire it during lookup anyway.  We can revisit this
  in the future but for now it's a stepping stone, and works within the
  quite limited context of what we have (BSD namecache/lookup design).

- Implement an idea that Mateusz Guzik (mjg@FreeBSD.org) gave me.  In
  cache_reclaim(), we don't need to lock out all of the CPUs to garbage
  collect entries.  All we need to do is observe their locks unheld at least
  once: then we know they are not in the critical section, and no longer
  have visibility of the entries about to be garbage collected.

- The above makes it safe for sysctl to take only namecache_lock to get stats,
  and we can remove all the crap dealing with per-CPU locks.

- For lockstat, make namecache_lock a static now we have __cacheline_aligned.

- Avoid false sharing - don't write back to nc_hittime unless it has changed.
  Put a a comment in place explaining this.  Pretty sure this was there in
  2008/2009 but someone removed it (understandably, the code looks weird).

- Use a mutex to protect the garbage collection queue instead of atomics, and
  adjust the low water mark up so that cache_reclaim() isn't doing so much
  work at once.
2019-12-01 13:39:53 +00:00
ad 036b61e0aa PR port-sparc/54718 (sparc install hangs since recent scheduler changes)
- sched_tick: cpu_need_resched is no longer the correct thing to do here.
  All we need to do is OR the request into the local ci_want_resched.

- sched_resched_cpu: we need to set RESCHED_UPREEMPT even on softint LWPs,
  especially in the !__HAVE_FAST_SOFTINTS case, because the LWP with the
  LP_INTR flag could be running via softint_overlay() - i.e. it has been
  temporarily borrowed from a user process, and it needs to notice the
  resched after it has stopped running softints.
2019-12-01 13:20:42 +00:00
maxv 43e684e6ce minor adjustments, to avoid warnings on debug builds 2019-12-01 12:47:10 +00:00
ad 106905eaf9 sh3: make ASTs work as expected, and fix a few things in the TLB refill path.
With help from uwe@ and martin@.
2019-12-01 12:19:28 +00:00
martin ef330e1237 Add missing <sys/atomic.h> include 2019-12-01 10:19:59 +00:00
maxv 97b908dcc6 localify 2019-12-01 08:23:09 +00:00
maxv f0ea087db1 Use atomic_{load,store}_relaxed() on global counters. 2019-12-01 08:19:09 +00:00
msaitoh 76fbad7623 Use unsigned to avoid undefined behavoir. Found by kUBSan. 2019-12-01 08:16:49 +00:00
maxv 890f284aec Add KCSAN instrumentation for atomic_{load,store}_*. 2019-12-01 08:15:58 +00:00
tkusumi 653d42cec2 dm: Remove unused dm_dev::dev_type
Given OOP-like architecture of dm target device structure,
dm_dev doesn't need to have self contained target type field,
and in fact this is unused.
2019-12-01 06:53:31 +00:00
ad cd42a162f3 Make owtemp reliable for me:
- Don't do the calculation if there is a CRC error.
- If we get any kind of error during a refresh, retry up to three times.
- Add event counters to report what's going on.
2019-11-30 23:06:52 +00:00
ad e7a559b613 onewire:
- Re-do the signalling to be a little more forgiving and efficient.
- If bus reset fails during probe, try a second time.
- Spread out kernel threads for many busses to avoid thundering herd effect.
2019-11-30 23:04:12 +00:00
rin f2a119be2e Fix 'nm /dev/ksyms' (noticed by ryo).
Since binutils 2.15, nm(1) cannot be used for character devices.
We worked around this by a local patch:

http://cvsweb.netbsd.org/bsdweb.cgi/src/gnu/dist/binutils/binutils/Attic/bucomm.c?r1=1.1.1.2&hideattic=0#rev1.2

With recent update of binutils, 'nm /dev/ksyms' got broken again.
This is due to a consistency check involving file size reported by
stat(2), which is always zero for character devices. So, skip this
check if file size is zero.
2019-11-30 22:50:11 +00:00
ad b8a643bb0c VOP_UNLOCK + vrele -> vput 2019-11-30 20:45:49 +00:00
ad fa59dd0745 Avoid false sharing: only update spc_curpriority if value has changed. 2019-11-30 17:49:03 +00:00
ad 7c5ec3d88a Mark spc_curpriority volatile. 2019-11-30 17:46:27 +00:00
ad 50155dc3fe Mark the context switch counters volatile (because preemption). 2019-11-30 17:45:54 +00:00
riastradh 253998d4ec Need <sys/atomic.h> for atomic_inc_64.
Emptying out <machine/rwlock.h> had the side effect of removing an
implied #include <sys/atomic.h>.
2019-11-30 16:23:46 +00:00
ad 871eb78a49 Revert previous. Looks like it requires a more extensive fix. 2019-11-30 15:53:36 +00:00
riastradh d3e66d8dcb Nix vestigial references to MUTEX_GIVE and MUTEX_RECEIVE in comments. 2019-11-30 15:34:07 +00:00
ad 2936562466 Back out previous. It works on amd64 under stress test but not
evbarm-aarch64 for some reason.  Will revisit.
2019-11-30 14:21:16 +00:00
jmcneill 652b35568f Use SMBIOS system vendor and product strings to create a "model" string
for the root node in the fabricated ACPI device tree, when possible.
2019-11-30 13:02:18 +00:00
sevan 6a06501a8d Sort 2019-11-30 12:04:13 +00:00
sevan 5e5625998c Add Grace Hopper and Richard Feynman 2019-11-30 11:42:54 +00:00
tkusumi 8d37112942 dm: Always initialize target's status string
Explicitly clear status string to prevent dmsetup(8) from
printing binary junk to stdout. Similar change has been
applied to DragonFlyBSD since 2015.

a6cf54187f

taken-from: DragonFlyBSD
2019-11-30 05:35:57 +00:00
nonaka b1cd110933 Prevent panic when attaching genfb if using a serial console with Hyper-V Gen.2. 2019-11-30 05:28:28 +00:00
pgoyette 22f5562b74 Add the new unit-tests for make(1) to the sets list, fixing the build. 2019-11-30 04:06:22 +00:00
rillig ae7e2b2bd5 Demonstrate some more edge cases for the :M modifier 2019-11-30 03:53:45 +00:00
rillig e4645487ec Fix unit test for edge case in :M modifier 2019-11-30 02:55:47 +00:00
riastradh 560cfcce81 Use .Sy, not .Em, for bold-faced WARNING of impending doom.
Underline and, worse, italic aren't as good at catching the eye.
2019-11-30 02:47:14 +00:00
riastradh 4ff9c3de4a Document relation to atomic_ops(3) and membar_ops(3). 2019-11-30 02:38:44 +00:00
rillig 2940fc42de Ignore temporary files from running the unit tests 2019-11-30 02:35:28 +00:00
rillig e4b4cc0e9c Add another unit test for the :M modifier 2019-11-30 02:31:19 +00:00
riastradh 44366f2bcd Document xc_barrier. 2019-11-30 02:22:23 +00:00
rillig 5ed433bfe1 Add unit tests for variable modifiers like :M and :N 2019-11-30 00:38:51 +00:00
uwe 3a8509388f Improve table of contents.
For .txt and .more drop meaningless page numbers, those formats are
not paginated (with all due respect to line printers, 80s are over).

For .ps use actual formatting with proportional font and properly
aligned page numbers.  Thanks to kre@ for his help with some of the
darker corners of troff (with all due respect to my 80s self, he/I
should have paid more attention).
2019-11-30 00:28:27 +00:00
riastradh 845417da2c Missed another spot.
Marked mb.9 obsolete but forgot to mark mb_memory.9 &c. too.
2019-11-30 00:02:15 +00:00
riastradh 398a51e047 Nix now-unused definitions of MUTEX_GIVE/MUTEX_RECEIVE. 2019-11-29 22:55:33 +00:00
riastradh be06bc7780 Missed a spot: delete mb.9 from MLINKS too. 2019-11-29 22:38:28 +00:00
riastradh 86f9decda4 New atomic load/store operations for the kernel.
Guarantee no fusing and no tearing, and can optionally impose
ordering relative to other memory operations.

Unordered:
- atomic_load_relaxed
- atomic_store_relaxed

Ordered:
- atomic_load_acquire
- atomic_load_consume
- atomic_store_release

These are intended to match C11 semantics, and can be defined in
terms of the C11 atomic API when ready.
2019-11-29 22:17:23 +00:00
jmcneill 62921ac368 Add tiwdt 2019-11-29 20:54:17 +00:00
jmcneill 963b86d431 Add TI OMAP watchdog timer driver. 2019-11-29 20:54:00 +00:00
ad c5154900d0 A couple more tweaks to avoid reading the lock word. 2019-11-29 20:50:54 +00:00
riastradh bb04fd03e6 Nix obsolete mb(9) man page. 2019-11-29 20:31:35 +00:00
riastradh 63d8b25a63 Nix mb_* on vax. 2019-11-29 20:06:44 +00:00
riastradh 445d23458a Nix mb_* on sparc and sparc64. 2019-11-29 20:06:34 +00:00
riastradh 47bbf2f62d Nix mb_* on sh3. 2019-11-29 20:06:08 +00:00
riastradh a1dc5c4d23 Nix mb_* on powerpc. 2019-11-29 20:05:59 +00:00