From: Claudio Jeker Subject: Re: Unlock sysctl kern.maxclusters To: Theo de Raadt Cc: Vitaliy Makkoveev , Mark Kettenis , Alexander Bluhm , tech@openbsd.org Date: Tue, 3 Jun 2025 20:28:19 +0200 On Tue, Jun 03, 2025 at 08:15:10AM -0600, Theo de Raadt wrote: > > Why do we need to move "nmbclust * MCLBYTES" to the hot path > > and use it instead of pre-calculated `mbuf_mem_limit'? > > I do not think a multiplication is hot, compared to userland being able > to do a sysctl() operation and grab a mutex against the mbuf layer. MCLBYTES is a power of two. So this hot multiplication will be reduced to a shift instruction which is probably not even noticable. -- :wq Claudio