From owner-freebsd-arch@FreeBSD.ORG Thu Aug 18 16:55:47 2005 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 298B716A41F; Thu, 18 Aug 2005 16:55:47 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id E046F43D45; Thu, 18 Aug 2005 16:55:46 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.12.11) with ESMTP id j7IGtkti092082; Thu, 18 Aug 2005 09:55:46 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id j7IGtksK092081; Thu, 18 Aug 2005 09:55:46 -0700 (PDT) (envelope-from rizzo) Date: Thu, 18 Aug 2005 09:55:46 -0700 From: Luigi Rizzo To: John Baldwin Message-ID: <20050818095546.A91965@xorpc.icir.org> References: <42F9ECF2.8080809@freebsd.org> <200508171328.29654.jhb@FreeBSD.org> <20050817184056.A72643@xorpc.icir.org> <200508181023.05929.jhb@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200508181023.05929.jhb@FreeBSD.org>; from jhb@FreeBSD.org on Thu, Aug 18, 2005 at 10:23:04AM -0400 Cc: gnn@FreeBSD.org, freebsd-arch@FreeBSD.org Subject: Re: Special schedulers, one CPU only kernel, one only userland X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Aug 2005 16:55:47 -0000 On Thu, Aug 18, 2005 at 10:23:04AM -0400, John Baldwin wrote: ... > > However I am still unclear on what happens if a detach() is racing with the > > output path (leading to fxp_start()). > > Note that we first down the interface via fxp_stop() and then we unhook it > from the network stack using ether_ifdetach(). Once we've done > ether_ifdetach() the network stack can't get to the fxp device anymore. It might have gotten there before, then this sequence might occur: thread 'fxp_detach' thread 'fxp_start' acquire fxp lock wait for lock (goes to sleep maybe ?) fxp_stop release fxp lock destroy everything including the lock resume, mtx_lock -> boom hmmm... it's really tricky to follow. Maybe this does not happen, but i wouldn't know why as fxp_detach() is under giant but the path leading to fxp_start is not... cheers luigi