From owner-freebsd-net Wed Feb 19 15:19:41 2003 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6AC0C37B401 for ; Wed, 19 Feb 2003 15:19:40 -0800 (PST) Received: from mta5.snfc21.pbi.net (mta5.snfc21.pbi.net [206.13.28.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5574E43F85 for ; Wed, 19 Feb 2003 15:19:39 -0800 (PST) (envelope-from hsu@FreeBSD.org) Received: from FreeBSD.org ([63.193.112.125]) by mta5.snfc21.pbi.net (iPlanet Messaging Server 5.1 HotFix 1.6 (built Oct 18 2002)) with ESMTP id <0HAK00K0OWSP3P@mta5.snfc21.pbi.net> for freebsd-net@freebsd.org; Wed, 19 Feb 2003 15:19:37 -0800 (PST) Date: Wed, 19 Feb 2003 15:25:26 -0800 From: Jeffrey Hsu Subject: Re: MT/MP locking and TCP In-reply-to: Message from Jon Dugan "of Wed, 19 Feb 2003 17:04:53 CST." <20030219230453.GA3167@ncsa.uiuc.edu> To: Jon Dugan Cc: freebsd-net@freebsd.org Message-id: <0HAK00K0QWSP3P@mta5.snfc21.pbi.net> MIME-version: 1.0 X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > It seems like > several variables are locked for the vast majority of the time in > tcp_input(). inp, in particular, should be locked the entire time in tcp_input, so you are always going to have your "could sleep with lock held" problem unless you add M_NOWAIT to your calls to malloc() or pre-allocate before entering tcp_input() or somehow rework your code to not make use of dynamically allocated memory. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message