OpenBSD cvs log

created 2022-11-23T16:34:41Z
begin 2022-11-19T00:00:00Z
end 2022-11-20T00:00:00Z
path src/sys
commits 5

date 2022-11-19T14:26:39Z
author kn
files src/sys/kern/sys_socket.c log diff annotate
message Push kernel lock into pru_control() aka. in6_control() / in_control()

so->so_state is already read without kernel lock inside soo_ioctl()
which calls pru_control() aka in6_control() and in_control().

OK mvs

date 2022-11-19T14:26:40Z
author kn
files src/sys/netinet/in.c log diff annotate
src/sys/netinet6/in6.c log diff annotate
message Push kernel lock into pru_control() aka. in6_control() / in_control()

so->so_state is already read without kernel lock inside soo_ioctl()
which calls pru_control() aka in6_control() and in_control().

OK mvs

date 2022-11-19T15:12:38Z
author mvs
files src/sys/net/if_pppx.c log diff annotate
message Decrease netlock pressure in pppx(4).

Push netlock down to pppx_add_session(). The 'pppx_if' structure has
the `pxi_ready' member to prevent access to incomplete `pxi', so we
don't need to hold netlock during all initialisation process. This
removes potential PR_WAITOK/M_WAITOK allocations impact on packet
processing. Also this removes relock dances around if_attach() and
if_detach() calls.

Do not grab netlock for FIONREAD. mbuf(9) queue doesn't rely on it.

Do not grab netlock around pipex_ioctl() call. pipex(4) has its own
protection and doesn't rely on netlock. We need to unlink pipex(4)
session before destroy associated `pxi', it can't be killed
concurrently. Also this stops to block packet processing when npppd(8)
periodically does PIPEXGCLOSED ioctl(2) commands.

The dummy FIONBIO case doesn't require any lock to be held.

The netlock remains to be taken around pppx_del_session() and
pppx_set_session_descr() because pppx(4) data structures rely on it.

Tested by Hrvoje Popovski.

ok yasuoka@

date 2022-11-19T16:02:37Z
author cheloha
files src/sys/arch/riscv64/include/_types.h log diff annotate
src/sys/arch/riscv64/include/cpu.h log diff annotate
src/sys/arch/riscv64/riscv64/clock.c log diff annotate
message riscv64: switch to clockintr

- Remove riscv64-specific clock interrupt scheduling bits from
cpu_info.
- Remove riscv64-specific randomized statclock() bits from
riscv64/clock.c.
- Remove the 'stat_count' evcount. All clock interrupts are
now counted via the 'clock_count' evcount.
- Wire up timer_intrclock.

With input from jca@, kettenis@. Tested by jca@.

Link: https://marc.info/?l=openbsd-tech&m=166776413003655&w=2

ok kettenis@ jca@ mlarkin@

date 2022-11-19T16:23:48Z
author cheloha
files src/sys/arch/loongson/dev/apm.c log diff annotate
src/sys/arch/loongson/dev/glxclk.c log diff annotate
src/sys/arch/mips64/include/_types.h log diff annotate
src/sys/arch/mips64/include/cpu.h log diff annotate
src/sys/arch/mips64/mips64/clock.c log diff annotate
src/sys/arch/mips64/mips64/mips64_machdep.c log diff annotate
message mips64, loongson, octeon: switch to clockintr

- Remove mips64-specific clock interrupt scheduling bits from cpu_info.
- Add missing tick_nsec initialization to cpu_initclocks().
- Disable the glxclk interrupt clock on loongson. visa@/miod@ say it
can be removed later if it isn't useful for anything else.
- Wire up cp0_intrclock.

Notes:

- The loongson apm_suspend() changes are untested, but deraadt@ claims
APM suspend/resume on loongson doesn't work anyway.
- loongson and octeon now have a randomized statclock(), stathz = hz.

With input from miod@, visa@. Tested by miod@, visa@.

Link: https://marc.info/?l=openbsd-tech&m=166776379603497&w=2

ok visa@ mlarkin@