Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"The Street finds its own uses for technology." -- William Gibson


computers / alt.os.linux.slackware / Kernel huge vs generic

SubjectAuthor
* Kernel huge vs genericChris Elvidge
`* Re: Kernel huge vs genericLew Pitcher
 +- Re: Kernel huge vs genericChris Elvidge
 `* Re: Kernel huge vs genericChris Elvidge
  `* Re: Kernel huge vs genericLew Pitcher
   `* Re: Kernel huge vs genericChris Elvidge
    `* Re: Kernel huge vs genericLew Pitcher
     `- Re: Kernel huge vs genericChris Elvidge

1
Kernel huge vs generic

<uvluns$vf1v$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=2283&group=alt.os.linux.slackware#2283

  copy link   Newsgroups: alt.os.linux.slackware
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chr...@mshome.net (Chris Elvidge)
Newsgroups: alt.os.linux.slackware
Subject: Kernel huge vs generic
Date: Tue, 16 Apr 2024 14:33:47 +0100
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <uvluns$vf1v$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 16 Apr 2024 15:33:48 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="04ba676ce3572d0fdc31dc5b6eabb939";
logging-data="1031231"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+xAicqaGxD2Yz9CUzIWd0iOZwbHUrWb8k="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
Thunderbird/52.2.1 Lightning/5.4
Cancel-Lock: sha1:Pa7zLrZz0BHt5SFPo32LX+5W0Ms=
Content-Language: en-GB
X-Mozilla-News-Host: news://news.eternal-september.org:119
 by: Chris Elvidge - Tue, 16 Apr 2024 13:33 UTC

Slackware current - VirtualBox 7.0.14

I normally use the huge kernel with no problems but the other day I
mistakenly downloaded the generic kernel, too, and noticed the
difference in size is only 2Mb. I was originally told the generic kernel
was better for memory consumption. The required initrd.gz unzips to 27Mb.

What is the/Is there a supposed advantage of generic + initrd over huge?

Cheers

--
Chris Elvidge, England
I AM NOT MY LONG-LOST TWIN

Re: Kernel huge vs generic

<uvlvoe$v2g9$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=2284&group=alt.os.linux.slackware#2284

  copy link   Newsgroups: alt.os.linux.slackware
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lew.pitc...@digitalfreehold.ca (Lew Pitcher)
Newsgroups: alt.os.linux.slackware
Subject: Re: Kernel huge vs generic
Date: Tue, 16 Apr 2024 13:51:10 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <uvlvoe$v2g9$1@dont-email.me>
References: <uvluns$vf1v$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 16 Apr 2024 15:51:10 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="eb57ec0d5ffc7e2360ac31652931bf02";
logging-data="1018377"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX191SUrVlQuTdQ+trK3SFsQfePjrLFQfA+w="
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
Cancel-Lock: sha1:ngffBo1yZCFKaDzLSEERBTI8qAA=
 by: Lew Pitcher - Tue, 16 Apr 2024 13:51 UTC

On Tue, 16 Apr 2024 14:33:47 +0100, Chris Elvidge wrote:

> Slackware current - VirtualBox 7.0.14
>
> I normally use the huge kernel with no problems but the other day I
> mistakenly downloaded the generic kernel, too, and noticed the
> difference in size is only 2Mb. I was originally told the generic kernel
> was better for memory consumption. The required initrd.gz unzips to 27Mb.
>
> What is the/Is there a supposed advantage of generic + initrd over huge?

I believe (and others here will correct me if I am wrong) that the "generic"
kernel + initrd result in less memory used in the finally running system than
the "huge" kernel.

Consider: once booted, the generic kernel will (should?) free any memory
occupied by the initrd image, as it no longer needs the initrd image to run.
The generic kernel only needs initrd because it uses (filesystem backed)
modules to provide the disk controller interfaces. This results in a small
initial load module for the kernel. Once executing, it only loads the hardware
drivers it needs, leaving all the rest alone.

OTOH, the "huge" kernel has all the disk controller drivers built-in to
the loaded module. Even if the kernel doesn't use the disk controller, the
code is still resident in memory.

So, the "huge" kernel results in a running kernel with more resident code
than the "generic" kernel.

