Commit Graph

274326 Commits

Author SHA1 Message Date
sevan
dcde438ba5 Add K&R publish date
https://twitter.com/MIT_CSAIL/status/1231263883303645184
2020-02-24 00:02:55 +00:00
sevan
ee58edef94 Add The KLF's Chill Out 2020-02-23 23:56:15 +00:00
ad
3b5c9f3eb7 Fix a comment. 2020-02-23 23:54:52 +00:00
sevan
4ad7b96cbd bsd-family-tree 2020-02-23 23:32:57 +00:00
sevan
6c3061a7d9 Sync with r358264 which fixes NetBSD 9.0 release 2020-02-23 23:31:55 +00:00
ad
e3b9ca63b1 Mistake in previous - lwp_t *l was not meant to be static. 2020-02-23 22:56:41 +00:00
ad
abdb581126 The PV locking changes are expensive and not needed yet, so back them
out for the moment.  I want to find a cheaper approach.
2020-02-23 22:28:53 +00:00
ad
48276a61e1 Regen. 2020-02-23 22:15:18 +00:00
ad
926b25e154 Merge from ad-namecache:
- Have a stab at clustering the members of vnode_t and vnode_impl_t in a
  more cache-conscious way.  With that done, go back to adjusting v_usecount
  with atomics and keep vi_lock directly in vnode_impl_t (saves KVA).

- Allow VOP_LOCK(LK_NONE) for the benefit of VFS_VGET() and VFS_ROOT().
  Make sure LK_UPGRADE always comes with LK_NOWAIT.

- Make cwdinfo use mostly lockless.
2020-02-23 22:14:03 +00:00
jdolecek
97e9007d62 disable the DEBUG bridge_calc_csum_flags() printf 2020-02-23 21:50:21 +00:00
ad
bcbc27bb2d Use rw_lock_op(). 2020-02-23 21:36:29 +00:00
ad
f340434d23 +EINVAL 2020-02-23 20:41:41 +00:00
plunky
43690d4aea fix reversed logic for Remote Port Negotiation, pointed out by maxv@ 2020-02-23 20:16:10 +00:00
ad
5d7e3f8793 shutdown_all: take kernel_lock now that kern_reboot() doesn't. 2020-02-23 20:08:35 +00:00
ad
566d645518 - If concurrent calls to kern_reboot(), only let the first do the deed.
- Don't need kernel_lock for this (either OK, or suspendsched() called).
2020-02-23 20:06:30 +00:00
ad
6f6fffb616 Adjustment to previous: TP_SET_DONE() was wiping out the VA to shoot,
instead of ORing the flag into the array element.  This caused the CPU
initiating the shootdown to occasionally miss an INVLPG.
2020-02-23 18:57:28 +00:00
ad
9c4853d61e kpause(): is only awoken via timeout or signal, so use SOBJ_SLEEPQ_NULL like
_lwp_park() does, and dispense with the hashed sleepq & lock.
2020-02-23 16:27:09 +00:00
ad
ee5d410f0a NetBSD 9.99.48 - UVM locking changes 2020-02-23 16:04:58 +00:00
ad
6bbef11ebd Don't bother with kernel_lock for kern_reboot(). 2020-02-23 15:57:09 +00:00
ad
d2a0ebb67a UVM locking changes, proposed on tech-kern:
- Change the lock on uvm_object, vm_amap and vm_anon to be a RW lock.
- Break v_interlock and vmobjlock apart.  v_interlock remains a mutex.
- Do partial PV list locking in the x86 pmap.  Others to follow later.
2020-02-23 15:46:38 +00:00
riastradh
dae5db4041 Fix missing <sys/evcnt.h> by removing the evcnts instead.
Just wanted to confirm that a race might happen, and indeed it did.
These serve little diagnostic value otherwise.
2020-02-23 15:23:08 +00:00
skrll
b49d257140 G/C l1pte_pgindex 2020-02-23 15:12:18 +00:00
riastradh
2d468aafe8 Fix userland references to LFS_ORPHAN_NEXTFREE.
Forgot to grep for these or do a full distribution build, oops!
2020-02-23 15:11:33 +00:00
ad
82cfa75987 Fix !DIAGNOSTIC compile 2020-02-23 15:09:55 +00:00
martin
25565a0d85 Do not replay the msgbuf if we are booting silent or quiet. 2020-02-23 14:44:23 +00:00
mrg
ca82237625 updates for xkeyboard-config 2.29. 2020-02-23 11:17:03 +00:00
jmcneill
55db4fad0c RPi4 has a different root device, so use config.txt conditionals to load
an alternate cmdline txt file (cmdline-pi4.txt) on these boards.
2020-02-23 10:56:03 +00:00
roy
a0b4f4b376 ramdisk-zfsroot: We no longer need to have /etc/zfs in mtree
Now that mountall doesn't rely on /etc/zfs/zpool.cache being present.
2020-02-23 10:51:12 +00:00
skrll
8288919360 typo in comment 2020-02-23 10:30:43 +00:00
mrg
7d2bf6fde2 update for xorg-server 1.20.6. 2020-02-23 10:28:16 +00:00
skrll
8a66d04662 type in comment 2020-02-23 10:22:07 +00:00
kamil
21056e8a10 Change the previous cast from unsigned int to unsigned long
This code produces the same result and is consistent with the previous
lines. Only the least significant 16 bites (unsigned short) are meaningful.
2020-02-23 09:53:42 +00:00
mrg
492a651915 fix libXfont2 build, and (for now) remove new XvMCW pkg-config file. 2020-02-23 09:24:12 +00:00
mrg
6d597ebfc7 find the moved header. 2020-02-23 09:14:05 +00:00
mrg
1258266dea updates for xorgproto 2019.2, libX11 1.6.9, and libXvMC 1.0.12. 2020-02-23 09:10:50 +00:00
mrg
0cf113e74f install rw_lock_op link too. 2020-02-23 08:57:44 +00:00
riastradh
ebc45b4b1c Simplify some branches and kassert some redundant assignments. 2020-02-23 08:54:55 +00:00
riastradh
ad0054ce45 Fix mistake in use of usbd_xfer_schedule_timeout in motg.
This code path is used both for xfers that are new, and xfers that
are being done piece by piece and are partway done.  For the latter
case, skip usbd_xfer_schedule_timeout so we schedule it only once per
xfer.
2020-02-23 08:54:47 +00:00
riastradh
88079b1878 If zfs=YES, unconditioally do zfs mount/unmount -a.
If you set zfs=YES, presumably you positively want the automatic rc.d
actions, so if there's no /sbin/zfs or if zfs can't find pools with
/etc/zfs/zpool.cache, presumably you would like feedback about that
in rc.log.
2020-02-23 08:53:25 +00:00
riastradh
d3b9fe60e3 Allow random seed on zfs. 2020-02-23 08:53:14 +00:00
riastradh
9bf4680916 Dust off the orphan detection code and try to make it work. 2020-02-23 08:49:46 +00:00
riastradh
e70bb021e4 Teach LFS_ORPHAN_NEXTFREE about lfs64. 2020-02-23 08:49:34 +00:00
riastradh
3c3d9e7441 lfs_writer_enter can't fail; keep it simple and don't pretend it can.
Assert that mtsleep can't fail either -- it doesn't catch signals and
there's no timeout.
2020-02-23 08:42:53 +00:00
riastradh
4050a37c21 Call lfs_orphan in lfs_rename while we're still in the dirop. 2020-02-23 08:41:07 +00:00
riastradh
a9744ff05b In lfs_update, hold lfs_writer around lfs_vflush.
Otherwise, we might do

