Contention on sysctl lock

From: Ed Schouten <ed_at_80386.nl>
Date: Wed, 11 Feb 2009 08:23:12 +0100
Hello,

* pluknet <pluknet_at_gmail.com> wrote:
> Any commands I tried then lock on sysctl lock; i.e. ctrl+t returns:
> load: 0.04 cmd: sudo 1008 [sysctl lock] 0.00u 0.00s 0% 312k

The problem with sysctl's current implementation is that all calls to
sysctl() are protected with an sx lock, sysctl lock. This means that if
one call to sysctl() gets blocked on a different lock (one of GEOM's in
this case), all further calls get blocked as well. Because we call
sysctl() on process creation (to obtain a random number for the stack
protector), this becomes a mess.

Some time ago I was thinking it shouldn't be all that hard to make
sysctl() lockless for any sysctls that aren't created dynamically. I
still have to find some time to implement this.

-- 
 Ed Schouten <ed_at_80386.nl>
 WWW: http://80386.nl/

Received on Wed Feb 11 2009 - 06:23:14 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:42 UTC