From nobody Sat Feb 03 15:59:46 2024 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 4TRy5T35Wvz59dDd for ; Sat, 3 Feb 2024 15:59:57 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) (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)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TRy5S5rpQz4LRd for ; Sat, 3 Feb 2024 15:59:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-55fc7f63639so3512636a12.1 for ; Sat, 03 Feb 2024 07:59:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1706975995; x=1707580795; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=IDm8kgMJP5K+07fGbCkSfU64OY7vUMi4U6UBLXWrUFM=; b=k+9xfV7F7cTEsY7Nl9tgqr6q6OHsuq1H7SJJJA7zZdhZOe0oOYUKK4qA2Boi1XYS1M G36h9U4PLJX1M3beELIsOMo3BnTB6cBNuKvXAuIvXQA6SZbugPAz5DSP9IV8DZIjQc2i IcpkkrPqhrBNt+FgtpoXI0kfv63AkOmmOocCuJTdqoeAqJOnN/y+XCVHHjSJyhlSOM2h EDFS0ce+bdOWZcaZlGXa8rRcshSuW+rS3EQOl5VVrqG6SWCL6l+xF3pKB2nQxzORxr2X Dvs4NNmkchUhqDzysowB3od/FzY/0AN+tNbwlK0qSKmIKglD6qw1RpDIsAShOt1Fd7Ue qTXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706975995; x=1707580795; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IDm8kgMJP5K+07fGbCkSfU64OY7vUMi4U6UBLXWrUFM=; b=ZCKxamWDgLz90ldRJlJdcA7vvaVSaRbCPKck7imdF0PA+5QjvetktU+FX+XFqsTTqc n9V2XQZlS1XrNZzNhecFdpJzRWjRe52qtfm53AepA3OtdZhAxvDEE/0lhjk5mPK5fJ06 7EV7ZHV0mFpMuvXKibodtuu0EYNp6jrWUUgDTpQzdsDECWjHcMMk30SzX83SlUZbeNfe TIxorrAC90hoGnqi7BiaQE8NgDezAWjNoXB9izH3SrDQp/mBZKd5aEebJhk68Uc2YAak q/hZ3JX4yGirdEkE5Uu2d4lOvqaw3hjWvnWgu2OsZzzz/cwLDsY1KtfGOdoQ9ol4hong bVUQ== X-Forwarded-Encrypted: i=0; AJvYcCWn7O9T5DB0UqOqW03tnihhpoe3hnz5EJWz8vvbLJHmSZcy8QYHkNfxy4JyioNNgqnNP4sPUyoFXTcZhrgHfi/zBqPIBRSLnwM= X-Gm-Message-State: AOJu0YxADL5vRG6jZXYxRl7t00xzbxlvxiG4x8CPapfppCxwGQY6i8ET CLkl81u4x/sVRTcZVj/T1JOK/8xzGqZUPoL73j+tmE4x5Lr5e8V1N36qjzOF/femKCaT3o86AgC rqJSi3pevQ6Rw3yTR9N7aJR1fMP6mU4zZWq8WMQ== X-Google-Smtp-Source: AGHT+IFl04e6lv3s+hOL/4dTMeLPuHrWjg7g3yZYN48pCs5jadB9iB05AT9mA8S/ktJxHFTaNl+f2fIHGpJ9oy5f9J8= X-Received: by 2002:aa7:d6cc:0:b0:55f:fb25:47d9 with SMTP id x12-20020aa7d6cc000000b0055ffb2547d9mr1907134edr.8.1706975994657; Sat, 03 Feb 2024 07:59:54 -0800 (PST) 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: <202402030136.4131aQIM010980@gitrepo.freebsd.org> <70o6oo0s-r8nn-7r92-5s6r-6so586rpo1o1@SerrOFQ.bet> In-Reply-To: <70o6oo0s-r8nn-7r92-5s6r-6so586rpo1o1@SerrOFQ.bet> From: Warner Losh Date: Sat, 3 Feb 2024 08:59:46 -0700 Message-ID: Subject: Re: git: ce348fe5cfc3 - main - amd64 & i386: enable VIMAGE in MINIMAL To: "Bjoern A. Zeeb" Cc: Gleb Smirnoff , =?UTF-8?Q?Mina_Gali=C4=87?= , Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, "freebsd-arch@freebsd.org" Content-Type: multipart/alternative; boundary="000000000000cd4fa806107c5182" X-Rspamd-Queue-Id: 4TRy5S5rpQz4LRd X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] --000000000000cd4fa806107c5182 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable [[ moved this to arch@ ]] On Sat, Feb 3, 2024 at 6:44=E2=80=AFAM Bjoern A. Zeeb wrot= e: > On Fri, 2 Feb 2024, Gleb Smirnoff wrote: > > To be fair, it totally disagree with this change. > > For different reasons I second that. > VIMAGE definitively does not belong in MINMAL for comfort. > I too had reservations about this change when it was submitted. Allow me to explain my reasoning. Years ago I did a study on the Unix kernel size over time. It was doubling every 3 years or so going back to 1970. I'll skip all the details, but this was an unsustainable trend. So I embarked on the project to reduce GENERIC to its core parts, and load the rest. This idea dated back to when I committed devd to the tree, though it was almost an afterthought with the nomatch events there. I wrote devmatch and decorated all the PNP tables in the tree (with much help) so that we could load all the drivers on demand automatically. As part of this work I created the MINIMAL kernel. A name I now regret, but the theory of the kernel was "everything you need to boot, but everything else will be dynamically loaded". There are (still?) some things in it that could be loaded, like serial drivers, because we can't (couldn't? I haven't rechecked in years) have the console be in a kld, it had to be in the base kernel. ufs was in this list for a while, but it moved to a module and removed from MINIMAL some time ago. Manu even did some good work in the boot loader to parse the linker.hints file so that fdt drivers could be loaded there (we still need PCI and ACPI). But common root filesystem devices were retained. So this kernel has always had the charter of the GENERIC minus everything you could load after mountroot early in boot, with an eye towards pushing more out when the boot loader grew better pci support and could automatically load cam.ko. In time, I'd hoped the default kernel would become MINIMAL and nobody (or almost nobody) would notice. So when this pull request came in, my initial reaction was 'yuck, why do you need it?' I too thought it was too much for MINIMAL. However, VIMAGE falls under the 'can't load it later' exception. And it's not exactly a trivial piece of infrastructure that we can just ignore. It provides useful functionality when paired with jails. It was also in GENERIC. These reasons coupled together let the idea grow on me. It ticked all my boxes: Can it be loaded? no. Is it widely used? yes. Will I need it if I wanted to make MINIMAL the new GENERIC? yes. Based on that, I approved and committed the pull request. It was well within the remit of MINIMAL based on the historic creation and change criteria I've tried to apply to it. Now, I totally get the desire to have a minimal kernel that doesn't have any baggage in it. I totally support that notion. Maybe we need another kernel in the tree to do that. Maybe it should be called MINIMAL since that name makes sense and one of two renamings happen: Either we rename GENERIC to GENERIC-STATIC and MINIMAL to GENERIC, or we rename MINIMAL to MODULAR and have it (eventually) become the new default. Or we need to create a new name that connotes the same things that MINIMAL seems to inspire in people (since the name evokes notions not quite compatible with my original charter for it). I have nothing on good names, though. All the ones I thought of have other issues, though maybe staking out a charter for what's in this config (the absolute smallest that will boot? Or are there a few additional things that are needed). One problem, as noted on irc, is that we need to have slightly better partitioning of the config files, so that we have a MI std.generic and std.minimal that the MD versions of these kernels can pull in and flavor. That's possible, with effort, with config(8). But it isn't super pleasant. I think, as a separate project, we should consider modernizing the config language to properly account for the subtle differences between 'requires' and 'depends-on'. The former concept is 'bring in this dependency when this item is included' (we don't have this) vs the latter 'don't include this item if the dependency is absent (we have this). But that's a whole other discussion that's happened a few times, but never produced any useful results. Having better tools here might be helpful, but it's the new sysinstall in many ways. I also love the idea of having a few more kernels that test unusual combinations. That's also a good goal. But MINIMAL's charter isn't to fulfill that goal. How we balance that with increased 'universe' times is also something that requires some careful thought. We've just recently managed to get the number of 32-bit arm kernels under control by making a generic there and also marking some kernels as not to be built in universe (they are for the convenience of our users, not for CI driven testing). Warner --000000000000cd4fa806107c5182 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

[[ moved this to arch@ ]]
On Sat,= Feb 3, 2024 at 6:44=E2=80=AFAM Bjoern A. Zeeb <bz@freebsd.org> wrote:
On Fri, 2 Feb 2024, Gleb Smirnoff wrote:
> To be fair, it totally disagree with this change.

For different reasons I second that.
VIMAGE definitively does not belong in MINMAL for comfort.
=

I too had reservations about this change when it was su= bmitted. Allow me to explain my reasoning.

Years a= go I did a study on the Unix kernel size over time. It was doubling every 3= years or so going back to 1970. I'll skip all the details, but this wa= s an unsustainable trend.

So I embarked on the pro= ject to reduce GENERIC to its core parts, and load the rest. This idea date= d back to when I committed devd to the tree, though it was almost an aftert= hought with the nomatch events there. I wrote devmatch and decorated all th= e PNP tables in the tree (with much help) so that we could load all the dri= vers on demand automatically. As part of this work I created the MINIMAL ke= rnel. A name I now regret, but the theory of the kernel was "everythin= g you need to boot, but everything else will be dynamically loaded". T= here are (still?) some things in it that could be loaded, like serial drive= rs, because we can't (couldn't? I haven't rechecked in years) h= ave the console be=C2=A0 in a kld, it had to be in the base kernel. ufs was= in this list for a while, but it moved to a module and removed from MINIMA= L some time ago. Manu even did some good work in the boot loader to parse t= he linker.hints file so that fdt drivers could be loaded there (we still ne= ed PCI and ACPI). But common root filesystem devices were retained. So this= kernel has always had the charter of the GENERIC minus everything you coul= d load after mountroot early in boot, with an eye towards pushing more out = when the boot loader grew better pci support and could automatically load c= am.ko. In time, I'd hoped the default kernel would become MINIMAL and n= obody (or almost nobody) would notice.

So when= this pull request came in, my initial reaction was 'yuck, why do you n= eed it?' I too thought it was too much for MINIMAL. However, VIMAGE fal= ls under the 'can't load it later' exception. And it's not = exactly a trivial piece of infrastructure that we can just ignore. It provi= des useful functionality when paired with jails. It was also in GENERIC. Th= ese reasons coupled together let the idea grow on me. It ticked all my boxe= s: Can it be loaded? no. Is it widely used? yes. Will I need it if I wanted= to make MINIMAL the new GENERIC? yes. Based on that, I approved and commit= ted the pull request. It was well within the remit of MINIMAL based on the = historic creation and change criteria I've tried to apply to it.
<= div>
Now, I totally get the desire to have a minimal kernel t= hat doesn't have any baggage in it. I totally support that notion. Mayb= e we need another kernel in the tree to do that. Maybe it should be called = MINIMAL since that name makes sense and one of two renamings happen: Either= we rename GENERIC to GENERIC-STATIC and MINIMAL to GENERIC, or we rename M= INIMAL to MODULAR and have it (eventually) become the new default. Or we ne= ed to create a new name that connotes the same things that MINIMAL seems to= inspire in people (since the name evokes notions not quite compatible with= my original charter for it). I have nothing on good names, though. All the= ones I thought of have other issues, though maybe staking out a charter fo= r what's in this config (the absolute smallest that will boot? Or are t= here a few additional things that are needed).

One problem, as noted on irc, is that we need to have slightly better part= itioning of the config files, so that we have a MI std.generic and std.mini= mal that the MD versions of these kernels can pull in and flavor. That'= s possible, with effort, with config(8). But it isn't super pleasant. I= think, as a separate project, we should consider modernizing the config la= nguage to properly account for the subtle differences between 'requires= ' and 'depends-on'. The former concept is 'bring in this de= pendency when this item is included' (we don't have this) vs the la= tter 'don't include this item if the dependency is absent (we have = this). But that's a whole other discussion that's happened a few ti= mes, but never produced any useful results. Having better tools here might = be helpful, but it's the new sysinstall in many ways.
I also love the idea of having a few more kernels that test unu= sual combinations. That's also a good goal. But MINIMAL's charter i= sn't to fulfill that goal. How we balance that with increased 'univ= erse' times is also something that requires some careful thought. We= 9;ve just recently managed to get the number of 32-bit arm kernels under co= ntrol by making a generic there and also marking some kernels as not to be = built in universe (they are for the convenience of our users, not for CI dr= iven testing).

Warner
--000000000000cd4fa806107c5182--