Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Oct 2020 21:54:08 +0000
From:      bugzilla-noreply@freebsd.org
To:        net@FreeBSD.org
Subject:   [Bug 248652] iflib: netmap pkt-gen large TX performance difference between 11-STABLE and 12-STABLE/CURRENT on ix & ixl NIC
Message-ID:  <bug-248652-7501-0NSAWzb3A2@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-248652-7501@https.bugs.freebsd.org/bugzilla/>
References:  <bug-248652-7501@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D248652

--- Comment #42 from commit-hook@FreeBSD.org ---
A commit references this bug:

Author: vmaffione
Date: Tue Oct 27 21:53:33 UTC 2020
New revision: 367093
URL: https://svnweb.freebsd.org/changeset/base/367093

Log:
  iflib: add per-tx-queue netmap timer

  The way netmap TX is handled in iflib when TX interrupts are not
  used (IFC_NETMAP_TX_IRQ not set) has some issues:
    - The netmap_tx_irq() function gets called by iflib_timer(), which
      gets scheduled with tick granularity (hz). This is not frequent
      enough for 10Gbps NICs and beyond (e.g., ixgbe or ixl). The end
      result is that the transmitting netmap application is not woken
      up fast enough to saturate the link with small packets.
    - The iflib_timer() functions also calls isc_txd_credits_update()
      to ask for more TX completion updates. However, this violates
      the netmap requirement that only txsync can access the TX queue
      for datapath operations. Only netmap_tx_irq() may be called out
      of the txsync context.

  This change introduces per-tx-queue netmap timers, using microsecond
  granularity to ensure that netmap_tx_irq() can be called often enough
  to allow for maximum packet rate. The timer routine simply calls
  netmap_tx_irq() to wake up the netmap application. The latter will
  wake up and call txsync to collect TX completion updates.

  This change brings back line rate speed with small packets for ixgbe.
  For the time being, timer expiration is hardcoded to 90 microseconds,
  in order to avoid introducing a new sysctl.
  We may eventually implement an adaptive expiration period or use another
  deferred work mechanism in place of timers.

  Also, fix the timers usage to make sure that each queue is serviced
  by a different CPU.

  PR:   248652
  Reported by:  sg@efficientip.com
  MFC after:    2 weeks

Changes:
  head/sys/net/iflib.c

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-248652-7501-0NSAWzb3A2>