Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jan 2022 19:30:59 GMT
From:      Colin Percival <cperciva@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: d4724934f2e4 - stable/13 - vfs_mountroot: Skip 'Root mount waiting' < 1 s
Message-ID:  <202201121930.20CJUxM0054076@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by cperciva:

URL: https://cgit.FreeBSD.org/src/commit/?id=d4724934f2e41c850c0e714ebb89f888252b0ddd

commit d4724934f2e41c850c0e714ebb89f888252b0ddd
Author:     Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2021-12-20 15:17:25 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2022-01-12 19:29:37 +0000

    vfs_mountroot: Skip 'Root mount waiting' < 1 s
    
    While the message is technically correct, it's not particularly
    helpful in the case where we're only waiting a few ms; this case
    occurs frequently on EC2 arm64 instances with CAM initialization
    racing to release its root hold before vfs_mountroot reaches this
    point.  Only print the message if we end up waiting for more than
    one second.
    
    Sponsored by:   https://www.patreon.com/cperciva
    Differential Revision:  https://reviews.freebsd.org/D33591
    
    (cherry picked from commit e6db5eb9ec7ba9edfc564fd5ade5fb40df9acebb)
---
 sys/kern/vfs_mountroot.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/kern/vfs_mountroot.c b/sys/kern/vfs_mountroot.c
index 9a3895b6f830..3ea9a7397d06 100644
--- a/sys/kern/vfs_mountroot.c
+++ b/sys/kern/vfs_mountroot.c
@@ -987,6 +987,7 @@ vfs_mountroot_wait(void)
 
 	curfail = 0;
 	lastfail.tv_sec = 0;
+	ppsratecheck(&lastfail, &curfail, 1);
 	while (1) {
 		g_waitidle();
 		mtx_lock(&root_holds_mtx);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202201121930.20CJUxM0054076>