Having said all that, I run the "huge" kernel; I can't be bothered with
the additional initrd step if/when I upgrade my kernel, and I have the
memory to support the minor additional overhead of unused drivers.

HTH
--
Lew Pitcher
"In Skills We Trust"

Re: Kernel huge vs generic

<uvm1ik$103a1$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=2285&group=alt.os.linux.slackware#2285

  copy link   Newsgroups: alt.os.linux.slackware
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chr...@mshome.net (Chris Elvidge)
Newsgroups: alt.os.linux.slackware
Subject: Re: Kernel huge vs generic
Date: Tue, 16 Apr 2024 15:22:10 +0100
Organization: A noiseless patient Spider
Lines: 46
Message-ID: <uvm1ik$103a1$1@dont-email.me>
References: <uvluns$vf1v$1@dont-email.me> <uvlvoe$v2g9$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 16 Apr 2024 16:22:12 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="02d9de2067e057bf800f1733c5af2b04";
logging-data="1051969"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18UbxBW3gANkLZ0LiUW/xjje+v8uo4MaXA="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
Thunderbird/52.2.1 Lightning/5.4
Cancel-Lock: sha1:k6qGNpZUI6QlAJCnDqOOBJPZCqg=
Content-Language: en-GB
In-Reply-To: <uvlvoe$v2g9$1@dont-email.me>
 by: Chris Elvidge - Tue, 16 Apr 2024 14:22 UTC

On 16/04/2024 at 14:51, Lew Pitcher wrote:
> On Tue, 16 Apr 2024 14:33:47 +0100, Chris Elvidge wrote:
>
>> Slackware current - VirtualBox 7.0.14
>>
>> I normally use the huge kernel with no problems but the other day I
>> mistakenly downloaded the generic kernel, too, and noticed the
>> difference in size is only 2Mb. I was originally told the generic kernel
>> was better for memory consumption. The required initrd.gz unzips to 27Mb.
>>
>> What is the/Is there a supposed advantage of generic + initrd over huge?
>
> I believe (and others here will correct me if I am wrong) that the "generic"
> kernel + initrd result in less memory used in the finally running system than
> the "huge" kernel.
>
> Consider: once booted, the generic kernel will (should?) free any memory
> occupied by the initrd image, as it no longer needs the initrd image to run.
> The generic kernel only needs initrd because it uses (filesystem backed)
> modules to provide the disk controller interfaces. This results in a small
> initial load module for the kernel. Once executing, it only loads the hardware
> drivers it needs, leaving all the rest alone.
>
> OTOH, the "huge" kernel has all the disk controller drivers built-in to
> the loaded module. Even if the kernel doesn't use the disk controller, the
> code is still resident in memory.
>
> So, the "huge" kernel results in a running kernel with more resident code
> than the "generic" kernel.
>
> Having said all that, I run the "huge" kernel; I can't be bothered with
> the additional initrd step if/when I upgrade my kernel, and I have the
> memory to support the minor additional overhead of unused drivers.
>
> HTH
>

Thanks for that explanation. My Slack installation is currently using
891Mb out of 3Gb with the huge 6.8.6 kernel and Xfce 4.18 - so no
problems. I'll look at the differences with the 6.6.27 huge and generic
kernels later.

--
Chris Elvidge, England
RALPH WON'T "MORPH" IF YOU SQUEEZE HIM HARD ENOUGH

Re: Kernel huge vs generic

<uvm654$114sp$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=2286&group=alt.os.linux.slackware#2286

  copy link   Newsgroups: alt.os.linux.slackware
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chr...@mshome.net (Chris Elvidge)
Newsgroups: alt.os.linux.slackware
Subject: Re: Kernel huge vs generic
Date: Tue, 16 Apr 2024 16:40:19 +0100
Organization: A noiseless patient Spider
Lines: 64
Message-ID: <uvm654$114sp$1@dont-email.me>
References: <uvluns$vf1v$1@dont-email.me> <uvlvoe$v2g9$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 16 Apr 2024 17:40:21 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="04ba676ce3572d0fdc31dc5b6eabb939";
logging-data="1086361"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19rJjg8b/IW9pytFY9vC1X6pqcK2+IcAzU="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
Thunderbird/52.2.1 Lightning/5.4
Cancel-Lock: sha1:bExEAFPqM4jCNshibmThul/Bd/E=
In-Reply-To: <uvlvoe$v2g9$1@dont-email.me>
Content-Language: en-GB
 by: Chris Elvidge - Tue, 16 Apr 2024 15:40 UTC

