From nobody Thu May 7 11:59:29 2026 X-Original-To: dev-commits-src-all@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 4gB9lj6RH3z6c94L for ; Thu, 07 May 2026 11:59:29 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gB9lj30sVz3t6R for ; Thu, 07 May 2026 11:59:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1778155169; 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=27lrEmY1Z9Zo+eVBSgTLwKY7jiW3CH9L3eJjU12d0tk=; b=NYyYSV+2UQ2AO1Ku2ZiqDMYY6hcrUKPS27L/Jn7vRfGtnq1kdKfr4jWopwuVticVWVhAWj PDj5pc3A1NC8MqHexPJvNifreOrIZ8dHxz40jZf07B8K6Q2UiQxrOEkj+VzzoPRNpXRVW1 FVqO9ZnVJx4ba0mMTRqocuGvu8yyl7fVQUumrkguwp9iSXs9T7ODeD1yMiSdF7rVXKl8YG VxQoMVLAKq75PSZmp5UTnMgpmncyQYbFvJXykhgHuVTp/aA5F46Y+hzuaEeksEwmfqg96u LQRJ4QQ18TLtYbt2rDh8eOmrPsKbXiOrJNw4UYsnrn/yIkNLK6qURyInsUpryA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1778155169; a=rsa-sha256; cv=none; b=G63FaK0RLxMau1/w/CulKCLe6UXJcM/ARBDRfrLeBlsCZAIAfDfOoeIepKt5DReAgJmhcN XZ7L860ZZduh72V2E5sw9PW0byvuc0LxiiV0hUBfvcoQhY0mi6zNYW2ue3wwkcSWf6AYXP LiXSIzXluhUDqtiRL0JeCf55eZ/dVldgA4ezKy4SO5CgMNOOMpYK+3K7aYDw2tRvqHo1/1 i3vVEZfHYHP+AETQIFEFKfNfN2K+WBKHT14oaZ3K/1rYBxoA9HPCfvFGzJJxO3lmo63ub9 KmpZVRqgRS424CC3fYusJ2IEW9WGFPfMxvPoTj0S5kCF6PglHOdYBtmixGFFLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1778155169; 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=27lrEmY1Z9Zo+eVBSgTLwKY7jiW3CH9L3eJjU12d0tk=; b=wFup6dMrlUSpScE+a3OTgbpOz4O2ya/OmnBZzHoVWwoybtGoYw79chwxH4E7jP+sIlIUN0 MJ3fTL98XA7hLYtnzXOIsBFY6R/lX69dQ5Nsa9PXjkI0zw8A0RgdnEM7+88CzQi2Gbd6qq 5jepDzv13a7zKzCV8E2N1NBcD/XLSFKGOezGz84u/UxJpMFvkl2IiW7bcw3VtoV30cTFuV JYCaeOpTFedvlkyyvLdW3NFfopMEOA1QOAn+YJe5irmpFW1U5BvoUl/M4elv4RCnu2pPCf CaWNae+VrN3OLLZEEjxcgCwXPSwz06uDbiG9KBvPf+UM6vOxkV+ESs6pbS7IDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gB9lj2VdVz8m0 for ; Thu, 07 May 2026 11:59:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38277 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 07 May 2026 11:59:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: ce4e8c478a26 - main - bufspace_wait(): only try to help bufdaemon if there is a chance to help List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ce4e8c478a261ce6c7af7d81817f86420c5239b9 Auto-Submitted: auto-generated Date: Thu, 07 May 2026 11:59:29 +0000 Message-Id: <69fc7ea1.38277.2ead2076@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ce4e8c478a261ce6c7af7d81817f86420c5239b9 commit ce4e8c478a261ce6c7af7d81817f86420c5239b9 Author: Konstantin Belousov AuthorDate: 2026-04-22 05:09:34 +0000 Commit: Konstantin Belousov CommitDate: 2026-05-07 11:59:11 +0000 bufspace_wait(): only try to help bufdaemon if there is a chance to help Only call buf_flush() if there are some dirty buffers belonging to the vnode we are allocating the buffer for. Otherwise the bd dirty queue scan cannot find anything and it makes no sense to spend CPU doing it. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/vfs_bio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 8f47a7abbc5e..675f6fb4e526 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -727,7 +727,8 @@ bufspace_wait(struct bufdomain *bd, struct vnode *vp, int gbflags, BD_LOCK(bd); while (bd->bd_wanted) { if (vp != NULL && vp->v_type != VCHR && - (td->td_pflags & TDP_BUFNEED) == 0) { + (td->td_pflags & TDP_BUFNEED) == 0 && + vp->v_bufobj.bo_dirty.bv_cnt > 0) { BD_UNLOCK(bd); /* * getblk() is called with a vnode locked, and