svn commit: r297707 - head/sys/dev/vnic

Wojciech Macek wma at FreeBSD.org
Fri Apr 8 11:20:57 UTC 2016


Author: wma
Date: Fri Apr  8 11:20:56 2016
New Revision: 297707
URL: https://svnweb.freebsd.org/changeset/base/297707

Log:
  Speedup BGX link polling on ARM64
  
  The previous values caused the callout thread stall for 100ms each 2s
  if no link is present. Dtrace analysis showed that it has significant
  impact on overall interrupt performance.
  Decrease these values by a factor of 100.
  
  Obtained from:         Semihalf
  Sponsored by:          Cavium
  Reviewed by:           zbb
  Differential Revision: https://reviews.freebsd.org/D5854

Modified:
  head/sys/dev/vnic/thunder_bgx.c

Modified: head/sys/dev/vnic/thunder_bgx.c
==============================================================================
--- head/sys/dev/vnic/thunder_bgx.c	Fri Apr  8 11:15:26 2016	(r297706)
+++ head/sys/dev/vnic/thunder_bgx.c	Fri Apr  8 11:20:56 2016	(r297707)
@@ -240,7 +240,7 @@ static int
 bgx_poll_reg(struct bgx *bgx, uint8_t lmac, uint64_t reg, uint64_t mask,
     boolean_t zero)
 {
-	int timeout = 100;
+	int timeout = 10;
 	uint64_t reg_val;
 
 	while (timeout) {
@@ -250,7 +250,7 @@ bgx_poll_reg(struct bgx *bgx, uint8_t lm
 		if (!zero && (reg_val & mask))
 			return (0);
 
-		DELAY(1000);
+		DELAY(100);
 		timeout--;
 	}
 	return (ETIMEDOUT);


More information about the svn-src-head mailing list