On 16/04/2024 at 14:51, Lew Pitcher wrote:
> On Tue, 16 Apr 2024 14:33:47 +0100, Chris Elvidge wrote:
>
>> Slackware current - VirtualBox 7.0.14
>>
>> I normally use the huge kernel with no problems but the other day I
>> mistakenly downloaded the generic kernel, too, and noticed the
>> difference in size is only 2Mb. I was originally told the generic kernel
>> was better for memory consumption. The required initrd.gz unzips to 27Mb.
>>
>> What is the/Is there a supposed advantage of generic + initrd over huge?
>
> I believe (and others here will correct me if I am wrong) that the "generic"
> kernel + initrd result in less memory used in the finally running system than
> the "huge" kernel.
>
> Consider: once booted, the generic kernel will (should?) free any memory
> occupied by the initrd image, as it no longer needs the initrd image to run.
> The generic kernel only needs initrd because it uses (filesystem backed)
> modules to provide the disk controller interfaces. This results in a small
> initial load module for the kernel. Once executing, it only loads the hardware
> drivers it needs, leaving all the rest alone.
>
> OTOH, the "huge" kernel has all the disk controller drivers built-in to
> the loaded module. Even if the kernel doesn't use the disk controller, the
> code is still resident in memory.
>
> So, the "huge" kernel results in a running kernel with more resident code
> than the "generic" kernel.
>
> Having said all that, I run the "huge" kernel; I can't be bothered with
> the additional initrd step if/when I upgrade my kernel, and I have the
> memory to support the minor additional overhead of unused drivers.
>
> HTH
>

These are the figures I got:

generic-6.6.27
total used free shared buff/cache available
Mem: 2974 1084 890 7 1172 1889
Swap: 6143 0 6143
Total: 9118 1084 7034

huge-6.6.27
total used free shared buff/cache available
Mem: 2971 1069 1201 7 870 1902
Swap: 6143 0 6143
Total: 9115 1069 7345

huge-6.8.6
total used free shared buff/cache available
Mem: 2971 1082 907 8 1163 1889
Swap: 6143 0 6143
Total: 9115 1082 7051

So no noticeable difference AFAICS.
I brewed 6.8.6 from 6.6.27 .config and 'make olddefconfig'

--
Chris Elvidge, England
I WILL NOT USE ABBREV.

Re: Kernel huge vs generic

<uvmbue$v2g9$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=2287&group=alt.os.linux.slackware#2287

  copy link   Newsgroups: alt.os.linux.slackware
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lew.pitc...@digitalfreehold.ca (Lew Pitcher)
Newsgroups: alt.os.linux.slackware
Subject: Re: Kernel huge vs generic
Date: Tue, 16 Apr 2024 17:19:11 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 83
Message-ID: <uvmbue$v2g9$2@dont-email.me>
References: <uvluns$vf1v$1@dont-email.me> <uvlvoe$v2g9$1@dont-email.me>
<uvm654$114sp$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 16 Apr 2024 19:19:11 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="eb57ec0d5ffc7e2360ac31652931bf02";
logging-data="1018377"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/58Qw34B2fyHD6mbXO4JdljMPPFoscil4="
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
Cancel-Lock: sha1:Ldg3R0GP8c4d+wgdwC9WxNeiP40=
 by: Lew Pitcher - Tue, 16 Apr 2024 17:19 UTC

On Tue, 16 Apr 2024 16:40:19 +0100, Chris Elvidge wrote:

