git: 456666408f64 - main - Speed up syncer shutdown
- Reply: Olivier Certner : "Re: git: 456666408f64 - main - Speed up syncer shutdown"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 28 Nov 2024 07:48:11 UTC
The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=456666408f64d18c68b79ae13f5ae063df3c7293 commit 456666408f64d18c68b79ae13f5ae063df3c7293 Author: Edward Tomasz Napierala <trasz@FreeBSD.org> AuthorDate: 2024-11-27 22:33:23 +0000 Commit: Edward Tomasz Napierala <trasz@FreeBSD.org> 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 }