Date: Tue, 7 Jan 2020 00:54:23 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356429 - stable/12/sys/dev/ioat Message-ID: <202001070054.0070sNUu005203@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Tue Jan 7 00:54:23 2020 New Revision: 356429 URL: https://svnweb.freebsd.org/changeset/base/356429 Log: MFC r356216: 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. Modified: stable/12/sys/dev/ioat/ioat.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ioat/ioat.c ============================================================================== --- stable/12/sys/dev/ioat/ioat.c Mon Jan 6 21:23:14 2020 (r356428) +++ stable/12/sys/dev/ioat/ioat.c Tue Jan 7 00:54:23 2020 (r356429) @@ -788,7 +788,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?202001070054.0070sNUu005203>