> On 16/04/2024 at 14:51, Lew Pitcher wrote:
>> On Tue, 16 Apr 2024 14:33:47 +0100, Chris Elvidge wrote:
>>
>>> Slackware current - VirtualBox 7.0.14
>>>
>>> I normally use the huge kernel with no problems but the other day I
>>> mistakenly downloaded the generic kernel, too, and noticed the
>>> difference in size is only 2Mb. I was originally told the generic kernel
>>> was better for memory consumption. The required initrd.gz unzips to 27Mb.
>>>
>>> What is the/Is there a supposed advantage of generic + initrd over huge?
>>
>> I believe (and others here will correct me if I am wrong) that the "generic"
>> kernel + initrd result in less memory used in the finally running system than
>> the "huge" kernel.
>>
>> Consider: once booted, the generic kernel will (should?) free any memory
>> occupied by the initrd image, as it no longer needs the initrd image to run.
>> The generic kernel only needs initrd because it uses (filesystem backed)
>> modules to provide the disk controller interfaces. This results in a small
>> initial load module for the kernel. Once executing, it only loads the hardware
>> drivers it needs, leaving all the rest alone.
>>
>> OTOH, the "huge" kernel has all the disk controller drivers built-in to
>> the loaded module. Even if the kernel doesn't use the disk controller, the
>> code is still resident in memory.
>>
>> So, the "huge" kernel results in a running kernel with more resident code
>> than the "generic" kernel.
>>
>> Having said all that, I run the "huge" kernel; I can't be bothered with
>> the additional initrd step if/when I upgrade my kernel, and I have the
>> memory to support the minor additional overhead of unused drivers.
>>
>> HTH
>>
>
> These are the figures I got:
>
> generic-6.6.27
> total used free shared buff/cache available
> Mem: 2974 1084 890 7 1172 1889
> Swap: 6143 0 6143
> Total: 9118 1084 7034
>
> huge-6.6.27
> total used free shared buff/cache available
> Mem: 2971 1069 1201 7 870 1902
> Swap: 6143 0 6143
> Total: 9115 1069 7345
>
> huge-6.8.6
> total used free shared buff/cache available
> Mem: 2971 1082 907 8 1163 1889
> Swap: 6143 0 6143
> Total: 9115 1082 7051
>
> So no noticeable difference AFAICS.

Glad to hear that. Apparently, the inclusion of disk drivers no longer
makes a significant difference on the end resident size of the kernel.

I'd be interested to know what your dmesg says about the kernel memory
Would you be willing to post the results of
dmesg | grep 'Memory:'
and
dmesg | grep 'Freeing unused kernel memory:'
under all three kernels?

That would tell us directly (rather than by implication) how much memory
each kernel takes.

> I brewed 6.8.6 from 6.6.27 .config and 'make olddefconfig'

I used to (back in the 2.x days) brew my own kernel. These days, not
so much. I salute you on conquering the kernel build process. :-)

--
Lew Pitcher
"In Skills We Trust"

Re: Kernel huge vs generic

<uvmfc1$133ss$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=2289&group=alt.os.linux.slackware#2289

  copy link   Newsgroups: alt.os.linux.slackware
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chr...@mshome.net (Chris Elvidge)
Newsgroups: alt.os.linux.slackware
Subject: Re: Kernel huge vs generic
Date: Tue, 16 Apr 2024 19:17:35 +0100
Organization: A noiseless patient Spider
Lines: 75
Message-ID: <uvmfc1$133ss$1@dont-email.me>
References: <uvluns$vf1v$1@dont-email.me> <uvlvoe$v2g9$1@dont-email.me>
<uvm654$114sp$1@dont-email.me> <uvmbue$v2g9$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 16 Apr 2024 20:17:38 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="04ba676ce3572d0fdc31dc5b6eabb939";
logging-data="1150876"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/RzoK5YRJUsmHSlA3N9nEDlvTix2Pk82A="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
Thunderbird/52.2.1 Lightning/5.4
Cancel-Lock: sha1:mu4IneyRfmNZuuLTChJ4KYiNeo4=
Content-Language: en-GB
In-Reply-To: <uvmbue$v2g9$2@dont-email.me>
 by: Chris Elvidge - Tue, 16 Apr 2024 18:17 UTC

