From: Kirill A. Korinsky Subject: Re: Shift several proc.h fields out of SCHED_LOCK To: Tim Leslie Cc: "tech@openbsd.org" Date: Sun, 02 Nov 2025 20:53:19 +0100 On Sun, 02 Nov 2025 15:34:46 +0100, Tim Leslie wrote: > > @@ -509,8 +509,7 @@ setpriority(struct proc *p, uint32_t newcpu, uint8_t nice) > > newprio = min((PUSER + newcpu + NICE_WEIGHT * (nice - NZERO)), MAXPRI); > > - SCHED_ASSERT_LOCKED(); > - p->p_estcpu = newcpu; > + atomic_store_int(&p->p_estcpu, newcpu); > p->p_usrpri = newprio; > } > Here you moved p_usrpri out of the lock, and you don't use atomic_store_int. -- wbr, Kirill