From owner-svn-src-head@freebsd.org Thu Oct 8 18:50:28 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 135B742EF38; Thu, 8 Oct 2020 18:50:28 +0000 (UTC) (envelope-from mhorne@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C6gJ36kJgz4NGk; Thu, 8 Oct 2020 18:50:27 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from mail-yb1-f178.google.com (mail-yb1-f178.google.com [209.85.219.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: mhorne) by smtp.freebsd.org (Postfix) with ESMTPSA id C474B2332C; Thu, 8 Oct 2020 18:50:27 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: by mail-yb1-f178.google.com with SMTP id x8so5275061ybe.12; Thu, 08 Oct 2020 11:50:27 -0700 (PDT) X-Gm-Message-State: AOAM530WWEhEEvkFmuKe9ylOTYhtD5lcsBDq4eVZVMhvHaLt1DAljjCC Ypy2ivwAzAPMIpiX9am8ceN7Xx84mCyY52M7q4w= X-Google-Smtp-Source: ABdhPJwqzfSqDhQYlKfd7Iew0ey8L8NxGv4kPE7NmWpZw6eFSi4JBuH7LSdJTmrjzmB+C+HTIBBoPxaBSY2FJ4mKcsc= X-Received: by 2002:a25:5507:: with SMTP id j7mr13114944ybb.214.1602183027289; Thu, 08 Oct 2020 11:50:27 -0700 (PDT) MIME-Version: 1.0 References: <202010081802.098I26Rq052294@repo.freebsd.org> In-Reply-To: From: Mitchell Horne Date: Thu, 8 Oct 2020 15:50:15 -0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r366542 - in head/sys: amd64/amd64 arm/arm arm64/arm64 kern riscv/riscv sys To: Kyle Evans Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2020 18:50:28 -0000 On Thu, Oct 8, 2020 at 3:15 PM Kyle Evans wrote: > > On Thu, Oct 8, 2020 at 1:02 PM Mitchell Horne wrote: > > > > Author: mhorne > > Date: Thu Oct 8 18:02:05 2020 > > New Revision: 366542 > > URL: https://svnweb.freebsd.org/changeset/base/366542 > > > > Log: > > Add a routine to dump boot metadata > > > > The boot metadata (also referred to as modinfo, or preload metadata) > > provides information about the size and location of the kernel, > > pre-loaded modules, and other metadata (e.g. the EFI framebuffer) to be > > consumed during by the kernel during early boot. It is encoded as a > > series of type-length-value entries and is usually constructed by > > loader(8) and passed to the kernel. It is also faked on some > > architectures when booted by other means. > > > > Although much of the module information is available via kldstat(8), > > there is no easy way to debug the metadata in its entirety. Add some > > routines to parse this data and allow it to be printed to the console > > during early boot or output via a sysctl. > > > > Since the output can be lengthly, printing to the console is gated > > behind the debug.dump_modinfo_at_boot kenv variable as well as the > > BOOTVERBOSE flag. The sysctl to print the metadata is named > > debug.dump_modinfo. > > > > Hi, > > Why both a tunable and boot -v? The tunable is already specifically > scoped to just this operation, it seems a little odd to double-gate > it. > Hey Kyle, The original patch was gated behind just boot -v. In testing I realized this change is potentially quite noisy (even by bootverbose standards), so I added the tunable to make it opt-in. The thinking is that you could set debug.dump_modinfo_at_boot=1 once in loader.conf and forget it, as you wouldn't see the preload_dump() output on a normal boot. Thinking about it again, this might be overly complicated for what is at best a niche debugging feature. If gating it behind just the tunable is more in line with how other things work then I'm happy to change it. Mitchell > Thanks, > > Kyle Evans