From nobody Wed Jul 31 04:02:37 2024 X-Original-To: freebsd-current@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 4WYdjR4jkmz5SYZG for ; Wed, 31 Jul 2024 04:02:51 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYdjR0FWGz4TXR for ; Wed, 31 Jul 2024 04:02:50 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-7a10b293432so3245016a12.0 for ; Tue, 30 Jul 2024 21:02:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1722398569; x=1723003369; 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=5VxWU529GRHPY9ih9B16FwNd5JRemJJvQnIlx2drEQU=; b=ijx+Ze2zrO09P0IOYTuilwQZ65HUBw+m0bUm0gPyyR8OL6nThWmUxdS38mdDewP/Hu Pb3QsteFIsh4M1riGz/stqPh9aQ2Tg+vtRnNJfP3xANZooRw3mW0Y7jILjOttE8KTWRm 206y8udJYBjF06+1ClQ6nHRpTUk/Y8/+VdJ7xF7Z2UAbufL6uHP1EOHjiYZrVGDAFdne PWWr7LKCDiiWICGc1gk4WI/u736oJSOlKyXlxkL4KRvDkHi6uxY7Ynfgdp/GmktbK3Tk yy57nSAyoGjgI/qZK9iHb4FdK/jgp8uWWh3E1h/z2Z4xaJ+RQwAw06I1RlrP8AMjiLw+ wRBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722398569; x=1723003369; 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=5VxWU529GRHPY9ih9B16FwNd5JRemJJvQnIlx2drEQU=; b=Hyg3pAYOOkCbJNZvlcKNjCpn30NltO1FaayC8S7NU7ftiNr/miEUF7qOo8Zuo0CGdI 9CsVorqDmixFHBbTcA/G3lRFsycNg5TEK/djwRktUdHZBe8w+lYL2G35A90J4aYhILxb PAoE+wdqCoqyliaGTnkAgQPPAIKJEY2basEuPJEd2HPRedlLGwtER3RsKgkykepCq7Pg va6cYYvbj22SSOAm8YZKcRF9EGHS8rlhQJM8mPds7omBTwMneDqGUZRWhdoB5dq0fDYY bdcI9Rdy3gwKQSSXIf1uHwyJatY9tISMnZalhjnl2gm8rZaFKlBBKXQuEMskn/M3YFEE djSg== X-Forwarded-Encrypted: i=1; AJvYcCXVQSwUtLXVkV+0p421ngfy8JDx8fipvhSBm3RXU6lFwQDUvyLzbAGy1/thNnJQjTdDILDalkTCRWL7xczigKiVAcrbBIOgVACzGYs= X-Gm-Message-State: AOJu0Yw7DDKjGUM23Q/TSWCm6mrlTx45xbw2l3AtspIq7C0q0WE7n+X+ 0R68fJOzx0nt6GzzpR++E+5xhX+Dn8HSVadnCcLmDExOhsr4syEIvdkkt91uyTvlIE/GOFu4vGu sp6LMQCKIu433lMdz3evxh42j5pCf/Aw7KoZCqAXA0zy/L2Y7 X-Google-Smtp-Source: AGHT+IFl6i1jHDTgKfjam17ROyoaGNF3erAe1HuQlUjdF02y8QnikBR7mr0B5C+MNr0o47XKyW4h2ieA1evet01Edek= X-Received: by 2002:a05:6a20:2595:b0:1c4:9ce8:e6ca with SMTP id adf61e73a8af0-1c4a1544db7mr11703259637.54.1722398568964; Tue, 30 Jul 2024 21:02:48 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 References: <20240727170122.675f6bfe@ernst.home> <865xsn6ya9.fsf@ltc.des.dev> <86jzh26793.fsf@ltc.des.dev> In-Reply-To: <86jzh26793.fsf@ltc.des.dev> From: Warner Losh Date: Tue, 30 Jul 2024 22:02:37 -0600 Message-ID: Subject: Re: filemon To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Cc: Miroslav Lachman <000.fbsd@quip.cz>, FreeBSD Current Content-Type: multipart/alternative; boundary="000000000000dd8351061e832a80" 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:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4WYdjR0FWGz4TXR --000000000000dd8351061e832a80 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jul 30, 2024, 12:54=E2=80=AFPM Dag-Erling Sm=C3=B8rgrav wrote: > Miroslav Lachman <000.fbsd@quip.cz> writes: > > I'm a bit confused. If I understand it right, you say loader.conf > > causes less memory fragmentation, but DES said "it still increases low > > memory fragmentation". So what is true? And is this something to watch > > out for, or is memory fragmentation not such a big deal? > > I used the wrong term. The loader loads the kernel and modules into a > particular region of memory, while modules loaded after boot can go > anywhere. Furthermore, modules loaded by the loader cannot be unloaded. > So loading modules pre-boot does not increase fragmentation, but it uses > up memory from a much more limited pool than loading them later. > Yea. The lower memory addresses used to matter a lot. Now, we don't have floppies or devices that care <256MB. Some can only do DMA to < 4GB. So unless you have a huge RAM dusk compiled in, you're not going to meaningfully depleate the under 4GB. And we don't treat that memory as special for allocation so the modules loaded after boot could also wind up there.... So it used to matter a lot. Now it's marginally relevant at best. Warner DES > -- > Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org > --000000000000dd8351061e832a80 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, Jul 30, 2024, 12:54=E2=80=AFPM Dag-Erling Sm= =C3=B8rgrav <des@freebsd.org> = wrote:
Miroslav Lachman <000.fbsd@= quip.cz> writes:
> I'm a bit confused. If I understand it right, you say loader.conf<= br> > causes less memory fragmentation, but DES said "it still increase= s low
> memory fragmentation". So what is true? And is this something to = watch
> out for, or is memory fragmentation not such a big deal?

I used the wrong term.=C2=A0 The loader loads the kernel and modules into a=
particular region of memory, while modules loaded after boot can go
anywhere.=C2=A0 Furthermore, modules loaded by the loader cannot be unloade= d.
So loading modules pre-boot does not increase fragmentation, but it uses up memory from a much more limited pool than loading them later.

Yea. The lo= wer memory addresses used to matter a lot. Now, we don't have floppies = or devices that care <256MB. Some can only do DMA to < 4GB. So unless= you have a huge RAM dusk compiled in, you're not going to meaningfully= depleate the under 4GB.=C2=A0 And we don't treat that memory as specia= l for allocation so the modules loaded after boot could also wind up there.= ...

So it used to matter= a lot. Now it's marginally relevant at best.
Warner

DES
--
Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org
--000000000000dd8351061e832a80--