From: Claudio Jeker Subject: Re: pull __thrsleep tendrils out of struct proc To: David Gwynne Cc: tech@openbsd.org Date: Wed, 23 Jul 2025 07:13:42 +0200 On Wed, Jul 23, 2025 at 01:01:45PM +1000, David Gwynne wrote: > __thrsleep uses memory on the stack instead of in struct proc now, so we > can pull this out. > > ok? OK claudio@ > Index: sys/proc.h > =================================================================== > RCS file: /cvs/src/sys/sys/proc.h,v > diff -u -p -r1.393 proc.h > --- sys/proc.h 12 Jun 2025 20:47:11 -0000 1.393 > +++ sys/proc.h 23 Jul 2025 01:44:16 -0000 > @@ -127,8 +127,6 @@ struct tusage { > */ > #ifdef __need_process > struct proc; > -struct tslpentry; > -TAILQ_HEAD(tslpqueue, tslpentry); > struct unveil; > > struct pinsyscall { > @@ -186,7 +184,6 @@ struct process { > struct vmspace *ps_vmspace; /* Address space */ > pid_t ps_pid; /* [I] Process identifier. */ > > - struct tslpqueue ps_tslpqueue; /* [p] queue of threads in thrsleep */ > struct rwlock ps_lock; /* per-process rwlock */ > struct mutex ps_mtx; /* per-process mutex */ > > Index: kern/kern_fork.c > =================================================================== > RCS file: /cvs/src/sys/kern/kern_fork.c,v > diff -u -p -r1.273 kern_fork.c > --- kern/kern_fork.c 9 Jun 2025 11:11:03 -0000 1.273 > +++ kern/kern_fork.c 23 Jul 2025 01:44:17 -0000 > @@ -199,7 +199,6 @@ process_initialize(struct process *pr, s > LIST_INIT(&pr->ps_children); > LIST_INIT(&pr->ps_orphans); > LIST_INIT(&pr->ps_sigiolst); > - TAILQ_INIT(&pr->ps_tslpqueue); > > rw_init(&pr->ps_lock, "pslock"); > mtx_init(&pr->ps_mtx, IPL_HIGH); > Index: kern/kern_synch.c > =================================================================== > RCS file: /cvs/src/sys/kern/kern_synch.c,v > diff -u -p -r1.229 kern_synch.c > --- kern/kern_synch.c 14 Jul 2025 08:47:15 -0000 1.229 > +++ kern/kern_synch.c 23 Jul 2025 01:44:17 -0000 > @@ -654,6 +659,8 @@ struct tslpentry { > long tslp_ident; > struct proc *volatile tslp_p; > }; > + > +TAILQ_HEAD(tslpqueue, tslpentry); > > struct tslp_bucket { > struct tslpqueue tsb_list; > -- :wq Claudio