Don't spin on cleanup_lock if we are not interrupt.
If somebody else holds that lock, it will likely do the work for us. If it won't, then we return here later and retry. Under heavy load it allows to avoid lock congestion between interrupt and polling threads. MFC after: 1 week Sponsored by: iXsystems, Inc.
This commit is contained in:
parent
f23df31975
commit
8acd3f126a
@ -789,7 +789,12 @@ ioat_process_events(struct ioat_softc *ioat, boolean_t intr)
|
||||
uint32_t completed, chanerr;
|
||||
int error;
|
||||
|
||||
mtx_lock(&ioat->cleanup_lock);
|
||||
if (intr) {
|
||||
mtx_lock(&ioat->cleanup_lock);
|
||||
} else {
|
||||
if (!mtx_trylock(&ioat->cleanup_lock))
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Don't run while the hardware is being reset. Reset is responsible
|
||||
|
Loading…
x
Reference in New Issue
Block a user