From nobody Sun Jan 23 19:59:51 2022 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 7F3131983C88; Sun, 23 Jan 2022 19:59:52 +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 4JhkVJ0SwVz4ZKj; Sun, 23 Jan 2022 19:59:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642967992; 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=OZOwD8pwsbu8C5KeDz1oGO+UANBtSDll0h48tdCa2EI=; b=Ve/9KaIq25kKQ0hcK+tUzXDb+OPzsvnnMNnxvU49sCjCrjPIbhY0ixPL+7yZsG+87rr2bQ uhhfrYJ+cvuC15akjmntPAlfL+PBJTha4T5hMNLWmXuVEOBvjcyPlojk/I+xbfOJzqo5jG PQRM6ifYfJNmyBWsW1i7hI7dZMx4El2xFWsbXTQGgnn/FAS4xWE88Jq9ltUZq57uxoaBVV 6zlozX5y7ia7pg2Nf7poh8sQdQM/Kt9QsHC/nsFxPOPHcYPyWJJhz3EuFzbFGqIFe6jXS7 PrOsUaZL+rMGU+Noy2JplBh+9VrbPDY+qvoqhmL+GEOmhiQpKgBSxQ3ynNBIOw== 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 D0908616; Sun, 23 Jan 2022 19:59:51 +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 20NJxpLX064188; Sun, 23 Jan 2022 19:59:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20NJxpx9064187; Sun, 23 Jan 2022 19:59:51 GMT (envelope-from git) Date: Sun, 23 Jan 2022 19:59:51 GMT Message-Id: <202201231959.20NJxpx9064187@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 15e1d8f69bcc - stable/13 - Fix inverse sleep logic in buf_daemon(). 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 15e1d8f69bcce73566bceae106c19b5394c6f88a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642967992; 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=OZOwD8pwsbu8C5KeDz1oGO+UANBtSDll0h48tdCa2EI=; b=kY1lOx/PlDxNHe8yK0n7lTkPGSV6yH7bemQFXJR9Rp1vAG6PpNCcOhz8wNmv3gOz2IKrAt Pk+4OUEcRPPlvVAiCqI/yDvg7hyHMawHXWBpJ3aGjN8+aHUOYE01Rsi3DljIpgskAsDgLJ IWWEDnvYhQN/mjxz1CohdA9Uy3DdEBq2Q2HilMaPGURUBqtRnFYpc0Z/m1SDSksZDOKMGu y9kZgEiSwuYlIYBdmng3Uy2mB216s/QrnWyi9TWDvycfL5idruj6gyj7Wqn2jN9TRZvMVq 8sc+pjLyBizgrgE6U+arINkC6qGvvZGUOnpBRa4+TbRR1PRPKO1OVnQcGQPSJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642967992; a=rsa-sha256; cv=none; b=gCSB1J8y+a6qaJAlRf9SndXNGfWkOxl5trRWSwOl2+Jr4Fgr1vzhwuRd+q0jiaO/D8NauA YXrFC7T5RNk6Xzf/XjwmP8fzluKleZr1/dO9QJaPiFrta76MXEg/vuHfyE3gtAeCNgfciq WzXbeuovjYY6sYoeMF4NPR6jdU7UWHHJAfKzQxMNnR33fj4Nnpyn4+SW8VdCU8UsrEBMDR L9yTRXdigG/HXNoKv1zbN0GleSM0GdRg3VL8Q1SUhvQucKR7BCbp2T/YpqDu9kSgcQIFEI LyPvv4FZFDynqC9zSRXLRnEhUKv7XT8TS2d5hSsfNycfCBNxCOjDeKbHxRObwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=15e1d8f69bcce73566bceae106c19b5394c6f88a commit 15e1d8f69bcce73566bceae106c19b5394c6f88a Author: Alexander Motin AuthorDate: 2022-01-16 00:32:36 +0000 Commit: Alexander Motin CommitDate: 2022-01-23 19:57:35 +0000 Fix inverse sleep logic in buf_daemon(). Before commit 3cec5c77d617 buf_daemon() went to longer 1s sleep if numdirtybuffers <= lodirtybuffers. After that commit new condition !BIT_EMPTY(BUF_DOMAINS, &bdlodirty) got opposite -- true when one or more more domains is above lodirtybuffers. As result, on freshly booted system with no dirty buffers buf_daemon() wakes up 10 times per second and probably only 1 time per second when there is actual work to do. MFC after: 1 week Reviewed by: kib, markj Tested by: pho Differential revision: https://reviews.freebsd.org/D33890 (cherry picked from commit e76c0108990b52a25f548cba4c0f1b8db59c6b8b) --- sys/kern/vfs_bio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index dc470512a066..5c5cfc8cd5d5 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -3455,7 +3455,7 @@ buf_daemon() * to avoid endless loops on unlockable buffers. */ mtx_lock(&bdlock); - if (!BIT_EMPTY(BUF_DOMAINS, &bdlodirty)) { + if (BIT_EMPTY(BUF_DOMAINS, &bdlodirty)) { /* * We reached our low water mark, reset the * request and sleep until we are needed again.