From owner-freebsd-current@FreeBSD.ORG Mon Jul 5 18:46:44 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8C12816A4CE; Mon, 5 Jul 2004 18:46:44 +0000 (GMT) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id D655443D2F; Mon, 5 Jul 2004 18:46:43 +0000 (GMT) (envelope-from glebius@cell.sick.ru) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.12.9/8.12.8) with ESMTP id i65IkcMO060681 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 5 Jul 2004 22:46:39 +0400 (MSD) (envelope-from glebius@cell.sick.ru) Received: (from glebius@localhost) by cell.sick.ru (8.12.9/8.12.6/Submit) id i65Ikc0Z060680; Mon, 5 Jul 2004 22:46:38 +0400 (MSD) Date: Mon, 5 Jul 2004 22:46:38 +0400 From: Gleb Smirnoff To: Robert Watson Message-ID: <20040705184638.GC60338@cell.sick.ru> References: <20040705181106.GA60338@cell.sick.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i cc: Julian Elischer cc: current@freebsd.org Subject: Re: ng_ksocket on CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2004 18:46:44 -0000 On Mon, Jul 05, 2004 at 02:19:30PM -0400, Robert Watson wrote: R> > yes, this thread is originating from a callout. Actually, it is R> > impossible to reproduce this as I described in previous letter. Sorry. R> > R> > So you suggest to lock Giant in a callout handle? Or should we somewhat R> > tweak ng_ksocket? R> R> Depends on the callout, but if it's a network-specific callout, I'd R> suggest having callout_init() use the following logic to build the flags R> field: R> R> debug_mpsafenet ? CALLOUT_MPSAFE : 0 R> R> I.e., if we're running without debug.mpsafenet turned on, then run the R> callout with Giant. If the callout does a lot of other stuff, I'd acquire R> Giant conditionally (as your patch does) just around the network bits. R> That said, I'd have Giant include all the netgraph bits, not just the R> socket bits. Ok, I will surround with NET_LOCK_GIANT the place of code where data is sent towards ng_ksocket. I don't want to hold Giant during all callout (it may be long). -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE