Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Dec 2009 18:00:25 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/dev/vge if_vge.c if_vgereg.h if_vgevar.h
Message-ID:  <200912171800.nBHI0i6R025727@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
yongari     2009-12-17 18:00:25 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/vge          if_vge.c if_vgereg.h if_vgevar.h 
  Log:
  SVN rev 200638 on 2009-12-17 18:00:25Z by yongari
  
  Implement interrupt moderation scheme supported by VT61xx
  controllers. TX/RX interrupt mitigation is controlled by
  VGE_TXSUPPTHR and VGE_RXSUPPTHR register. These registers suppress
  generation of interrupts until the programmed frames counter equals
  to the registers. VT61xx also supports interrupt hold off timer
  register. If this interrupt hold off timer is active all interrupts
  would be disabled until the timer reaches to 0. The timer value is
  reloaded whenever VGE_ISR register written. The timer resolution is
  about 20us.
  
  Previously vge(4) used single shot timer to reduce Tx completion
  interrupts. This required VGE_CRS1 register access in Tx
  start/completion handler to rearm new timeout value and it did not
  show satisfactory result(more than 50k interrupts under load). Rx
  interrupts was not moderated at all such that vge(4) used to
  generate too many interrupts which in turn made polling(4) better
  approach under high network load.
  
  This change activates all interrupt moderation mechanism and
  initial values were tuned to generate interrupt less than 8k per
  second. That number of interrupts wouldn't add additional packet
  latencies compared to polling(4). These interrupt parameters could
  be changed with sysctl.
  dev.vge.%d.int_holdoff
  dev.vge.%d.rx_coal_pkt
  dev.vge.%d.tx_coal_pkt
  Interface has be brought down and up again before change take
  effect.
  
  With interrupt moderation there is no more need to loop in
  interrupt handler. This loop always added one more register access.
  While I'm here remove dead code which tried to implement subset of
  interrupt moderation.
  
  Revision  Changes    Path
  1.68      +85 -78    src/sys/dev/vge/if_vge.c
  1.6       +1 -2      src/sys/dev/vge/if_vgereg.h
  1.17      +17 -0     src/sys/dev/vge/if_vgevar.h



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