OpenBSD cvs log

created 2018-11-30T05:27:02Z
begin 2018-09-26T00:00:00Z
end 2018-09-27T00:00:00Z
path src/sys
commits 5

date 2018-09-26T03:05:53Z
author deraadt
files src/sys/arch/amd64/amd64/cpu.c log diff annotate
message Increase the timeout from previous commit further. Rather than warning
we have spun out (to which there are consequences), we should spin longer.
The BSP really wants the APs to finish.

date 2018-09-26T11:50:42Z
author mpi
files src/sys/net/if.c log diff annotate
src/sys/net/if_bridge.c log diff annotate
message Move bridge input/output paths outside of the KERNEL_LOCK().

Tested by Hrvoje Popovski who measured a 30% improvement of forwarded
packets in the best case.

ok visa@

date 2018-09-26T14:51:44Z
author visa
files src/sys/isofs/cd9660/cd9660_vfsops.c log diff annotate
src/sys/kern/vfs_subr.c log diff annotate
src/sys/kern/vfs_syscalls.c log diff annotate
src/sys/sys/mount.h log diff annotate
src/sys/ufs/ext2fs/ext2fs_vfsops.c log diff annotate
src/sys/ufs/ffs/ffs_vfsops.c log diff annotate
message Move the allocating and freeing of mount points into
dedicated functions.

OK deraadt@ mpi@

date 2018-09-26T14:58:16Z
author visa
files src/sys/arch/loongson/loongson/yeeloong_machdep.c log diff annotate
message Fix controller name.

date 2018-09-26T17:23:13Z
author cheloha
files src/sys/kern/kern_sched.c log diff annotate
src/sys/kern/kern_sysctl.c log diff annotate
src/sys/sys/sched.h log diff annotate
message KERN_CPTIME2: set ENODEV if the CPU is offline.

This lets userspace distinguish between idle CPUs and those that are
not schedulable because hw.smt=0.

A subsequent commit probably needs to add documentation for this
to sysctl.2 (and perhaps elsewhere) after the dust settles.

Also included here are changes to systat(1) and top(1) that account
for the ENODEV case and adjust behavior accordingly:

- systat(1)'s cpu view prints placeholder marks ('-') instead of
percentages for each state if the given CPU is offline.

- systat(1)'s vmstat view checks for offline CPUs when computing the
machine state total and excludes them, so the CPU usage graph
only represents the states for online CPUs.

- top(1) does not draw CPU rows for offline CPUs when the view is
redrawn. If CPUs "go offline", percentages for each state are
replaced by placeholder marks ('-'); the view will need to be
redrawn to remove these rows. If CPUs "go online" the view will
need to be redrawn to show these new CPUs. In "combined CPU" mode,
the count and the state totals only represent online CPUs.

Ports using KERN_CPTIME2 will need to be updated. The changes
described above to make systat(1) and top(1) aware of the ENODEV
case *and* gracefully handle a changing HW_NCPUONLINE while the
application is running are not necessarily appropriate for each
and every port.

The changes described above are so extensive in part to demonstrate
one way a program *might* be made robust to changing CPU availability.
In particular, changing hw.smt after boot is an extremely rare event,
and this needs to be weighed when updating ports.

The logic needed to account for the KERN_CPTIME2 ENODEV case is
very roughly:

if (sysctl(...) == -1) {
if (errno != ENODEV) {
/* Actual error occurred. */
} else {
/* CPU is offline. */
}
} else {
/* CPU is online and CPU states were set by sysctl(2). */
}

Prompted by deraadt@. Basic idea for ENODEV from kettenis@. Discussed at
length with kettenis@. Additional testing by tb@.

No complaints from hackers@ after a week.

ok kettenis@, "I think you should commit [now]" deraadt@