lfs_vflush
-> lfs_seglock
-> lfs_segwait(SEGM_CKP)
   -> lfs_writer_enter

which is the reverse of the lfs_writer -> lfs_seglock ordering.
2020-02-23 08:40:58 +00:00
riastradh
c61699ee03 Initialize/destroy lfs_allclean_wakeup in modcmd, not lfs_mountfs.
Fixes reloading lfs.kmod.
2020-02-23 08:40:49 +00:00
riastradh
5fc5b9096e Break deadlock in PR kern/52301.
The lock order is lfs_writer -> lfs_seglock.  The problem in 52301 is
that lfs_segwrite violates this lock order by sometimes doing
lfs_seglock -> lfs_writer, either (a) when doing a checkpoint or (b),
opportunistically, when there are no dirops pending.  Both cases can
deadlock, because dirops sometimes take the seglock (lfs_truncate,
lfs_valloc, lfs_vfree):

(a) There may be dirops pending, and they may be waiting for the
seglock, so we can't wait for them to complete while holding the
seglock.

(b) The test for fs->lfs_dirops == 0 happens unlocked, and the state
may change by the time lfs_writer_enter acquires lfs_lock.

To resolve this in each case:

(a) Do lfs_writer_enter before lfs_seglock, since we will need it
unconditionally anyway.  The worst performance impact of this should
be that some dirops get delayed a little bit.

(b) Create a new lfs_writer_tryenter to use at this point so that the
test for fs->lfs_dirops == 0 and the acquisition of lfs_writer happen
atomically under lfs_lock.
2020-02-23 08:40:37 +00:00
riastradh
a46b1bb766 Don't lfs_writer_enter while holding v_interlock.
There's no need to lfs_writer_enter at all here, as far as I can see.
lfs_flush_fs will do it for us.
2020-02-23 08:40:27 +00:00
riastradh
f938420086 Take a reference and fix assertions in lfs_flush_dirops.
Fixes panic:

KASSERT((ip->i_state & IN_ADIROP) == 0) at lfs_vnops.c:1670
lfs_flush_dirops
lfs_check
lfs_setattr
VOP_SETATTR
change_mode
sys_fchmod
syscall

This assertion -- and the assertion that vp->v_uflag has VU_DIROP set
-- is valid only until we release lfs_lock, because we may race with
lfs_unmark_dirop which will remove the nodes and change the flags.

Further, vp itself is valid only as long as it is referenced, which it
is as long as it's on the dchain, but lfs_unmark_dirop drops the
dchain's reference.
2020-02-23 08:40:19 +00:00
riastradh
49692a124e Change some cheap KDASSERT into KASSERT. 2020-02-23 08:40:08 +00:00