Opened 6 years ago

Closed 4 years ago

#13770 closed bug (invalid)

Poor rtl8139 performance

Reported by: kallisti5 Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Drivers/Network/rtl8139 Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by kallisti5)

rtl8139 performance is extremely random.

Host system:

libvirtd + kvm on Linux

Control:

Prepare a Haiku VM.

  • hrev51540
  • 4 cores
  • virtio disk
  • Network card. "Source Mode: Bridge". Driver: e1000

Download a kernel from kernel.org. Observe download speed. Should be consistent limited by your local internet connection.

Test:

  • Power off vm
  • Change network card to the "rtl8139" driver.
  • Boot.

Download a kernel from kernel.org. Observe download speed.

In my tests, the download starts strong at 7MB/s, but then suddenly drops to 230KB/s after somewhere between 7% - 60% downloaded.

Other observations:

  • CPU
    • With rtl8139, during speed reduction, one core is pegged at 100%.
    • With e1000, all cores have low even load.
  • Input
    • With rtl8139, during speed reduction, mouse movement freezes up
    • With e1000, mouse movement remains normal.

Given the observations above, this issue could be related to an interrupt storm.

Change History (5)

comment:1 by kallisti5, 6 years ago

Description: modified (diff)

comment:2 by kallisti5, 6 years ago

After a download test:

rtl8139

Interrupts:

int  11, enabled 3, handled  4923840, unhandled        0
   rtl81xx:re_intr                            (0xffffffff8659a41d), data 0xffffffff88edf000, handled  4922558
   ehci:_ZN4EHCI16InterruptHandlerEPv         (0xffffffff819a9a8a), data 0xffffffff8217a000, handled     1282
   uhci:_ZN4UHCI16InterruptHandlerEPv         (0xffffffff819338d2), data 0xffffffff8217a200, handled        0

Logs:

kdebug> syslog | grep rtl
[rtl81xx] (re) bus_alloc_resource(3, [20], 0x0, 0xffffffffffffffff, 0x1,0x2)
[rtl81xx] (re) MSI count : 0
[rtl81xx] (re) MSI-X count : 0
[rtl81xx] (re) bus_alloc_resource(1, [0], 0x0, 0xffffffffffffffff, 0x1,0x6)
[rtl81xx] (re) Chip rev. 0x74800000
[rtl81xx] (re) MAC rev. 0x00000000
[rtl81xx] rtl81xx: /dev/net/rtl81xx/0
[rtl81xx] () Found MII: rlphy
[rtl81xx] () OUI 0x000000, model 0x0000, rev. 0
[rtl81xx] ()  ifmedia_add: Adding Entry...
rtl81xx: init_driver(0xffffffff865b0f10) at 5
loaded driver /boot/system/add-ons/kernel/drivers/dev/net/rtl81xx
[net/rtl81xx/0] compat_open(0x2)
/dev/net/rtl81xx/0: media change, media 0x900026 quality 1000 speed 10000000

e1000 Interrupts:

int  11, enabled 3, handled    40292, unhandled        0
   ipro1000:lem_irq_fast                      (0xffffffff865ece9d), data 0xffffffff88fe1000, handled    39747
   ehci:_ZN4EHCI16InterruptHandlerEPv         (0xffffffff819a9a8a), data 0xffffffff8217a000, handled      545
   uhci:_ZN4UHCI16InterruptHandlerEPv         (0xffffffff819338d2), data 0xffffffff8217a200, handled        0

rtl8139 seems to be generating a lot of interrupts...

comment:3 by diver, 6 years ago

Summary: Pool rtl8139 performancePoor rtl8139 performance

comment:4 by waddlesplash, 6 years ago

Please try again following the FreeBSD driver upgrades.

comment:5 by waddlesplash, 4 years ago

Component: Drivers/Network/rtl81xxDrivers/Network/rtl8139
Keywords: rtl8139 removed
Resolution: invalid
Status: newclosed

Actually, based on the comment in the source, it looks like this is "expected": https://xref.landonf.org/source/xref/haiku/src/add-ons/kernel/drivers/network/rtl8139/dev/rl/if_rl.c#48

Note: See TracTickets for help on using tickets.