From: Claudio Jeker Subject: Re: One reaper per CPU To: Christian Ludwig Cc: tech@openbsd.org Date: Wed, 10 Jul 2024 17:51:26 +0200 On Wed, Jul 10, 2024 at 05:21:35PM +0200, Christian Ludwig wrote: > Hi, > > This implements one reaper process per CPU. The benefit is that we can > switch to a safe stack (the reaper) on process teardown without the need > to lock data structures between sched_exit() and the local reaper. That > means the global deadproc mutex goes away. And there is also no need to > go through idle anymore, because we know that the local reaper is not > currently running when the dying proc enlists itself. > > I have tested it lightly. It does not fall apart immediately. I do not > see any performance regressions in my test case, which is recompiling > the kernel over and over again, but your mileage my vary. So please give > this some serious testing on your boxes. > I thought everyone agreed that we need less reaper and not more. All the heavy teardown done in the reaper must be moved to exit1(). After that I think having a single reaper thread is just fine (we could even just use a task queue for cleaning up the final bits of a proc). -- :wq Claudio