From owner-freebsd-current@FreeBSD.ORG Tue Feb 17 01:10:20 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A81C106567D for ; Tue, 17 Feb 2009 01:10:20 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.234]) by mx1.freebsd.org (Postfix) with ESMTP id 347A18FC25 for ; Tue, 17 Feb 2009 01:10:20 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by rv-out-0506.google.com with SMTP id f6so1960056rvb.43 for ; Mon, 16 Feb 2009 17:10:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=LLKbuI00ena73YqZ71CDYo3KTXhTfwsBiRmuQmdI8jc=; b=awH0viMgTCMJQer4yoO5L7NNMICF8HS/gPGOVzgWAMmKaetHL3VYU7prfiIz2JbbbX 0vRt/FY33W1EbLyiyFPthc6526e3dEs/knQihQIk2cEXF5pIbtgUPe/8l17+Z6tKgniY 9v4v5oSqKR3sSIXv4MDMB1Ej6FZDehK/YWPDk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=n+40lGDu2hw78JVyg9rF22zYeQhZi322fgCQ7u+6RiVScpAwqM3P4Furp5Hydap3G6 PCXiIhB7JeteJCzs89mSZAYJ8TfQ3+7Z8KYLletT2gCTw76vvFVCrNRClmptp4FUeILn UqC4aWTqvh3Q//7klrMHLOtQy0sG1WoOYEU3w= Received: by 10.141.28.2 with SMTP id f2mr1788489rvj.170.1234833019847; Mon, 16 Feb 2009 17:10:19 -0800 (PST) Received: from michelle.cdnetworks.co.kr ([114.111.62.249]) by mx.google.com with ESMTPS id b39sm5325527rvf.9.2009.02.16.17.10.17 (version=SSLv3 cipher=RC4-MD5); Mon, 16 Feb 2009 17:10:18 -0800 (PST) Received: by michelle.cdnetworks.co.kr (sSMTP sendmail emulation); Tue, 17 Feb 2009 10:13:58 +0900 From: Pyun YongHyeon Date: Tue, 17 Feb 2009 10:13:58 +0900 To: Garrett Cooper Message-ID: <20090217011358.GC23900@michelle.cdnetworks.co.kr> References: <7d6fde3d0902150028n5f07ee55mc6026e1e4935eeb0@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="SLDf9lqlvOQaIe6s" Content-Disposition: inline In-Reply-To: <7d6fde3d0902150028n5f07ee55mc6026e1e4935eeb0@mail.gmail.com> User-Agent: Mutt/1.4.2.3i Cc: FreeBSD Current Subject: Re: Annoyance with recent parallelism in rc.d X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2009 01:10:21 -0000 --SLDf9lqlvOQaIe6s Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Feb 15, 2009 at 12:28:20AM -0800, Garrett Cooper wrote: > I just updated my world to a recent snapshot (a build from last week) > and I'm noting some parallelism / backgrounding which is really > causing issues with my NIC and NFS mounts. I had to hit CTRL-D 5 times > in order to get the system to come up because it couldn't resolve my > NFS server's hostname, because the NIC wasn't up and going yet (as it > uses the DHCP client in background mode due to the new default). > > Now I realize that this all ties back into the issue with the NIC > (which I've approached Pyun about, and which I appreciate his help is > solving issues with this buggy chipset), but is there really a need Would you try attached patch? I don't like the patch but it may reduce number of link state change message generated by dhclient. > for parallelism at startup rc.d it can't properly detect dependencies > with some cases like NFS mounts? > > Thanks, > -Garrett --SLDf9lqlvOQaIe6s Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="msk.link.diff" Index: sys/dev/msk/if_msk.c =================================================================== --- sys/dev/msk/if_msk.c (revision 188700) +++ sys/dev/msk/if_msk.c (working copy) @@ -943,8 +943,11 @@ else { MSK_IF_LOCK(sc_if); ifp->if_mtu = ifr->ifr_mtu; - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + if ((ifp->if_drv_flags & + IFF_DRV_RUNNING) != 0) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; msk_init_locked(sc_if); + } MSK_IF_UNLOCK(sc_if); } } @@ -2726,6 +2729,7 @@ if_printf(sc_if->msk_ifp, "watchdog timeout " "(missed link)\n"); ifp->if_oerrors++; + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; msk_init_locked(sc_if); return; } @@ -2750,6 +2754,7 @@ if_printf(ifp, "watchdog timeout\n"); ifp->if_oerrors++; + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; msk_init_locked(sc_if); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) taskqueue_enqueue(taskqueue_fast, &sc_if->msk_tx_task); @@ -2828,8 +2833,10 @@ mskc_reset(sc); for (i = 0; i < sc->msk_num_port; i++) { if (sc->msk_if[i] != NULL && sc->msk_if[i]->msk_ifp != NULL && - ((sc->msk_if[i]->msk_ifp->if_flags & IFF_UP) != 0)) + ((sc->msk_if[i]->msk_ifp->if_flags & IFF_UP) != 0)) { + sc->msk_if[i]->msk_ifp->if_drv_flags &= ~IFF_DRV_RUNNING; msk_init_locked(sc->msk_if[i]); + } } sc->msk_suspended = 0; @@ -3515,6 +3522,9 @@ sc = sc_if->msk_softc; mii = device_get_softc(sc_if->msk_miibus); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + return; + error = 0; /* Cancel pending I/O and free all Rx/Tx buffers. */ msk_stop(sc_if); --SLDf9lqlvOQaIe6s--