From owner-freebsd-current@FreeBSD.ORG Thu Aug 11 22:03:08 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org 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 16BAC16A425 for ; Thu, 11 Aug 2005 22:03:08 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 963B343D49 for ; Thu, 11 Aug 2005 22:03:07 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[65.202.103.25]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Thu, 11 Aug 2005 18:17:58 -0400 From: John Baldwin To: freebsd-current@freebsd.org Date: Thu, 11 Aug 2005 18:03:40 -0400 User-Agent: KMail/1.8 References: <20050811220017.A72944@hades.admin.frm2> <200508111741.15983.jhb@FreeBSD.org> In-Reply-To: <200508111741.15983.jhb@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508111803.41851.jhb@FreeBSD.org> Cc: Joerg Pulz Subject: Re: 6.0-BETA2: taskqueue_drain for if_xl.c:2796 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 11 Aug 2005 22:03:08 -0000 On Thursday 11 August 2005 05:41 pm, John Baldwin wrote: > On Thursday 11 August 2005 04:09 pm, Joerg Pulz wrote: > > Hi, > > > > with a fresh installed 6.0-BETA2 i get this when xl(4) gets configured at > > the system startup. > > System is P3-800MHz SMP. dmesg is attached. > > I'm working on fixes for this. Ping me in a day or so for a patch. Ok, I've got a patch. I added a taskqueue_stop() function to bring taskqueue's a bit closer inline with the callout*() API and use taskqueue_stop() in xl_stop() as it is ok to be called with locks held and doesn't block. The xl task handler function now bails if IFF_DRV_RUNNING is clear, and I added a taskqueue_drain() in detach to make sure we were finished with the mutex and function before detach finishes. Unfortunately, the patch is to HEAD, but you can probably get it to work on 6.x by changing if_drv_flags to if_flags and IFF_DRV_RUNNING to IFF_RUNNING on 6.x. http://www.FreeBSD.org/~jhb/patches/xl_locking.patch -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org