From nobody Wed May 24 14:25:24 2023 X-Original-To: freebsd-arch@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 4QRD4J4K2Gz4CmNf for ; Wed, 24 May 2023 14:25:36 +0000 (UTC) (envelope-from kevans@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 4QRD4J3vC1z3lgZ; Wed, 24 May 2023 14:25:36 +0000 (UTC) (envelope-from kevans@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684938336; 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=zpN35uIS5JYXv85oy10LthDc0/0tU2rXcIHluShsTFg=; b=EP3vEtnQ2j1A3kvUkNjyr+jsMmQcFQsSYUNsY8utcF6tiVI8aVvUWZENGgBjixiKS1NdLK DxXJ5z+Dj/APDL868YmNOmeWiQMCiETzOTEMPWertLFXxS2vUHyl/tU5Zet+MmHp3i9SPK 1bolZK31TpM3ftU5VRwhRWZn5GE4aJ8hOfA1rH9JDpmazqZvmzmPq+3z0ME6fWF34+JHLM 4uD9aR0QMp4MvXA3kw1AGT/3fHdtbAEnR7085Sbn6u7v6+X/gEndUtRa2D+HKpD88lmKaz As4fK+pI7EVhUNWvcm6FjDuy8NTlldcQAxAye8FzQd6yofpPYHQ/4XEz80wvGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684938336; 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=zpN35uIS5JYXv85oy10LthDc0/0tU2rXcIHluShsTFg=; b=CkMzcmPaqP9GAB/lc1nNYt570pGTv6AEPvF7DfGtYhT1oq+huTG5x8inOUh+krK/ueKGc3 7uXj+VA0rM9yNovwWLXaMsBq8yxeB/P1y6OEw5Ohcgi3O0imhJJac1cyuiDIWeFqdvjceD G5aIgx8ewQujFrmMLI4miJuOfm3ithYao/SiSzdwBENPpoMAoGZ9CWcukvwf3iynpR8KV3 2xnTCBGW8bUdaX+TvJ5QytrPWkcXvnAO7oVqzLzlauMENw3yTchbpS7S54qo9heYw0r8AF l4PmTykhng++ASUP4KpGuiFYqNFmxGLGN6BKrh3vmG88vLFYXoufKYCLyYZISw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684938336; a=rsa-sha256; cv=none; b=WtIxELEk2knW4DWm/0q790fDZu9A/uAga6vRtPUVMrYVY4oKJlAR8vZlf+I27oJx/oMvy4 hTBj7VsiRr7NFlb6obP+O1c/KLn1JiU/ndyfmyYs4GDmbbcuAWKlkQ5BnFFe42eTEtli38 HG3rrRtS+zkQyRq+0FhIkQy4soVWbqwASaE01n0gbWcHUkaCLUt2dqwRy8ewx31VJ0GeUE nAWNj2e3FCyFSBxxUzt+PvIqUXetjr6zQBpnQB2UpN1NRPZungxvvskLSYrVlWejdihHHj BqTITA5O0ldPDS9jOSKuHbrB5n9U/QG0/CWGXROSemskI9iErBCLonkMC1MyuQ== Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QRD4J2gbYz1443; Wed, 24 May 2023 14:25:36 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f52.google.com with SMTP id 6a1803df08f44-62384e391e3so5724976d6.3; Wed, 24 May 2023 07:25:36 -0700 (PDT) X-Gm-Message-State: AC+VfDzzopD0icDG1K/J//xysaxM6xN5L80j7s/MHiGEAkeAC+y42dxS qLNUb/seI6MzCvg57XnmfaMT6euetfV/zQXPsHo= X-Google-Smtp-Source: ACHHUZ64tDczKOfnBjd/d/lTHIU9ZcSMSRnlLMFgpKR++2i7npSArt+v5hk3Ez5wUoOFxXTKApii6DLR4Pwrw/Fy4t8= X-Received: by 2002:a05:6214:765:b0:625:99ee:3ad8 with SMTP id f5-20020a056214076500b0062599ee3ad8mr6190709qvz.31.1684938335946; Wed, 24 May 2023 07:25:35 -0700 (PDT) List-Id: Discussion related to FreeBSD architecture List-Archive: https://lists.freebsd.org/archives/freebsd-arch List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arch@freebsd.org MIME-Version: 1.0 References: <394775eb-1000-60d9-2ddd-5c2aca6c99ea@selasky.org> <08ba506f-66c5-35eb-e992-ecf9dfeccf93@selasky.org> <20230524082850.ffc8793b6bb1b47325ae0139@bidouilliste.com> <39e6793a-33f9-8f48-30d3-eaa30d321452@selasky.org> In-Reply-To: <39e6793a-33f9-8f48-30d3-eaa30d321452@selasky.org> From: Kyle Evans Date: Wed, 24 May 2023 09:25:24 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC] An idea for general kernel post-processing automation in FreeBSD To: Hans Petter Selasky Cc: Emmanuel Vadot , Kyle Evans , John Baldwin , Mark Johnston , Warner Losh , Konstantin Belousov , "freebsd-arch@freebsd.org" , Jessica Clarke Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-ThisMailContainsUnwantedMimeParts: N On Wed, May 24, 2023 at 4:47=E2=80=AFAM Hans Petter Selasky wrote: > > >> IMO sorting at runtime is a minor feature by itself, too. I mentioned > >> in one of the reviews somewhere, we have in the past have had bugs due > >> to poor specification of sysinit order within a subsystem -- I'm > >> recalling a specific one that wasn't even that long ago, maybe three > >> or four years, that manu@ had hit because he did or didn't include > >> some device in his config that ended up shifting link order of other > >> objects and reversing two sysinits into an order that wasn't actually > >> functional. > > Yes this problem was a pain to debug (I mean just to understand the > > actual problem), and iirc it was never solved, I only had the issue on > > one machine that I don't use anymore and the problem went away and > > re-apears from time to time when sysinits where added. > > > >> We can still add some bits to test that (preferably a > >> tunable to reverse order within a subsystem rather than having to > >> re-link the kernel) even with sorting at link-time, but it sure does > >> look a lot less fragile if we have to sort it anyways and we just > >> reverse one criteria. > > I think if you could just diff two plaintext files, listing all the > constructors in the correct order, that would be of great help when > problems arise in this area. You cannot always rely on having a console > during bringup. > Maybe? That's making a lot of assumptions about the failure mode of a black box, and sysinit ordering is probably the last thing I'd expect for 95+% of fail-to-boot scenarios. My point was really just that it does come up sometimes, and it'd be really useful to be able to quickly and easily test a different ordering in CI (+ reproduce the different ordering outside of CI). > > At the mention of manu@, I remember how difficult it was to bringup the > graphics driver code and kernel modules which are common among FreeBSD > desktop users. What do you do, if all you have is a black screen, and > you need to debug something? > I'm sorry, but staring at a list of 1000+ ordered sysinits isn't going to help you any more than staring at a list of 1000+ unordered sysinits in debugging anything when you don't have a console and thus, very little direction to start debugging in. Thanks, Kyle Evans