Date: Tue, 31 Dec 2019 04:16:53 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r356216 - head/sys/dev/ioat Message-ID: <201912310416.xBV4Grai022903@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912310416.xBV4Grai022903>