From nobody Thu Sep 7 01:12:22 2023 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 4Rh1SK12cpz4rvgj; Thu, 7 Sep 2023 01:12:33 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rh1SK0ZwDz3GQ2; Thu, 7 Sep 2023 01:12:33 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694049153; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5kGkveKA2D+qoOZJT6jagBnKmCB59osv+Q+6POSSH7k=; b=LPWtNzqUqLEhrmk8xfNQJGs9X168qGNceRpX3Ro0WgS0jb42CWG9RFrs/rBaNSEKfwnrk3 4F0YVvIAVJYjrtSpAjaREI9t+rfdlfLlTvzbQ6/MxRCOEdV0JF0a5svE0q6WJRMUIi5UCj djo/dZeq+o6X9Yo2Sa/sQMDY93zO7K8Hh8emgt5TugxRingh7wNfW0ky6z+RjzdTBEajth wuyqpD7yUpYFIJpstlgBUO14M/MzTuftTkbTjC9wSVn//DDNWa6ffhdhNcnZ/i5jsD0swY gqzCTCmQWfyePbA8xUrB3K39oDKXLcyQvtdIiIV73xeM2iqD5Yzhqz4Q2C2ndw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694049153; a=rsa-sha256; cv=none; b=FADdetImfE03XbLYBBiK9Vujj9mzfyulcZRNNScgRkAn5Sbltf5P2bBq8Ua3+ImNwwYSb0 wnLtNpLS4SVyCxLKzrIjZrQH98IuDHBwOSdegxhID6i+94U3uI2HtpdjB7AeTFl3LLmjgE VFa20HagMJOOPpGs5FeQwe5cX7uq8TNhg0yPi7mhkbPWEGoeCuU/7rMsL6msOEeCic1b/t mqL3oY5ZBLyKFgKcR7K/BenE8p6Qo2RplyY0Sx/ZbmXPakOTLW6gMUThZEASE5PdM47Ntw rjhYaieEmDdhguRA3kSSD+9dwQj8cukRTMalxmKzR67rNcOogfv34UB1Rvoglw== 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=1694049153; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5kGkveKA2D+qoOZJT6jagBnKmCB59osv+Q+6POSSH7k=; b=ErQuUV69dFNq7wknqWdgacED+mWv/VarZE7Huu4c+DrVMCtleqFJ8HajpyydfXPq17JDfP hsNXN/I1jy21Y/ZA/rvj+GJUlIyYng8D8L0yD08VhdxS+Kt3mgjSomwIaTFxVvQdKQaY1u 22GUenCAKj6egHnHkKIvBZ4o+Dtl4nZhS0Csxjvxdg0YWt53pYL3H42CdSAfdk3BzQW6TU c5cAqSfT2Rxocyx+Cbkh12qKAnF+V50l2I2LZ+Yr9UAcHF+Bnsv3hbyJ6BhLU/co3eri9o PoFNJrTyxBl1C3gKLx0rwhnoFIFBQ90x6QCzecaBFnZYqrDD+OYKlxdhV7OZeg== Received: from smtpclient.apple (unknown [IPv6:2001:19f0:6001:9db:98f0:9fe0:3545:10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: zlei/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Rh1SH3QtQzyGQ; Thu, 7 Sep 2023 01:12:31 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Content-Type: text/plain; charset=us-ascii 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.4\)) Subject: Re: git: 1926d5cef6ea - main - init_main: Record completed SYSINITs From: Zhenlei Huang In-Reply-To: <202309061837.386Ib5AK086264@gitrepo.freebsd.org> Date: Thu, 7 Sep 2023 09:12:22 +0800 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <5BC96D9F-E4C4-4D34-B7B3-41576AD296DA@FreeBSD.org> References: <202309061837.386Ib5AK086264@gitrepo.freebsd.org> To: Colin Percival X-Mailer: Apple Mail (2.3696.120.41.1.4) > On Sep 7, 2023, at 2:37 AM, Colin Percival = wrote: >=20 > The branch main has been updated by cperciva: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D1926d5cef6eaa1302024d6471271c930= ad65f9b2 >=20 > commit 1926d5cef6eaa1302024d6471271c930ad65f9b2 > Author: Colin Percival > AuthorDate: 2023-09-05 23:47:57 +0000 > Commit: Colin Percival > CommitDate: 2023-09-06 18:36:36 +0000 >=20 > init_main: Record completed SYSINITs >=20 > When removing them from sysinit_list, append them to = sysinit_done_list; > print this list from 'show sysinit' along with the list of future > sysinits. So the `sysinit_done_list` is for DDB only. >=20 > Reviewed by: jhb, gallatin (previous version) > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D41749 > --- > sys/kern/init_main.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) >=20 > diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c > index a6b327339c80..a8df9f84a29a 100644 > --- a/sys/kern/init_main.c > +++ b/sys/kern/init_main.c > @@ -163,9 +163,11 @@ SYSINIT(placeholder, SI_SUB_DUMMY, SI_ORDER_ANY, = NULL, NULL); > SET_DECLARE(sysinit_set, struct sysinit); >=20 > /* > - * The sysinit list itself. Items are removed as they are run. > + * The sysinit lists. Items are moved to sysinit_done_list when = done. > */ > static STAILQ_HEAD(sysinitlist, sysinit) sysinit_list; > +static struct sysinitlist sysinit_done_list =3D > + STAILQ_HEAD_INITIALIZER(sysinit_done_list); Then it should be wrapped around with #ifdef DDB and #endif >=20 > /* > * Compare two sysinits; return -1, 0, or 1 if a comes before, at the = same time > @@ -289,6 +291,7 @@ mi_startup(void) > */ > while ((sip =3D STAILQ_FIRST(&sysinit_list)) !=3D NULL) { > STAILQ_REMOVE_HEAD(&sysinit_list, next); > + STAILQ_INSERT_TAIL(&sysinit_done_list, sip, next); Ditto. >=20 > if (sip->subsystem =3D=3D SI_SUB_DUMMY) > continue; /* skip dummy task(s)*/ > @@ -904,6 +907,11 @@ DB_SHOW_COMMAND_FLAGS(sysinit, db_show_sysinit, = DB_CMD_MEMSAFE) > db_printf("SYSINIT vs Name(Ptr)\n"); > db_printf(" Subsystem Order\n"); > db_printf(" Function(Name)(Arg)\n"); > + STAILQ_FOREACH(sip, &sysinit_done_list, next) { > + db_show_print_syinit(sip, true); > + if (db_pager_quit) > + return; > + } > STAILQ_FOREACH(sip, &sysinit_list, next) { > db_show_print_syinit(sip, true); > if (db_pager_quit) Best regards, Zhenlei