From owner-freebsd-current@FreeBSD.ORG Mon Jul 5 18:20:11 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 8B78D16A4CE for ; Mon, 5 Jul 2004 18:20:11 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 44DA043D2F for ; Mon, 5 Jul 2004 18:20:11 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.11/8.12.11) with ESMTP id i65IJU3A055032; Mon, 5 Jul 2004 14:19:30 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i65IJUoO055028; Mon, 5 Jul 2004 14:19:30 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Mon, 5 Jul 2004 14:19:30 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Gleb Smirnoff In-Reply-To: <20040705181106.GA60338@cell.sick.ru> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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:20:11 -0000 On Mon, 5 Jul 2004, Gleb Smirnoff wrote: > yes, this thread is originating from a callout. Actually, it is > impossible to reproduce this as I described in previous letter. Sorry. > > So you suggest to lock Giant in a callout handle? Or should we somewhat > tweak ng_ksocket? Depends on the callout, but if it's a network-specific callout, I'd suggest having callout_init() use the following logic to build the flags field: debug_mpsafenet ? CALLOUT_MPSAFE : 0 I.e., if we're running without debug.mpsafenet turned on, then run the callout with Giant. If the callout does a lot of other stuff, I'd acquire Giant conditionally (as your patch does) just around the network bits. That said, I'd have Giant include all the netgraph bits, not just the socket bits. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Principal Research Scientist, McAfee Research