Re: Some netgraph node global locking patches

From: Gleb Smirnoff <glebius_at_freebsd.org>
Date: Thu, 15 Jul 2004 00:00:34 +0400
On Wed, Jul 14, 2004 at 12:03:57PM -0400, Robert Watson wrote:
R> 
R> > On Wed, Jul 14, 2004 at 10:25:31AM -0400, Robert Watson wrote:
R> > R> > On Wed, Jul 14, 2004 at 12:30:40AM -0400, Robert Watson wrote:
R> > R> > R>   //depot/vendor/freebsd/src/sys/netgraph/ng_eiface.c
R> > R> > R>   //depot/vendor/freebsd/src/sys/netgraph/ng_fec.c
R> > R> > R>   //depot/vendor/freebsd/src/sys/netgraph/ng_iface.c
R> > R> > 
R> > R> > Well, these three are quite straightforward and identical. Look fine. 
R> > R> 
R> > R> I was somewhat hoping someone would actually give them a try and
R> > R> demonstrate that practice matches the theory. :-)
R> > 
R> > I can test ng_iface. Since change is similar we could assume ng_eiface,
R> > ng_fec tested, then. Would it be enough to test on UP hardware? 
R> 
R> Yes, as long as you're running with witness and invariants, and can
R> exercise each of the code paths that hits mutexes (and return paths) it
R> should be sufficient to merge the changes. 

Well, running 15 such scripts simultaneously didn't cause any panics/LORs:

#!/usr/local/bin/bash

while (true); do
        num=`expr \( ${RANDOM} \* 255 \) / 32767`

        ngctl mkpeer iface dummy inet
        ngctl shutdown ng${num}: >/dev/null 2>&1
done

AFAIK, this LOR can't be related to this mutex:

lock order reversal
 1st 0xc0766ec0 cdev (cdev) _at_ /usr/src/sys/kern/kern_conf.c:81
 2nd 0xc103a100 system map (system map) _at_ /usr/src/sys/vm/vm_kern.c:320

-- 
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE
Received on Wed Jul 14 2004 - 18:00:43 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:01 UTC