From nobody Sat Sep 09 14:13:46 2023 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 4RjZj06BCNz4spSr; Sat, 9 Sep 2023 14:13:56 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 4RjZj05kjtz3NpP; Sat, 9 Sep 2023 14:13:56 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694268836; 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: in-reply-to:in-reply-to:references:references; bh=GDvGDk/QaXmyusErHICrMEDARA6phzrBGIV7VddHhMA=; b=gOpMjkfeOzCgWasdiyzeDdCmufGHfD0qXA3ko8uFl8IxdbS9uRg9Nq2ue4z8X7AGl8B36Q 0bGdb9ro/t8RF3fvbBK0k73e3l24eeoiincuM2WGNLHscRkeKOtEIwkOLBm+DBshtAQXsF bcwa9hJLt5ZcWhihjiVO6GpE2hrpGJSp8iLm55gM3hyzX/1dFYIOQ+YZzDF69UR8ibKmnr ZyAjgrwXh5AbDPc9xlujGvOIvN/aRvE3mnYWKs1mpt1dgDkw/hOTmqSxOKTxb4bu1vggu4 B5VSrqZ4Wzs3snAcrLhFbZQMwh/8YLR57AkbFD0DTWh75t9UUHeBgDKHObQvMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694268836; a=rsa-sha256; cv=none; b=fZOWW6E8PZqfY6gOEqNtvXEQMK6PD2TzmwffODXALcWgqaxueRfflg9ngTOpGgtxnL/R0j ywgWek3pzW4wVbrFQPMmhwRbmKJTj2FREOw+u/8DFl06FIQcBW5padUzu1ivDEqdK0yyFD 1o5onVvC0extsuqiLbqUJdFZ4DvVdFGc6UJTjuMsnS1QW60yuSSQKSzIDoqO/chk3X2PXW ApfkApcfE/E5JFUp5TP04Hi7Mc8yt5oJ5vpA1GATD3hCUtYufqGF5p8qFpHNiKt9rQDjQ5 YTB789DC+mp420Cg0YZZVrgLVr/j93E8/1s8sfk/geTuJtQq7HCw1hM7URPrwQ== 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=1694268836; 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: in-reply-to:in-reply-to:references:references; bh=GDvGDk/QaXmyusErHICrMEDARA6phzrBGIV7VddHhMA=; b=gb+hPaxlOjGaErrbZgn//1M8WUODSKVoT3tsyRt2JozITjbgQfKBj9jEjnPlTOdt++kZdu pr7S91kUz/+JZE/UrNywqO3RHS3Y3rDjGhFYMYDx0j3yQJj/y1oh997saaZI2BNizEx2iU iyTpBirYRHkOZf+ziTr5XoVjVdmBa9ZsAbeEhFdFpS5UG/8bNaBC4JQ1VJKiEHtGtBBrY6 bkYRD1m1dKcH2uoOh0hAqHa7DiO8AN9X2vi8xIwf/p8aUxs9mj0SLNp/fJcbK/NXRzSBmO tE217pqL7qgLdguuerjWh2sIrC+HHvlBYQ0ukvjCnXjHOWRpgI/hanQvjrfrHQ== 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 4RjZhy58Yqz17Sj; Sat, 9 Sep 2023 14:13:54 +0000 (UTC) (envelope-from zlei@FreeBSD.org) From: Zhenlei Huang Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_CD835773-8AD4-41BF-9806-5410F5B78A3A" 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 (Mac OS X Mail 16.0 \(3696.120.41.1.4\)) Subject: Re: git: 1926d5cef6ea - main - init_main: Record completed SYSINITs Date: Sat, 9 Sep 2023 22:13:46 +0800 In-Reply-To: Cc: Colin Percival , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" To: Brooks Davis References: <202309061837.386Ib5AK086264@gitrepo.freebsd.org> <5BC96D9F-E4C4-4D34-B7B3-41576AD296DA@FreeBSD.org> X-Mailer: Apple Mail (2.3696.120.41.1.4) --Apple-Mail=_CD835773-8AD4-41BF-9806-5410F5B78A3A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Sep 8, 2023, at 2:19 AM, Brooks Davis wrote: >=20 > On Wed, Sep 06, 2023 at 06:46:59PM -0700, Colin Percival wrote: >> On 9/6/23 18:12, Zhenlei Huang wrote: >>>> On Sep 7, 2023, at 2:37 AM, Colin Percival = wrote: >>>> 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. >>>=20 >>> So the `sysinit_done_list` is for DDB only. >>=20 >> Well... sort of. You can open up kgdb and run 'p sysinit_done_list'. >>=20 >>>> static STAILQ_HEAD(sysinitlist, sysinit) sysinit_list; >>>> +static struct sysinitlist sysinit_done_list =3D >>>> + STAILQ_HEAD_INITIALIZER(sysinit_done_list); >>>=20 >>> Then it should be wrapped around with #ifdef DDB and #endif >> I considered that, but since we're literally talking about 2 pointers = of >> memory I figured it wasn't worth making it conditional. >=20 > IMO loss of the run order in a dump was a (minor) regression so this > should be unconditionally available. No, we do NOT loss the run order. Given a kernel dump, we known its git commit hash, then the order of all = sysinit is determined, unless we have non-stable sort of sysinits. That is somewhat not as flexible as previous sysinit array, or current = `sysinit_done_list`. So IMO `sysinit_done_list` is still useful only for debugging, either = DDB or kgdb. >=20 > -- Brooks Best regards, Zhenlei --Apple-Mail=_CD835773-8AD4-41BF-9806-5410F5B78A3A Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

On Sep 8, 2023, at 2:19 AM, Brooks Davis <brooks@freebsd.org> = wrote:

On Wed, Sep 06, 2023 at 06:46:59PM -0700, Colin Percival = wrote:
On = 9/6/23 18:12, Zhenlei Huang wrote:
On Sep 7, 2023, at 2:37 = AM, Colin Percival <cperciva@FreeBSD.org> wrote:
   init_main: Record completed SYSINITs

   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.

Well... sort of. =  You can open up kgdb and run 'p sysinit_done_list'.

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
I considered that, = but since we're literally talking about 2 pointers of
memory= I figured it wasn't worth making it conditional.

IMO loss of the run order in a dump was a (minor) regression = so this
should be = unconditionally available.

No, we do NOT loss the run order.

Given a kernel dump, we known its git commit hash, = then the order of all sysinit is determined, unless
we have = non-stable sort of sysinits.

That is somewhat not as flexible as = previous sysinit array, or current = `sysinit_done_list`.

So IMO `sysinit_done_list` is = still useful only for debugging, either DDB or kgdb.


-- = Brooks

Best regards,
Zhenlei

= --Apple-Mail=_CD835773-8AD4-41BF-9806-5410F5B78A3A--