mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-20 00:33:57 +00:00
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:
parent
b3a8db007a
commit
9a6981ef5b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=333655
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue