mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=356216
|
@ -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…
Reference in a new issue