Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Jan 2011 20:25:40 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/dev/re if_re.c src/sys/pci if_rlreg.h
Message-ID:  <201101262026.p0QKQ0su045406@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help

yongari     2011-01-26 20:25:40 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/re           if_re.c 
    sys/pci              if_rlreg.h 
  Log:
  SVN rev 217902 on 2011-01-26 20:25:40Z by yongari
  
  Do not use interrupt taskqueue on controllers with MSI/MSI-X
  capability. One of reason using interrupt taskqueue in re(4) was
  to reduce number of TX/RX interrupts under load because re(4)
  controllers have no good TX/RX interrupt moderation mechanism.
  Basic TX interrupt moderation is done by hardware for most
  controllers but RX interrupt moderation through undocumented
  register showed poor RX performance so it was disabled in r215025.
  Using taskqueue to handle RX interrupt greatly reduced number of
  interrupts but re(4) consumed all available CPU cycles to run the
  taskqueue under high TX/RX network load.  This can happen even with
  RTL810x fast ethernet controller and I believe this is not
  acceptable for most systems.
  
  To mitigate the issue, use one-shot timer register to moderate RX
  interrupts. The timer register provides programmable one-shot timer
  and can be used to suppress interrupt generation. The timer runs at
  125MHZ on PCIe controllers so the minimum time allowed for the
  timer is 8ns. Data sheet says the register is 32 bits but
  experimentation shows only lower 13 bits are valid so maximum time
  that can be programmed is 65.528us. This yields theoretical maximum
  number of RX interrupts that could be generated per second is about
  15260. Combined with TX completion interrupts re(4) shall generate
  less than 20k interrupts. This number is still slightly high
  compared to other intelligent ethernet controllers but system is
  very responsive even under high network load.
  
  Introduce sysctl variable dev.re.%d.int_rx_mod that controls amount
  of time to delay RX interrupt processing in units of us. Value 0
  completely disables RX interrupt moderation. To provide old
  behavior for controllers that have MSI/MSI-X capability, introduce
  a new tunable hw.re.intr_filter. If the tunable is set to non-zero
  value, driver will use interrupt taskqueue. The default value of
  the tunable is 0. This tunable has no effect on controllers that
  has no MSI/MSI-X capability or if MSI/MSI-X is explicitly disabled
  by administrator.
  
  While I'm here cleanup interrupt setup/teardown since re(4) uses
  single MSI/MSI-X message at this moment.
  
  Revision  Changes    Path
  1.193     +175 -32   src/sys/dev/re/if_re.c
  1.113     +10 -0     src/sys/pci/if_rlreg.h



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101262026.p0QKQ0su045406>