From owner-freebsd-current@FreeBSD.ORG Thu Oct 14 08: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 0C12C16A4CE for ; Thu, 14 Oct 2004 08:46:44 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9153443D45 for ; Thu, 14 Oct 2004 08:46:43 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.13.1/8.13.1) with ESMTP id i9E8j2Iv006160; Thu, 14 Oct 2004 04:45:02 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i9E8j2Wc006157; Thu, 14 Oct 2004 04:45:02 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Thu, 14 Oct 2004 04:45:02 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Bruce M Simpson In-Reply-To: <20041013232318.GN718@empiric.icir.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Robert Huff cc: current@freebsd.org Subject: Re: network slowness/freez-up since update 10/11 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: Thu, 14 Oct 2004 08:46:44 -0000 On Wed, 13 Oct 2004, Bruce M Simpson wrote: > On Wed, Oct 13, 2004 at 04:27:22PM -0400, Robert Watson wrote: > > There appears to bea problem with if_de cards and Giant-free operation. > > I'm working with John Baldwin to try and diagnose it. Could you try > > putting debug.mpsafenet=0 in /boot/loader.conf and reboot to confirm that > > this is what's going on? > > The de(4) driver is a bit of a mess as regards locking. I had a look at > this back in June/July but no longer have the hardware. It would > probably be best to bring it under IFF_NEEDSGIANT. It is under IFF_NEEDSGIANT, and the interrupt handler is not INTR_MPSAFE. There-in lies the problem: other non-MPSAFE drivers operate fine under IFF_NEEDSGIANT. This suggests that the race in if_de already existed under Giant but that we've gotten a lot better at triggering it by taking other pieces of the stack out from under Giant. For example, it could be that it handles the insertion of new mbufs into its ifq poorly, or tht it handles the calling of if_start after it's already drained the packets from the ifq poorly. I hope to have some more time to diagnose it today. One observation that Matthew Dodd made is that it seems to use IFF_OACTIVE in more extensive ways than most drivers. I did try having John remove the IFF_OACTIVE test from if_handoff() to see if that was the race, but that didn't appear to help. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Principal Research Scientist, McAfee Research