OpenBSD cvs log

created 2020-07-28T21:29:58Z
begin 2020-05-30T00:00:00Z
end 2020-05-31T00:00:00Z
path src/sys
commits 3

date 2020-05-30T09:01:04Z
author feinerer
files src/sys/dev/usb/uvideo.c log diff annotate
message Fix UVIDEO_DEBUG build

Include sys/proc.h to address following errors:

/usr/src/sys/dev/usb/uvideo.c:2901:31: error: incomplete definition of type 'struct proc'
vn_close(nd.ni_vp, FWRITE, p->p_ucred, p);
~^
/usr/src/sys/sys/types.h:223:8: note: forward declaration of 'struct proc'
struct proc;
^
/usr/src/sys/dev/usb/uvideo.c:2925:40: error: incomplete definition of type 'struct proc'
UIO_SYSSPACE, IO_APPEND|IO_UNIT, p->p_ucred, NULL, p);
~^
/usr/src/sys/sys/types.h:223:8: note: forward declaration of 'struct proc'
struct proc;
^
2 errors generated.

ok mpi@

date 2020-05-30T14:10:17Z
author mpi
files src/sys/kern/kern_event.c log diff annotate
message Introduce kqueue_terminate() & kqueue_free(), no functional changes.

These functions will be used to managed per-thread kqueues that are not
associated to a file descriptor.

ok visa@

date 2020-05-30T14:42:59Z
author solene
files src/sys/kern/sched_bsd.c log diff annotate
message In automatic performance mode on systems with offline CPUs because of SMT
mitigation the algorithm was still accounting the offline CPUs, leading to
a code path that would never be reached.

This should allow better frequency scaling on systems with many CPUs.
The frequency should scale up if one of two condition is true.
- if at least one CPU has less than 25% of idle cpu time
- if the average of all idle time is under 33%

The second condition was never met because offline CPU are always accounted as
100% idle.

A bit more explanations about the auto scaling in case someone want to improve
this later: When one condition is met, CPU frequency is set to maximum and a
counter set to 5, then the function will be run again 100ms later and decrement
the counter if both conditions are not met anymore. Once the counter reach 0
the frequency is set to minimum. This mean that it can take up to 100ms to
scale up and up to 500ms to scale down.

ok brynet@
looks good tedu@