Index | Thread | Search

From:
Vitaliy Makkoveev <mvs@openbsd.org>
Subject:
Re: Unlock sysctl kern.maxclusters
To:
Theo de Raadt <deraadt@openbsd.org>
Cc:
Mark Kettenis <mark.kettenis@xs4all.nl>, Alexander Bluhm <bluhm@openbsd.org>, tech@openbsd.org
Date:
Tue, 3 Jun 2025 17:35:25 +0300

Download raw body.

Thread
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.
> 

This mutex doesn't block mbuf layer, it only serializes concurrent
"sysctl kern.maxclusters=value" calls.