Author: mav
Date: Tue Dec 31 04:16:52 2019
New Revision: 356216
URL: https://svnweb.freebsd.org/changeset/base/356216
Log:
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.
Modified:
head/sys/dev/ioat/ioat.c
Modified: head/sys/dev/ioat/ioat.c
==============================================================================
--- head/sys/dev/ioat/ioat.c Tue Dec 31 04:00:24 2019 (r356215)
+++ head/sys/dev/ioat/ioat.c Tue Dec 31 04:16:52 2019 (r356216)
@@ -789,7 +789,12 @@ ioat_process_events(struct ioat_softc *ioat, boolean_t
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
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"