Re: Missing some RAM?

2021-08-03 Thread local10
Aug 3, 2021, 10:56 by s...@svenhartge.de:

> So in the end, we have 2812MB + 4846MB = 7658MB (approx) usable for the
> system as a whole. The Kernel and it data structures also take some of
> this, so to have ~7400MB as usable memory is not unreasonable.
>


Thanks for the explanation. 



Re: Missing some RAM?

2021-08-03 Thread Sven Hartge
local10  wrote:

>  BIOS-e820: [mem 0x-0x0009c7ff] usable
>  BIOS-e820: [mem 0x0009f800-0x0009] reserved
>  BIOS-e820: [mem 0x000f-0x000f] reserved
>  BIOS-e820: [mem 0x0010-0xafde] usable
>  BIOS-e820: [mem 0xafdf-0xafdf2fff] ACPI NVS
>  BIOS-e820: [mem 0xafdf3000-0xafdf] ACPI data
>  BIOS-e820: [mem 0xafe0-0xafef] reserved
>  BIOS-e820: [mem 0xe000-0xefff] reserved
>  BIOS-e820: [mem 0xfec0-0x] reserved
>  BIOS-e820: [mem 0x0001-0x00022fff] usable
>  e820: update [mem 0x-0x0fff] usable ==> reserved
>  e820: remove [mem 0x000a-0x000f] usable
>  e820: update [mem 0xafe0-0x] usable ==> reserved
>  e820: reserve RAM buffer [mem 0x0009c800-0x0009]
>  e820: reserve RAM buffer [mem 0xafdf-0xafff]

Let's start from the back:

>  BIOS-e820: [mem 0x0001-0x00022fff] usable

This is the memory region from 4GB to 8GB and a bit of remapped memory
(or it would have ended at 0x0001).

So we have 4GB plus 805306368 Bytes (768MN) or 4846MB beyond the 4GB
32bit area.

Then we have this big reserved area:

>  BIOS-e820: [mem 0xafdf-0xafdf2fff] ACPI NVS
>  BIOS-e820: [mem 0xafdf3000-0xafdf] ACPI data
>  BIOS-e820: [mem 0xafe0-0xafef] reserved
>  BIOS-e820: [mem 0xe000-0xefff] reserved
>  BIOS-e820: [mem 0xfec0-0x] reserved

1344339968 Bytes or (roughly) 1282MB. The PCI memory area, ACPI tables,
DMA stuff, etc. are located here. 

Some of the physical memory shadowed by this will be in the 768MB of
memory from above.

Then we have a bit of usable memory again:

>  BIOS-e820: [mem 0x0010-0xafde] usable

2949578752 Bytes or roughly 2812MB.

And the rest is reserved or will be reserved, for example the lower 1MB
for security reasons:

>  BIOS-e820: [mem 0x-0x0009c7ff] usable
>  BIOS-e820: [mem 0x0009f800-0x0009] reserved
>  BIOS-e820: [mem 0x000f-0x000f] reserved
>  e820: update [mem 0x-0x0fff] usable ==> reserved
>  e820: remove [mem 0x000a-0x000f] usable
>  e820: update [mem 0xafe0-0x] usable ==> reserved

So in the end, we have 2812MB + 4846MB = 7658MB (approx) usable for the
system as a whole. The Kernel and it data structures also take some of
this, so to have ~7400MB as usable memory is not unreasonable.

S°

-- 
Sigmentation fault. Core dumped.



Re: Missing some RAM?

2021-08-03 Thread local10
Aug 3, 2021, 10:05 by s...@svenhartge.de:

> The PCI memory area is probably to blame here. Also the kernel needs
> some memory for itself.
>
> Please reboot your system and then, as root do:
>
>  dmesg | grep "e820"
>
> and post the output. That will tell us the memory map of your system and
> which regions are used or reserved.
>


#  dmesg | grep "e820"
[    0.00] BIOS-e820: [mem 0x-0x0009c7ff] usable
[    0.00] BIOS-e820: [mem 0x0009f800-0x0009] reserved
[    0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
[    0.00] BIOS-e820: [mem 0x0010-0xafde] usable
[    0.00] BIOS-e820: [mem 0xafdf-0xafdf2fff] ACPI NVS
[    0.00] BIOS-e820: [mem 0xafdf3000-0xafdf] ACPI data
[    0.00] BIOS-e820: [mem 0xafe0-0xafef] reserved
[    0.00] BIOS-e820: [mem 0xe000-0xefff] reserved
[    0.00] BIOS-e820: [mem 0xfec0-0x] reserved
[    0.00] BIOS-e820: [mem 0x0001-0x00022fff] usable
[    0.005949] e820: update [mem 0x-0x0fff] usable ==> reserved
[    0.005951] e820: remove [mem 0x000a-0x000f] usable
[    0.014336] e820: update [mem 0xafe0-0x] usable ==> reserved
[    0.221537] Aperture pointing to e820 RAM. Ignoring.
[    0.438742] e820: reserve RAM buffer [mem 0x0009c800-0x0009]
[    0.438743] e820: reserve RAM buffer [mem 0xafdf-0xafff]

Thanks,



Re: Missing some RAM?

2021-08-03 Thread Sven Hartge
local10  wrote:

> The "why 1G memory is missing?" thread got me thinking. My PC also
> seems to be missing hundreds MB of RAM and that's how it's been for
> years. I have 4*2GB RAM boards so, in theory, I should've had 8GB of
> RAM but top shows only 7472.2MiB. Even after the MiB to MB conversion
> there's still some RAM missing: 7472.2 MiB = 7835.169 MB.

> Any ideas? Any way to get it back? Thanks

The PCI memory area is probably to blame here. Also the kernel needs
some memory for itself.

Please reboot your system and then, as root do:

  dmesg | grep "e820"

and post the output. That will tell us the memory map of your system and
which regions are used or reserved.

S°

-- 
Sigmentation fault. Core dumped.



Missing some RAM?

2021-08-03 Thread local10
Hi,

The "why 1G memory is missing?" thread got me thinking. My PC also seems to be 
missing hundreds MB of RAM and that's how it's been for years. I have 4*2GB RAM 
boards so, in theory, I should've had 8GB of RAM but top shows only 7472.2MiB. 
Even after the MiB to MB conversion there's still some RAM missing: 7472.2 MiB 
= 7835.169 MB.

Any ideas? Any way to get it back? Thanks


# top
...
MiB Mem :   7472.2 total,   1284.6 free,   2085.0 used,   4102.5 buff/cache
...

# echo "This is a Debian 10 Buster PC"; uname -a
This is a Debian 10 Buster PC
Linux rsvd 4.19.0-17-amd64 #1 SMP Debian 4.19.194-1 (2021-06-10) x86_64 
GNU/Linux