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
This commit is contained in:
Andrew Gallatin 2018-05-15 23:55:38 +00:00
parent b3a8db007a
commit 9a6981ef5b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=333655

View File

@ -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)