From owner-freebsd-amd64@FreeBSD.ORG Mon Nov 1 08:27:06 2004 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 363D216A4CE for ; Mon, 1 Nov 2004 08:27:06 +0000 (GMT) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 95AD443D1F for ; Mon, 1 Nov 2004 08:27:05 +0000 (GMT) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id 65E1B1FF9AC; Mon, 1 Nov 2004 09:27:04 +0100 (CET) Received: by transport.cksoft.de (Postfix, from userid 66) id 659741FF9A8; Mon, 1 Nov 2004 09:27:02 +0100 (CET) Received: by mail.int.zabbadoz.net (Postfix, from userid 1060) id 51984153C4; Mon, 1 Nov 2004 08:26:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.int.zabbadoz.net (Postfix) with ESMTP id 44F1915384; Mon, 1 Nov 2004 08:26:47 +0000 (UTC) Date: Mon, 1 Nov 2004 08:26:45 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@e0-0.zab2.int.zabbadoz.net To: John-Mark Gurney In-Reply-To: <20041101005735.GO22681@funkthat.com> Message-ID: References: <200410312115.i9VLFisD013971@www.freebsd.org> <20041101005735.GO22681@funkthat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS cksoft-s20020300-20031204bz on transport.cksoft.de cc: "Wolfgang S. Rupprecht" cc: freebsd-amd64@freebsd.org Subject: Re: amd64/73360: sk0: watchdog timeout X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Nov 2004 08:27:06 -0000 On Sun, 31 Oct 2004, John-Mark Gurney wrote: > Wolfgang S. Rupprecht wrote this message on Sun, Oct 31, 2004 at 14:17 -0800: [patch] > > Hey, thanks for pointing this patch out... I've slightly modified it > to better handle IFF_OACTIVE since it's possible to clear the flag when > it shouldn't be... > > If people see this patch improve things, I'll commit it... I haven't > tested w/ my sk card yet though... it didn't improve the situtation here but made it worse:( that patch itself is not compileable that way anyway. sc is not defined in txeof. > Index: if_sk.c > =================================================================== > RCS file: /home/ncvs/src/sys/pci/if_sk.c,v > retrieving revision 1.86 > diff -u -r1.86 if_sk.c > --- if_sk.c 20 Aug 2004 06:22:04 -0000 1.86 > +++ if_sk.c 1 Nov 2004 00:54:20 -0000 > @@ -1816,11 +1816,13 @@ > } > > /* Transmit */ > - sc_if->sk_cdata.sk_tx_prod = idx; > - CSR_WRITE_4(sc, sc_if->sk_tx_bmu, SK_TXBMU_TX_START); > + if (idx != sc_if->sk_cdata.sk_tx_prod) { > + sc_if->sk_cdata.sk_tx_prod = idx; > + CSR_WRITE_4(sc, sc_if->sk_tx_bmu, SK_TXBMU_TX_START); > > - /* Set a timeout in case the chip goes out to lunch. */ > - ifp->if_timer = 5; > + /* Set a timeout in case the chip goes out to lunch. */ > + ifp->if_timer = 5; > + } > SK_IF_UNLOCK(sc_if); > > return; [pasted in] @@ -1937,10 +1940,12 @@ static void sk_txeof(sc_if) struct sk_if_softc *sc_if; { + struct sk_softc *sc; struct sk_tx_desc *cur_tx = NULL; struct ifnet *ifp; u_int32_t idx; + sc = sc_if->sk_softc; ifp = &sc_if->arpcom.ac_if; /* > @@ -1960,13 +1962,15 @@ > } > sc_if->sk_cdata.sk_tx_cnt--; > SK_INC(idx, SK_TX_RING_CNT); > - ifp->if_timer = 0; > } > > - sc_if->sk_cdata.sk_tx_cons = idx; > - > - if (cur_tx != NULL) > + if (sc_if->sk_cdata.sk_tx_cnt == 0) { > + ifp->if_timer = 0; > ifp->if_flags &= ~IFF_OACTIVE; > + } else /* nudge chip to keep tx ring moving */ > + CSR_WRITE_4(sc, sc_if->sk_tx_bmu, SK_TXBMU_TX_START); > + > + sc_if->sk_cdata.sk_tx_cons = idx; > > return; > } if I add two printfs to each rxeof,txeof to print i resp. idx this slows down processing to about 120KB/s and make the thing live for about 3-6 MB transferred before "hanging". The output of the time the hanging starts looks like that: legend: tx = txeof rx = rxeof s = start e = end i = i,idx output: rx s i=47 rx e i=54 tx s i=104 tx e i=126 rx s i=54 rx e i=60 tx s i=126 tx e i=150 rx s i=60 rx e i=67 tx s i=150 tx e i=161 rx s i=67 rx e i=71 tx s i=161 tx e i=163 tx s i=163 tx e i=190 rx s i=71 rx e i=78 tx s i=190 tx e i=217 rx s i=78 rx e i=82 tx s i=217 tx e i=230 tx s i=230 tx e i=232 tx s i=232 tx e i=235 tx s i=235 tx e i=237 tx s i=237 tx e i=240 tx s i=240 tx e i=242 tx s i=242 tx e i=244 tx s i=244 tx e i=247 tx s i=247 tx e i=249 tx s i=249 tx e i=251 tx s i=251 tx e i=254 tx s i=254 tx e i=256 tx s i=256 tx e i=258 tx s i=258 tx e i=260 tx s i=260 tx e i=263 tx s i=263 tx e i=265 tx s i=265 tx e i=267 tx s i=267 tx e i=270 tx s i=270 tx e i=272 tx s i=272 tx e i=275 tx s i=275 tx e i=277 tx s i=277 tx e i=280 The funny thing is if I go into the "also hanging" xterm where I logged in on that amd64 with ssh and started the ftp put from and then hit some keys like enter I will see Rx intr fired again: rx s i=82 rx e i=83 tx s i=297 tx e i=298 rx s i=83 rx e i=84 tx s i=298 tx e i=301 rx s i=84 rx e i=85 tx s i=301 tx e i=304 rx s i=85 rx e i=86 tx s i=304 tx e i=305 tx s i=305 tx e i=308 tx s i=308 tx e i=311 rx s i=86 rx e i=87 tx s i=311 tx e i=313 rx s i=87 rx e i=88 tx s i=313 tx e i=314 -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT