From nobody Thu Nov 28 07:48:11 2024 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 4XzT241Kl2z5fLMQ; Thu, 28 Nov 2024 07:48:12 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XzT240pJcz4CVl; Thu, 28 Nov 2024 07:48:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732780092; 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=rl60EVbF1jDyEtk3slOqy7yaKb8rzh1CQzOAh1PIGkc=; b=njj+gDDdGGVDC6Amj9NU+1Zt1GgqCi3hD3RgTxnxi7x/6kR0eoompSnmvftesyH9BKbCLT vxtj9CVC5WZH4VZ/e6VK0L3diPfQmN+ua8zcdkeQBKH3vwalHsxG4kc4e6TSO6/vRI0pyi w7gbMn+NYSwcBLovPYO/E/RMCBwpCySHDloR7miJSW2TOROsvZ+dp62RcqGk02sgF1dOnJ odIB7zWKA8z+pC9MQHsY+RN8NK64qBHJvRRyOVljREPEBXqOlO03+x2sm5a9liq7QrViM5 HvZSMFY0PyWIUs8OR/RpifgSDJZaThDmfdSlAyH+2ncpBPRkAbS3GjzKC5HhfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732780092; 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=rl60EVbF1jDyEtk3slOqy7yaKb8rzh1CQzOAh1PIGkc=; b=tOVjNDYqNfIi/0S3A634U5+vb3Fyojv/ME0sHOccJVLF3hdTwoGcEqVJixDDRYVr5BHZZn WaBgUHhVWAow/3fcq95rYysD/vg2Czsw7I1BBN+Bq6O9+OJUwhugOqOgcuRVmXPuWJ9ybA 0MloeGOODDCBhUoB0J4hAAAfEtBpbLwwE/q3DYw6fsiDBrhXlHFaiiLqvqUSMwOek+XusY YlFwm8VNEEaH2Po1RfgpuZ2J7wF5Li2nyFfkKHJ4nw74YmztSLMK6tjpm4vnp2xU8h2ti4 fVE6u2FqtglyRm/sQ+/vkvPWVT9M/GFYJqshiVkkBTae3CaKAynciNjIGlJdkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732780092; a=rsa-sha256; cv=none; b=ZXJvT+D5E9NaPWcu7N6GkMH44k8DgKSzpbZZOT2mUKkiUeop2MKjfB9dbs7l7zon+U0lgh knYdjbR5LTHbY63QXRSV9VAr8Jdj5zw6ud/cJUZTUN5dWZtwgO2pf4Py3vaJ9GG2+FExrY T19xH/1swdquflM17LBSyNFNSo+mbuV9xRnAXdOnXkYhlgSznSrDA0F5Uc9iJWxsPpoUi0 rJxNHPI4KB++GhzbyuyY59tuoSB5gYBWnsG8AFx7ntlYiuYJyi5mF5GePrHN/43V9w3Cf6 liPk3tr4R4upriMuZK6O96ABPko2KUkZi7/C6ID5d6ZxUBGyA/ZXr9lk/QxvdA== 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 4XzT240MFczW8n; Thu, 28 Nov 2024 07:48:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AS7mBkl072501; Thu, 28 Nov 2024 07:48:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AS7mBMX072498; Thu, 28 Nov 2024 07:48:11 GMT (envelope-from git) Date: Thu, 28 Nov 2024 07:48:11 GMT Message-Id: <202411280748.4AS7mBMX072498@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 456666408f64 - main - Speed up syncer shutdown 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 456666408f64d18c68b79ae13f5ae063df3c7293 Auto-Submitted: auto-generated The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=456666408f64d18c68b79ae13f5ae063df3c7293 commit 456666408f64d18c68b79ae13f5ae063df3c7293 Author: Edward Tomasz Napierala AuthorDate: 2024-11-27 22:33:23 +0000 Commit: Edward Tomasz Napierala CommitDate: 2024-11-28 07:47:52 +0000 Speed up syncer shutdown When shutting down, the syncer kernel deamon needs to iterate over all 32 of its queues, pausing for 1/4 of second each time waiting for essentially nothing. Bump the SYNCER_SHUTDOWN_SPEEDUP so that it takes just a second to iterate. It will still wait for another second afterwards; that bit is left unchanged. Reviewed By: kib Differential Revision: https://reviews.freebsd.org/D47647 --- sys/kern/vfs_subr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 8f582eb4ca01..feb808c0d4c7 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -323,9 +323,10 @@ DPCPU_DEFINE_STATIC(struct vdbatch, vd); static void vdbatch_dequeue(struct vnode *vp); /* - * When shutting down the syncer, run it at four times normal speed. + * The syncer will require at least SYNCER_MAXDELAY iterations to shutdown; + * we probably don't want to pause for the whole second each time. */ -#define SYNCER_SHUTDOWN_SPEEDUP 4 +#define SYNCER_SHUTDOWN_SPEEDUP 32 static int sync_vnode_count; static int syncer_worklist_len; static enum { SYNCER_RUNNING, SYNCER_SHUTTING_DOWN, SYNCER_FINAL_DELAY }