From nobody Sun Dec 12 21:49:54 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 544F018D7690; Sun, 12 Dec 2021 21:49:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JBywg09h6z4qjw; Sun, 12 Dec 2021 21:49:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB708B99; Sun, 12 Dec 2021 21:49:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BCLnsTi046463; Sun, 12 Dec 2021 21:49:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BCLns6u046462; Sun, 12 Dec 2021 21:49:54 GMT (envelope-from git) Date: Sun, 12 Dec 2021 21:49:54 GMT Message-Id: <202112122149.1BCLns6u046462@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: 0b29683b32df - main - bhyve: set EV_CLEAR for EVFILT_VNODE mevents List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b29683b32df0233a85f597836e61cc6432a3e4f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639345795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fg9zMEgxETyceq4wtN5YM8MgQzH5Hloly2Gk0UhL68c=; b=Nw2XcZX/pnXscwjug077+HkGNEIwDPNHCUtwgyWwA4eLki9zirIB3VBzRQcYyMVzBDzm9e hjNrIp2aJax3bUVSu8Aew6mh4E0YUrcWReH9w1L5vIHIiCvlxv+zkeBKi9zilyiQj5kZAd uswnRJ1OZMn9jUuRkilCVxFTk309mcZkf+6maTYZDTUoOKKR4puhvD/84GvuzSzxVsRxED wEHhgt54/RjoXffyGb6C5L4TbGZ+8+kiIBMS0tJ0hhTNSUkWwTpzzd6bGd9ZMD2JbHbK7t /VW3hYidBDroVlQguuzRBn/Wu3/X9pm3c9V5RTtjqgwi/CvPltKLxJMY1PUKvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639345795; a=rsa-sha256; cv=none; b=amCStQjS+h3VPnpe4VhSwuitarzhRlx93iFGmJCCClo+JxEPv9rWj2YxF8pXJmQT8ZGOyb Rx/rCB079OcKo4Zm3WO4HhpobRoM2Krn+ubtJKLcSDf9UgYYbvbGKYCKZuRRWadc3XnOQU 3MC+C+V9DbJhboBSrvFRcUpEUcN2rhFS+z6Sam3iATjTxQGru1rno10pVZPN4QvAXODGfM z5SpWMgxnaUCZduDlHHrURpvlPlaraAUVOYQ/N3uFOeiMo+bjWrRKoAwACPXQhhXGiJ+6C VUzFEC9ldq7FPHxQ8A2gr3QVbY0FAkWNbOQw6d94aJCYqq3fu8ADFBZQLqxnUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=0b29683b32df0233a85f597836e61cc6432a3e4f commit 0b29683b32df0233a85f597836e61cc6432a3e4f Author: Robert Wing AuthorDate: 2021-12-12 21:39:40 +0000 Commit: Robert Wing CommitDate: 2021-12-12 21:39:40 +0000 bhyve: set EV_CLEAR for EVFILT_VNODE mevents When an EVFILT_VNODE filter event is triggered, reset it. This fixes the issue where a virtio-blk resize event would cause the mevent thread to consume 100% of the cpu. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D33326 --- usr.sbin/bhyve/mevent.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/mevent.c b/usr.sbin/bhyve/mevent.c index eb84dc15ad47..5170251e008b 100644 --- a/usr.sbin/bhyve/mevent.c +++ b/usr.sbin/bhyve/mevent.c @@ -175,7 +175,14 @@ mevent_kq_filter(struct mevent *mevp) static int mevent_kq_flags(struct mevent *mevp) { - return (mevp->me_state); + int retval; + + retval = mevp->me_state; + + if (mevp->me_type == EVF_VNODE) + retval |= EV_CLEAR; + + return (retval); } static int