From nobody@FreeBSD.org  Tue Mar 24 05:23:18 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 951341065672
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 24 Mar 2009 05:23:18 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 839E78FC17
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 24 Mar 2009 05:23:18 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n2O5NGX3041425
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 24 Mar 2009 05:23:16 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n2O5NGpQ041424;
	Tue, 24 Mar 2009 05:23:16 GMT
	(envelope-from nobody)
Message-Id: <200903240523.n2O5NGpQ041424@www.freebsd.org>
Date: Tue, 24 Mar 2009 05:23:16 GMT
From: Alexey Egorov <alex@zond.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [bge] if_bge low performance problem
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         132991
>Category:       kern
>Synopsis:       [bge] if_bge low performance problem
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    yongari
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 24 05:30:02 UTC 2009
>Closed-Date:    Thu Oct 21 20:24:27 UTC 2010
>Last-Modified:  Thu Oct 21 20:24:27 UTC 2010
>Originator:     Alexey Egorov
>Release:        7.1-RELEASE-p3 amd64
>Organization:
>Environment:
FreeBSD n1.net.zond.org 7.1-RELEASE-p3 FreeBSD 7.1-RELEASE-p3 #1: Mon Mar 23 11:30:39 NOVT 2009     root@n1.net.zond.org:/usr/src/sys/amd64/compile/GENERIC  amd64
>Description:
Low performance problem on BCM5721 bge interface:
115343360 bytes transferred in 582.744354 secs (197931 bytes/sec)

Speed always ~190kb/sec

Test machine:
ASUS RS120-E5-PA4

CPU: Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz (2400.10-MHz K8-class CPU)
  Origin = "GenuineIntel"  Id = 0x6fb  Stepping = 11
Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0xe3bd<SSE3,RSVD2,MON,DS_CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM>
  AMD Features=0x20100800<SYSCALL,NX,LM>
  AMD Features2=0x1<LAHF>
  Cores per package: 4
usable memory = 4281401344 (4083 MB)
avail memory  = 4135686144 (3944 MB)


bge0: <Broadcom NetXtreme Gigabit Ethernet Controller, ASIC rev. 0x4201> mem 0xfeaf0000-0xfeafffff irq 16 at device 0.0 on pci3
bge1: <Broadcom NetXtreme Gigabit Ethernet Controller, ASIC rev. 0x4201> mem 0xfebf0000-0xfebfffff irq 17 at device 0.0 on pci4


bge0@pci0:3:0:0:        class=0x020000 card=0x81491043 chip=0x165914e4 rev=0x21 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = 'BCM5721 NetXtreme Gigabit Ethernet PCI Express'
    class      = network
    subclass   = ethernet
bge1@pci0:4:0:0:        class=0x020000 card=0x81491043 chip=0x165914e4 rev=0x21 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = 'BCM5721 NetXtreme Gigabit Ethernet PCI Express'
    class      = network
    subclass   = ethernet 

I try use if_bge.c and if_bgereg.h from 190194 revision, but problem stay.

Is there any solutions?
>How-To-Repeat:
nc -l 15000 > /dev/null
dd if=/dev/zero bs=1m count=102400 | nc host 15000
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: brucec 
Responsible-Changed-When: Wed Mar 25 12:31:28 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=132991 
State-Changed-From-To: open->feedback 
State-Changed-By: yongari 
State-Changed-When: Wed Mar 3 20:53:05 UTC 2010 
State-Changed-Why:  
Is this still problem on recent FreeBSD stable/8, stable/7 or 
7.3-RELEASE? If you still have performance problems, please show 
me the output of "pciconf -lcv" and "ifconfig bge0" and verbosed 
dmesg output of bge(4) and brgphy(4). 


Responsible-Changed-From-To: freebsd-net->yongari 
Responsible-Changed-By: yongari 
Responsible-Changed-When: Wed Mar 3 20:53:05 UTC 2010 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=132991 
State-Changed-From-To: feedback->closed 
State-Changed-By: yongari 
State-Changed-When: Thu Oct 21 20:24:05 UTC 2010 
State-Changed-Why:  
Close(feedback timed out). If you still see the issue on more 
recent FreeBSD releases(7.3-RELEASE or 8.1-RELEASE) please open a 
new PR. 
Thanks for reporting. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=132991 
>Unformatted:
