This is basically cribbed from regular serial ports, and just adds
hooks to call the pps support routines.
Also, note in the ucom(4) man page that there is about 1 ms of
latency. Discussed on tech-kern in October of 2013, with the only
concern being that someone who didn't know what they were doing might
set up a stratum 1 server, and that somehow might have worse
timekeeping than whatever else that person might have done; the man
page comment is a mitigation for this.
This patch has been live-tested in netbsd-5/i386 and netbsd-6/i386,
and has been running on machines without a USB-serial GPS device for
most of a year with no adverse consequences (very little happens if
the PPS ioctls are not invoked).
Somehow, options(4) ended up with a bizarre claim that DIAGNOSTIC can
reduce performance by 15%. While that might have been true at some
isolated point due to a bug, it's an outlier. Since at least 2BSD,
DIAGNOSTIC has added asserts, resulting in at most
difficult-to-perceived performance degredation, and many people have
been running production systems (meaning systems they intend to use,
rather than debugging targets) with this option. (The decision a
while ago to enable DIAGNOSTIC in -current's GENERIC reflects this; if
it really were a 15% hit such enabling by default would be unreasonable.)
- Implement support for the asynchronous IPI calls.
- Rework synchronous IPI code to reuse the asynchronous mechanism.
- Add ipi(9) manual page; needs wizd(8).
Note: MD code can now provide a low level primitive for the ipi(9) and
reuse this interface instead of open-coding. Portmasters are encouraged
to convert. Ride 6.99.43!
need to vget() vnodes that we are not interested at, and optimize locking
a bit. Iterator changes reviewed by Hannken (thanks), the rest of the bugs
are mine.
Mention that uvm_map doesn't add a reference to uobj. Evidently this
information is important, since I just wasted countless hours over
the past months investigating kernel memory corruption arising from a
failure to notice this fact.
- Remove PCU_KERNEL (hi matt!) and significantly simplify the code.
This experimental feature was tried on ARM did not meet the expectations.
It may be revived one day, but it should be done in a much simpler way.
- Add a message structure for xcall function, pass the LWP ower and thus
optimise a race condition: if LWP is discarding its state on a remote CPU,
but another LWP already did it - do not cause an unecessary re-faulting.
- Reduce the variety of flags for PCU operations (only PCU_VALID and
PCU_REENABLE are used now), pass them only to the pcu_state_load().
- Rename pcu_used_p() to pcu_valid_p(); hopefully it is less confusing.
- pcu_save_all_on_cpu: SPL ought to be used here.
- Update and improve the pcu(9) man page; it needs wizd(8) though.
This variable separates CTF stuffs from MKDTRACE; we can build DTrace
solely without building and using them. This allows us to use DTrace
even if CTF stuffs have problems (actually they have now).
This variable would be merged into MKDTRACE eventually, once CTF stuffs
work correctly again.
these are FFS options. (QUOTA2 also works with mfs. AFAIK, traditional
quotas don't.)
Don't refer to QUOTA2 as "the new quotas format" as "new" is not a
good long-term identifier.
Also, don't xref half the quota utilities; there's no need to.
vfs_vnode_iterator_*(), remove them.
Document vfs_vnode_iterator_*().
Make VI_MARKER private to vfs_vnode.c, vfs_mount.c and unfortunately
to ufs/lfs/lfs_segment.c.
Welcome to 6.99.37
caller has to care about list and vnode mutexes, reference count being zero,
intermediate vnode states like VI_CLEAN, VI_XLOCK, VI_MARKER and so on.
Add an interface to iterate over a vnode list:
void vfs_vnode_iterator_init(struct mount *mp, struct vnode_iterator **marker)
void vfs_vnode_iterator_destroy(struct vnode_iterator *marker)
bool vfs_vnode_iterator_next(struct vnode_iterator *marker, struct vnode **vpp)
vfs_vnode_iterator_next() returns either "false / *vpp == NULL" when done
or "true / *vpp != NULL" to return the next referenced vnode from the list.
To make vrecycle() work in this environment change it to
bool vrecycle(struct vnode *vp)
where "vp" is a referenced vnode to be destroyed if this is the last reference.
Discussed on tech-kern.
Welcome to 6.99.34
the vnode operations vector for active vnodes is unsafe because it
is not known whether deadfs or the original file system will be
called.
- Pass down LK_RETRY to the lock operation (hint for deadfs only).
- Change deadfs lock operation to return ENOENT if LK_RETRY is unset.
- Change all other lock operations to check for dead vnode once
the vnode is locked and unlock and return ENOENT in this case.
With these changes in place vnode lock operations will never succeed
after vclean() has marked the vnode as VI_XLOCK and before vclean()
has changed the operations vector.
Adresses PR kern/37706 (Forced unmount of file systems is unsafe)
Discussed on tech-kern.
Welcome to 6.99.33
relative to uname output when running in emulations: the magic links
are *not* affected even though uname output changes.
(This means @machine magic links can be used for e.g. amd64 vs. i386
device nodes. There's also an @emul magic link for emulation.)
Noted by apb.
since there is no definition of CRYPTO_ALGORITHM_ALL!
XXX The description of the arguments for crypto_register() needs further
updates, too, but that will be left for another day.