On 16/04/2024 at 18:19, Lew Pitcher wrote:
>
> Glad to hear that. Apparently, the inclusion of disk drivers no longer
> makes a significant difference on the end resident size of the kernel.
>
> I'd be interested to know what your dmesg says about the kernel memory
> Would you be willing to post the results of
> dmesg | grep 'Memory:'
> and
> dmesg | grep 'Freeing unused kernel memory:'
> under all three kernels?
>
> That would tell us directly (rather than by implication) how much memory
> each kernel takes.
>
>
dmsg-memory-generic-6.6.27
[ 0.340626] PM: hibernation: Registered nosave memory: [mem
0x00000000-0x00000fff]
[ 0.340632] PM: hibernation: Registered nosave memory: [mem
0x0009f000-0x0009ffff]
[ 0.340635] PM: hibernation: Registered nosave memory: [mem
0x000a0000-0x000effff]
[ 0.340636] PM: hibernation: Registered nosave memory: [mem
0x000f0000-0x000fffff]
[ 0.362893] Memory: 3029884K/3145272K available (22528K kernel code,
3434K rwdata, 7724K rodata, 3728K init, 4868K bss, 115128K reserved, 0K
cma-reserved)
[ 0.437814] Freeing SMP alternatives memory: 64K
[ 1.171765] Freeing initrd memory: 9420K
[ 6.295892] Freeing unused decrypted memory: 2028K
[ 6.311805] Freeing unused kernel image (initmem) memory: 3728K
[ 6.342365] Freeing unused kernel image (rodata/data gap) memory: 468K

dmsg-memory-huge-6.6.27
[ 0.028558] PM: hibernation: Registered nosave memory: [mem
0x00000000-0x00000fff]
[ 0.028561] PM: hibernation: Registered nosave memory: [mem
0x0009f000-0x0009ffff]
[ 0.028563] PM: hibernation: Registered nosave memory: [mem
0x000a0000-0x000effff]
[ 0.028564] PM: hibernation: Registered nosave memory: [mem
0x000f0000-0x000fffff]
[ 0.052446] Memory: 3035204K/3145272K available (24576K kernel code,
3645K rwdata, 8764K rodata, 4064K init, 3508K bss, 109808K reserved, 0K
cma-reserved)
[ 0.146341] Freeing SMP alternatives memory: 68K
[ 6.019644] Freeing unused decrypted memory: 2028K
[ 6.032489] Freeing unused kernel image (initmem) memory: 4064K
[ 6.075487] Freeing unused kernel image (rodata/data gap) memory: 1476K

dmsg-memory-huge-6.8.6
[ 0.028539] PM: hibernation: Registered nosave memory: [mem
0x00000000-0x00000fff]
[ 0.028543] PM: hibernation: Registered nosave memory: [mem
0x0009f000-0x0009ffff]
[ 0.028544] PM: hibernation: Registered nosave memory: [mem
0x000a0000-0x000effff]
[ 0.028545] PM: hibernation: Registered nosave memory: [mem
0x000f0000-0x000fffff]
[ 0.051606] Memory: 3035204K/3145272K available (24576K kernel code,
3653K rwdata, 8864K rodata, 4092K init, 3404K bss, 109808K reserved, 0K
cma-reserved)
[ 0.153368] Freeing SMP alternatives memory: 68K
[ 5.951739] Freeing unused decrypted memory: 2028K
[ 5.967211] Freeing unused kernel image (initmem) memory: 4092K
[ 5.998271] Freeing unused kernel image (rodata/data gap) memory: 1376K

Looks to me as though it frees everything unused.

--
Chris Elvidge, England
I WILL TRY TO RAISE A BETTER CHILD

Re: Kernel huge vs generic

<uvmr44$v2g9$3@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=2290&group=alt.os.linux.slackware#2290

  copy link   Newsgroups: alt.os.linux.slackware
Path: i2pn2.org!i2pn.org!newsfeed.bofh.team!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lew.pitc...@digitalfreehold.ca (Lew Pitcher)
Newsgroups: alt.os.linux.slackware
Subject: Re: Kernel huge vs generic
Date: Tue, 16 Apr 2024 21:38:12 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 104
Message-ID: <uvmr44$v2g9$3@dont-email.me>
References: <uvluns$vf1v$1@dont-email.me> <uvlvoe$v2g9$1@dont-email.me>
<uvm654$114sp$1@dont-email.me> <uvmbue$v2g9$2@dont-email.me>
<uvmfc1$133ss$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 16 Apr 2024 23:38:13 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="eb57ec0d5ffc7e2360ac31652931bf02";
logging-data="1018377"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1857ZCYphtgOFIKWQlU9r+Zkv8EVgjGbRA="
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
Cancel-Lock: sha1:dtzP1Iy481gZA2R3lkm+ThKPX3Y=
 by: Lew Pitcher - Tue, 16 Apr 2024 21:38 UTC

