svn commit: r333655 - head/sys/sys

Andrew Gallatin gallatin at FreeBSD.org
Tue May 15 23:55:39 UTC 2018


Author: gallatin
Date: Tue May 15 23:55:38 2018
New Revision: 333655
URL: https://svnweb.freebsd.org/changeset/base/333655

Log:
  Unhook DEBUG_BUFRING from INVARIANTS
  
  Some of the DEBUG_BUFRING checks are racy, and can lead to
  spurious assertions when run under high load.  Unhook these
  from INVARIANTS until the author can fix or remove them.
  
  Reviewed by:	mmacy
  Sponsored by:	Netflix

Modified:
  head/sys/sys/buf_ring.h

Modified: head/sys/sys/buf_ring.h
==============================================================================
--- head/sys/sys/buf_ring.h	Tue May 15 23:46:49 2018	(r333654)
+++ head/sys/sys/buf_ring.h	Tue May 15 23:55:38 2018	(r333655)
@@ -34,10 +34,6 @@
 
 #include <machine/cpu.h>
 
-#if defined(INVARIANTS) && !defined(DEBUG_BUFRING)
-#define DEBUG_BUFRING 1
-#endif
-
 #ifdef DEBUG_BUFRING
 #include <sys/lock.h>
 #include <sys/mutex.h>
@@ -69,6 +65,12 @@ buf_ring_enqueue(struct buf_ring *br, void *buf)
 	uint32_t prod_head, prod_next, cons_tail;
 #ifdef DEBUG_BUFRING
 	int i;
+
+	/*
+	 * Note: It is possible to encounter an mbuf that was removed
+	 * via drbr_peek(), and then re-added via drbr_putback() and
+	 * trigger a spurious panic.
+	 */
 	for (i = br->br_cons_head; i != br->br_prod_head;
 	     i = ((i + 1) & br->br_cons_mask))
 		if(br->br_ring[i] == buf)


More information about the svn-src-all mailing list