From owner-freebsd-current@FreeBSD.ORG Tue Feb 17 22:05:59 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 81C0910656BC for ; Tue, 17 Feb 2009 22:05:59 +0000 (UTC) (envelope-from shuvaev@physik.uni-wuerzburg.de) Received: from mailrelay.rz.uni-wuerzburg.de (mailrelay.rz.uni-wuerzburg.de [132.187.3.28]) by mx1.freebsd.org (Postfix) with ESMTP id 0B1768FC18 for ; Tue, 17 Feb 2009 22:05:58 +0000 (UTC) (envelope-from shuvaev@physik.uni-wuerzburg.de) Received: from virusscan.mail (localhost [127.0.0.1]) by mailrelay.mail (Postfix) with ESMTP id 331CB19909A; Tue, 17 Feb 2009 23:05:58 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by virusscan.mail (Postfix) with ESMTP id 26F11199094; Tue, 17 Feb 2009 23:05:58 +0100 (CET) Received: from mail.physik.uni-wuerzburg.de (wthp192.physik.uni-wuerzburg.de [132.187.40.192]) by mailmaster.uni-wuerzburg.de (Postfix) with ESMTP id 03C84199093; Tue, 17 Feb 2009 23:05:58 +0100 (CET) Received: from wep4035 ([132.187.37.35]) by mail.physik.uni-wuerzburg.de (Lotus Domino Release 8.0.2HF443) with ESMTP id 2009021723055705-81008 ; Tue, 17 Feb 2009 23:05:57 +0100 Received: by wep4035 (sSMTP sendmail emulation); Tue, 17 Feb 2009 23:05:57 +0100 From: "Alexey Shuvaev" Date: Tue, 17 Feb 2009 23:05:57 +0100 To: Pyun YongHyeon Message-ID: <20090217220557.GA1745@wep4035.physik.uni-wuerzburg.de> References: <7d6fde3d0902150028n5f07ee55mc6026e1e4935eeb0@mail.gmail.com> <20090217011358.GC23900@michelle.cdnetworks.co.kr> MIME-Version: 1.0 In-Reply-To: <20090217011358.GC23900@michelle.cdnetworks.co.kr> Organization: Universitaet Wuerzburg User-Agent: Mutt/1.5.18 (2008-05-17) X-MIMETrack: Itemize by SMTP Server on domino1/uni-wuerzburg(Release 8.0.2HF443 | November 25, 2008) at 02/17/2009 11:05:57 PM, Serialize by Router on domino1/uni-wuerzburg(Release 8.0.2HF443 | November 25, 2008) at 02/17/2009 11:05:58 PM, Serialize complete at 02/17/2009 11:05:58 PM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Virus-Scanned: by amavisd-new at uni-wuerzburg.de Cc: Garrett Cooper , 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 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 22:06:00 -0000 On Tue, Feb 17, 2009 at 10:13:58AM +0900, Pyun YongHyeon wrote: > Would you try attached patch? I don't like the patch but it may > reduce number of link state change message generated by dhclient. > Seems to be so. Not sure it solves the problem entirely: [snip] /dev/ad6p8: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/ad6p8: clean, 5999509 free (41045 frags, 744808 blocks, 0.5% fragmentation) msk0: link state changed to DOWN Starting Network: lo0 msk0. Removing stale Samba tdb files: done Feb 17 21:49:22 ntpd[1295]: getaddrinfo: "wrzx03.rz.uni-wuerzburg.de" invalid h ost address, ignored Feb 17 21:49:22 ntpd[1295]: getaddrinfo: "wep4001.physik.uni-wuerzburg.de" inva lid host address, ignored Configuring syscons: blanktime screensaver. Configuring jails:. Starting jails:. moused: unable to open /dev/ums0: Device busy Tue Feb 17 21:49:23 CET 2009 FreeBSD/amd64 (wep4035) (ttyv0) login: After all I have ntpd running & connected to upstream ntp server. This is without synchronous_dhclient="YES" in rc.conf. I have some feeling that the problem is not localized to msk driver only, so... if you don't like the patch I'm ok to live with synchronous dhclient. Alexey. > 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);