On Tue, 16 Apr 2024 19:17:35 +0100, Chris Elvidge wrote:

> On 16/04/2024 at 18:19, Lew Pitcher wrote:
>>
>> Glad to hear that. Apparently, the inclusion of disk drivers no longer
>> makes a significant difference on the end resident size of the kernel.
>>
>> I'd be interested to know what your dmesg says about the kernel memory
>> Would you be willing to post the results of
>> dmesg | grep 'Memory:'
>> and
>> dmesg | grep 'Freeing unused kernel memory:'
>> under all three kernels?
>>
>> That would tell us directly (rather than by implication) how much memory
>> each kernel takes.
>>
>>
> dmsg-memory-generic-6.6.27
> [ 0.340626] PM: hibernation: Registered nosave memory: [mem
> 0x00000000-0x00000fff]
> [ 0.340632] PM: hibernation: Registered nosave memory: [mem
> 0x0009f000-0x0009ffff]
> [ 0.340635] PM: hibernation: Registered nosave memory: [mem
> 0x000a0000-0x000effff]
> [ 0.340636] PM: hibernation: Registered nosave memory: [mem
> 0x000f0000-0x000fffff]
> [ 0.362893] Memory: 3029884K/3145272K available (22528K kernel code,
> 3434K rwdata, 7724K rodata, 3728K init, 4868K bss, 115128K reserved, 0K
> cma-reserved)
> [ 0.437814] Freeing SMP alternatives memory: 64K
> [ 1.171765] Freeing initrd memory: 9420K
> [ 6.295892] Freeing unused decrypted memory: 2028K
> [ 6.311805] Freeing unused kernel image (initmem) memory: 3728K
> [ 6.342365] Freeing unused kernel image (rodata/data gap) memory: 468K
>
> dmsg-memory-huge-6.6.27
> [ 0.028558] PM: hibernation: Registered nosave memory: [mem
> 0x00000000-0x00000fff]
> [ 0.028561] PM: hibernation: Registered nosave memory: [mem
> 0x0009f000-0x0009ffff]
> [ 0.028563] PM: hibernation: Registered nosave memory: [mem
> 0x000a0000-0x000effff]
> [ 0.028564] PM: hibernation: Registered nosave memory: [mem
> 0x000f0000-0x000fffff]
> [ 0.052446] Memory: 3035204K/3145272K available (24576K kernel code,
> 3645K rwdata, 8764K rodata, 4064K init, 3508K bss, 109808K reserved, 0K
> cma-reserved)

So, the 6.6.27 "Huge" kernel loaded an additional
2048K of code,
211K of rwdata,
1040K of rodata, and
336K of init
over the "Generic" kernel. But, it used 1360K less bss and
5320K less "reserved" memory than the "Generic" kernel.

> [ 0.146341] Freeing SMP alternatives memory: 68K
> [ 6.019644] Freeing unused decrypted memory: 2028K
> [ 6.032489] Freeing unused kernel image (initmem) memory: 4064K
> [ 6.075487] Freeing unused kernel image (rodata/data gap) memory: 1476K

