From owner-p4-projects@FreeBSD.ORG Sun Dec 28 12:06:21 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 244C216A4D0; Sun, 28 Dec 2003 12:06:21 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DAD6D16A4CE for ; Sun, 28 Dec 2003 12:06:20 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 48A6743D54 for ; Sun, 28 Dec 2003 12:04:48 -0800 (PST) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id hBSK4S0B034075 for ; Sun, 28 Dec 2003 12:04:28 -0800 (PST) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id hBSK4SNe034072 for perforce@freebsd.org; Sun, 28 Dec 2003 12:04:28 -0800 (PST) (envelope-from sam@freebsd.org) Date: Sun, 28 Dec 2003 12:04:28 -0800 (PST) Message-Id: <200312282004.hBSK4SNe034072@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 44464 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2003 20:06:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=44464 Change 44464 by sam@sam_ebb on 2003/12/28 12:03:56 purge debug_mpsafenet Affected files ... .. //depot/projects/netperf+sockets/sys/kern/subr_bus.c#4 edit .. //depot/projects/netperf+sockets/sys/net/netisr.c#3 edit .. //depot/projects/netperf+sockets/sys/netinet/ip_dummynet.c#6 edit .. //depot/projects/netperf+sockets/sys/netinet/ip_fw2.c#6 edit .. //depot/projects/netperf+sockets/sys/netinet/tcp_syncache.c#4 edit .. //depot/projects/netperf+sockets/sys/sys/mutex.h#3 edit Differences ... ==== //depot/projects/netperf+sockets/sys/kern/subr_bus.c#4 (text+ko) ==== @@ -2140,9 +2140,6 @@ int error; if (dev->parent != 0) { - if ((flags &~ INTR_ENTROPY) == (INTR_TYPE_NET | INTR_MPSAFE) && - !debug_mpsafenet) - flags &= ~INTR_MPSAFE; error = BUS_SETUP_INTR(dev->parent, dev, r, flags, handler, arg, cookiep); if (error == 0) { ==== //depot/projects/netperf+sockets/sys/net/netisr.c#3 (text+ko) ==== @@ -53,16 +53,6 @@ #include #include -/* - * XXX this is a temporary measure to allow folks to - * XXX disable Giant locking in the network code without - * XXX recompiling--in case of problems. - */ -int debug_mpsafenet = 1; -TUNABLE_INT("debug.mpsafenet", &debug_mpsafenet); -SYSCTL_INT(_debug, OID_AUTO, mpsafenet, CTLFLAG_RD, &debug_mpsafenet, 0, - "Enable/disable MPSAFE network support"); - volatile unsigned int netisr; /* scheduling bits for network */ struct netisr { @@ -87,8 +77,6 @@ ("bad isr %d", num)); netisrs[num].ni_handler = handler; netisrs[num].ni_queue = inq; - if ((flags & NETISR_MPSAFE) && !debug_mpsafenet) - flags &= ~NETISR_MPSAFE; netisrs[num].ni_flags = flags; } ==== //depot/projects/netperf+sockets/sys/netinet/ip_dummynet.c#6 (text+ko) ==== @@ -2029,7 +2029,7 @@ ip_dn_io_ptr = dummynet_io; ip_dn_ruledel_ptr = dn_rule_delete; - callout_init(&dn_timeout, debug_mpsafenet ? CALLOUT_MPSAFE : 0); + callout_init(&dn_timeout, CALLOUT_MPSAFE); callout_reset(&dn_timeout, 1, dummynet, NULL); } ==== //depot/projects/netperf+sockets/sys/netinet/ip_fw2.c#6 (text+ko) ==== @@ -2947,7 +2947,7 @@ layer3_chain.rules = NULL; IPFW_LOCK_INIT(&layer3_chain); IPFW_DYN_LOCK_INIT(); - callout_init(&ipfw_timeout, debug_mpsafenet ? CALLOUT_MPSAFE : 0); + callout_init(&ipfw_timeout, CALLOUT_MPSAFE); bzero(&default_rule, sizeof default_rule); ==== //depot/projects/netperf+sockets/sys/netinet/tcp_syncache.c#4 (text+ko) ==== @@ -248,8 +248,7 @@ /* Initialize the timer queues. */ for (i = 0; i <= SYNCACHE_MAXREXMTS; i++) { TAILQ_INIT(&tcp_syncache.timerq[i]); - callout_init(&tcp_syncache.tt_timerq[i], - debug_mpsafenet ? CALLOUT_MPSAFE : 0); + callout_init(&tcp_syncache.tt_timerq[i], CALLOUT_MPSAFE); } /* ==== //depot/projects/netperf+sockets/sys/sys/mutex.h#3 (text+ko) ==== @@ -339,27 +339,6 @@ WITNESS_RESTORE(&Giant.mtx_object, Giant) #endif -/* - * Network MPSAFE temporary workarounds. When debug_mpsafenet - * is 1 the network is assumed to operate without Giant on the - * input path and protocols that require Giant must collect it - * on entry. When 0 Giant is grabbed in the network interface - * ISR's and in the netisr path and there is no need to grab - * the Giant lock. - * - * This mechanism is intended as temporary until everything of - * importance is properly locked. - */ -extern int debug_mpsafenet; /* defined in net/netisr.c */ -#define NET_PICKUP_GIANT() do { \ - if (debug_mpsafenet) \ - mtx_lock(&Giant); \ -} while (0) -#define NET_DROP_GIANT() do { \ - if (debug_mpsafenet) \ - mtx_unlock(&Giant); \ -} while (0) - #define UGAR(rval) do { \ int _val = (rval); \ mtx_unlock(&Giant); \