Both the "Generic" and "Huge" kernels freed 2028K of "decrypted" memory, and
all the init memory that they had allocated. The "Generic" kernel also freed
9420K of memory reserved for the initrd (something that the "Huge" kernel
doesn't have).

The "Generic" kernel loaded less "kernel" (37414K vs the "Huge" 41049K), but
/overall/ loaded more when you consider the size of the initrd (46834K vs the
"Huge" 41049K).

So, the "Huge" kernel has a bit larger resident size, but a smaller loader
footprint than the "Generic" kernel.

>
> dmsg-memory-huge-6.8.6
> [ 0.028539] PM: hibernation: Registered nosave memory: [mem
> 0x00000000-0x00000fff]
> [ 0.028543] PM: hibernation: Registered nosave memory: [mem
> 0x0009f000-0x0009ffff]
> [ 0.028544] PM: hibernation: Registered nosave memory: [mem
> 0x000a0000-0x000effff]
> [ 0.028545] PM: hibernation: Registered nosave memory: [mem
> 0x000f0000-0x000fffff]
> [ 0.051606] Memory: 3035204K/3145272K available (24576K kernel code,
> 3653K rwdata, 8864K rodata, 4092K init, 3404K bss, 109808K reserved, 0K
> cma-reserved)
> [ 0.153368] Freeing SMP alternatives memory: 68K
> [ 5.951739] Freeing unused decrypted memory: 2028K
> [ 5.967211] Freeing unused kernel image (initmem) memory: 4092K
> [ 5.998271] Freeing unused kernel image (rodata/data gap) memory: 1376K
>
> Looks to me as though it frees everything unused.

This "Huge" kernel seems to be only about 136K bigger than the 6.6.7 "Huge"
kernel (+8K rwdata, +100K rodata, +28K init), but has a smaller bss (by
104K).

--
Lew Pitcher
"In Skills We Trust"

Re: Kernel huge vs generic

<uvoh65$1k6no$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=2291&group=alt.os.linux.slackware#2291

  copy link   Newsgroups: alt.os.linux.slackware
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chr...@mshome.net (Chris Elvidge)
Newsgroups: alt.os.linux.slackware
Subject: Re: Kernel huge vs generic
Date: Wed, 17 Apr 2024 14:00:52 +0100
Organization: A noiseless patient Spider
Lines: 126
Message-ID: <uvoh65$1k6no$1@dont-email.me>
References: <uvluns$vf1v$1@dont-email.me> <uvlvoe$v2g9$1@dont-email.me>
<uvm654$114sp$1@dont-email.me> <uvmbue$v2g9$2@dont-email.me>
<uvmfc1$133ss$1@dont-email.me> <uvmr44$v2g9$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 17 Apr 2024 15:00:54 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="8a4afa5cd8435ca42c032b7464e2e761";
logging-data="1710840"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+MWxa2rcuyCHH7JYURBl1k6RzkutVuMEs="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
Thunderbird/52.2.1 Lightning/5.4
Cancel-Lock: sha1:fdYTHFyQmCsq7rkrk/Hned8vU+4=
Content-Language: en-GB
In-Reply-To: <uvmr44$v2g9$3@dont-email.me>
 by: Chris Elvidge - Wed, 17 Apr 2024 13:00 UTC

On 16/04/2024 at 22:38, Lew Pitcher wrote:
> On Tue, 16 Apr 2024 19:17:35 +0100, Chris Elvidge wrote:
>
>> On 16/04/2024 at 18:19, Lew Pitcher wrote:
>>>
>>> Glad to hear that. Apparently, the inclusion of disk drivers no longer
>>> makes a significant difference on the end resident size of the kernel.
>>>
>>> I'd be interested to know what your dmesg says about the kernel memory
>>> Would you be willing to post the results of
>>> dmesg | grep 'Memory:'
>>> and
>>> dmesg | grep 'Freeing unused kernel memory:'
>>> under all three kernels?
>>>
>>> That would tell us directly (rather than by implication) how much memory
>>> each kernel takes.
>>>
>>>
>> dmsg-memory-generic-6.6.27
>> [ 0.340626] PM: hibernation: Registered nosave memory: [mem
>> 0x00000000-0x00000fff]
>> [ 0.340632] PM: hibernation: Registered nosave memory: [mem
>> 0x0009f000-0x0009ffff]
>> [ 0.340635] PM: hibernation: Registered nosave memory: [mem
>> 0x000a0000-0x000effff]
>> [ 0.340636] PM: hibernation: Registered nosave memory: [mem
>> 0x000f0000-0x000fffff]
>> [ 0.362893] Memory: 3029884K/3145272K available (22528K kernel code,
>> 3434K rwdata, 7724K rodata, 3728K init, 4868K bss, 115128K reserved, 0K
>> cma-reserved)
>> [ 0.437814] Freeing SMP alternatives memory: 64K
>> [ 1.171765] Freeing initrd memory: 9420K
>> [ 6.295892] Freeing unused decrypted memory: 2028K
>> [ 6.311805] Freeing unused kernel image (initmem) memory: 3728K
>> [ 6.342365] Freeing unused kernel image (rodata/data gap) memory: 468K
>>
>> dmsg-memory-huge-6.6.27
>> [ 0.028558] PM: hibernation: Registered nosave memory: [mem
>> 0x00000000-0x00000fff]
>> [ 0.028561] PM: hibernation: Registered nosave memory: [mem
>> 0x0009f000-0x0009ffff]
>> [ 0.028563] PM: hibernation: Registered nosave memory: [mem
>> 0x000a0000-0x000effff]
>> [ 0.028564] PM: hibernation: Registered nosave memory: [mem
>> 0x000f0000-0x000fffff]
>> [ 0.052446] Memory: 3035204K/3145272K available (24576K kernel code,
>> 3645K rwdata, 8764K rodata, 4064K init, 3508K bss, 109808K reserved, 0K
>> cma-reserved)
>
> So, the 6.6.27 "Huge" kernel loaded an additional
> 2048K of code,
> 211K of rwdata,
> 1040K of rodata, and
> 336K of init
> over the "Generic" kernel. But, it used 1360K less bss and
> 5320K less "reserved" memory than the "Generic" kernel.
>
>
>> [ 0.146341] Freeing SMP alternatives memory: 68K
>> [ 6.019644] Freeing unused decrypted memory: 2028K
>> [ 6.032489] Freeing unused kernel image (initmem) memory: 4064K
>> [ 6.075487] Freeing unused kernel image (rodata/data gap) memory: 1476K
>
> Both the "Generic" and "Huge" kernels freed 2028K of "decrypted" memory, and
> all the init memory that they had allocated. The "Generic" kernel also freed
> 9420K of memory reserved for the initrd (something that the "Huge" kernel
> doesn't have).
>
> The "Generic" kernel loaded less "kernel" (37414K vs the "Huge" 41049K), but
> /overall/ loaded more when you consider the size of the initrd (46834K vs the
> "Huge" 41049K).
>
> So, the "Huge" kernel has a bit larger resident size, but a smaller loader
> footprint than the "Generic" kernel.
>
>>
>> dmsg-memory-huge-6.8.6
>> [ 0.028539] PM: hibernation: Registered nosave memory: [mem
>> 0x00000000-0x00000fff]
>> [ 0.028543] PM: hibernation: Registered nosave memory: [mem
>> 0x0009f000-0x0009ffff]
>> [ 0.028544] PM: hibernation: Registered nosave memory: [mem
>> 0x000a0000-0x000effff]
>> [ 0.028545] PM: hibernation: Registered nosave memory: [mem
>> 0x000f0000-0x000fffff]
>> [ 0.051606] Memory: 3035204K/3145272K available (24576K kernel code,
>> 3653K rwdata, 8864K rodata, 4092K init, 3404K bss, 109808K reserved, 0K
>> cma-reserved)
>> [ 0.153368] Freeing SMP alternatives memory: 68K
>> [ 5.951739] Freeing unused decrypted memory: 2028K
>> [ 5.967211] Freeing unused kernel image (initmem) memory: 4092K
>> [ 5.998271] Freeing unused kernel image (rodata/data gap) memory: 1376K
>>
>> Looks to me as though it frees everything unused.
>
> This "Huge" kernel seems to be only about 136K bigger than the 6.6.7 "Huge"
> kernel (+8K rwdata, +100K rodata, +28K init), but has a smaller bss (by
> 104K).
>
>
>

Yes. I think I'll stick to compiling huge kernels and not bother with
(and reblacklist) generic. It seems that the 'original' advice
'generic/initrd to save memory' doesn't hold water.

Not purely Slack related, but . . .

I see Oracle have now fixed the strlcpy/strscpy problem with 6.8 kernels
- VirtualBox 7.0.16. Saves a search and replace job.

Still can't get over the vmwgfx problem, though.
[ 11.409314] vmwgfx 0000:00:02.0: [drm] *ERROR* vmwgfx seems to be
running on an unsupported hypervisor.
[ 11.409319] vmwgfx 0000:00:02.0: [drm] *ERROR* This configuration is
likely broken.
[ 11.409322] vmwgfx 0000:00:02.0: [drm] *ERROR* Please switch to a
supported graphics device to avoid problems.

Still it seems to work OK.

--
Chris Elvidge, England
HIGH EXPLOSIVES AND SCHOOL DON'T MIX

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor