2001-03-14 14:08:25

by Alex Baretta

[permalink] [raw]
Subject: 5Mb missing...

Mike Galbraith wrote:
>
> If crashes are routine on this machine, I'd recommend that you take
> a serious look at your ram. (or if you're overclocking, don't)

Crashes were routine, and I was not overclocking, so I took Mike's
advice and bought a new 256MB DIMM. The computer hasn't crashed
once since I installed it. Now, though, I have a curious though
fairly irrelevant problem. My kernel apparently sees less RAM than
I have.


[alex@localhost /home]$ free -m
total used free shared buffers
cached
Mem: 251 209 42 60
61 92
-/+ buffers/cache: 55 196


I strongly doubt this can be a bug in the kernel. Could anyone
explain to me why this might happen?

Alex


2001-03-14 14:39:05

by Mordechai Ovits

[permalink] [raw]
Subject: Re: 5Mb missing...

On Wed, Mar 14, 2001 at 03:06:09PM +0100, Alex Baretta wrote:
> Mike Galbraith wrote:
> >
> > If crashes are routine on this machine, I'd recommend that you take
> > a serious look at your ram. (or if you're overclocking, don't)
>
> Crashes were routine, and I was not overclocking, so I took Mike's
> advice and bought a new 256MB DIMM. The computer hasn't crashed
> once since I installed it. Now, though, I have a curious though
> fairly irrelevant problem. My kernel apparently sees less RAM than
> I have.
>
>
> [alex@localhost /home]$ free -m
> total used free shared buffers
> cached
> Mem: 251 209 42 60
> 61 92
> -/+ buffers/cache: 55 196
>
>
> I strongly doubt this can be a bug in the kernel. Could anyone
> explain to me why this might happen?

when you boot, your bios decides how much ram is "really" available,
usually for good reasons. If the bios knows that its power management
routines need a few meg off the top it'll report a few less meg to the OS
that is to be booted. You can tell linux to ignore the bios with the kernel
parameter mem=256, but I highly recommend *against* it in this case. Look
into it.

Mordy

> Alex
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

2001-03-14 14:40:06

by Mike Dresser

[permalink] [raw]
Subject: Re: 5Mb missing...

Alex Baretta wrote:

> [alex@localhost /home]$ free -m
> total used free shared buffers
> cached
> Mem: 251 209 42 60
> 61 92
>
> I strongly doubt this can be a bug in the kernel. Could anyone
> explain to me why this might happen?

grep Memory /var/log/kern.log

You've got your kernel itself loading into ram, reserved memory, etc.

I've got 48 meg in this test box of mine, and a free -m shows 46, a free shows
47356. Divided by 1024, gives 46, when rounded off. So yes, free -m is
correct. That 251 meg is what's available to use, after your kernel loads,
etc.

mike

2001-03-14 15:02:25

by Jonathan Morton

[permalink] [raw]
Subject: Re: 5Mb missing...

>> If crashes are routine on this machine, I'd recommend that you take
>> a serious look at your ram. (or if you're overclocking, don't)
>
>Crashes were routine, and I was not overclocking, so I took Mike's
>advice and bought a new 256MB DIMM. The computer hasn't crashed
>once since I installed it. Now, though, I have a curious though
>fairly irrelevant problem. My kernel apparently sees less RAM than
>I have.

The kernel itself takes up some RAM, which is simply subtracted from the
"total memory available" field in the memory summaries available to
user-mode processes. This is perfectly normal.

--------------------------------------------------------------
from: Jonathan "Chromatix" Morton
mail: [email protected] (not for attachments)
big-mail: [email protected]
uni-mail: [email protected]

The key to knowledge is not to rely on people to teach you it.

Get VNC Server for Macintosh from http://www.chromatix.uklinux.net/vnc/

-----BEGIN GEEK CODE BLOCK-----
Version 3.12
GCS$/E/S dpu(!) s:- a20 C+++ UL++ P L+++ E W+ N- o? K? w--- O-- M++$ V? PS
PE- Y+ PGP++ t- 5- X- R !tv b++ DI+++ D G e+ h+ r++ y+(*)
-----END GEEK CODE BLOCK-----


2001-03-14 15:20:55

by Martin Dalecki

[permalink] [raw]
Subject: Re: 5Mb missing...

Jonathan Morton wrote:
>
> >> If crashes are routine on this machine, I'd recommend that you take
> >> a serious look at your ram. (or if you're overclocking, don't)
> >
> >Crashes were routine, and I was not overclocking, so I took Mike's
> >advice and bought a new 256MB DIMM. The computer hasn't crashed
> >once since I installed it. Now, though, I have a curious though
> >fairly irrelevant problem. My kernel apparently sees less RAM than
> >I have.
>
> The kernel itself takes up some RAM, which is simply subtracted from the
> "total memory available" field in the memory summaries available to
> user-mode processes. This is perfectly normal.

The kernel reserves 4m for hilself. The off by one error is a rounding
bug.

2001-03-14 15:50:09

by Alex Baretta

[permalink] [raw]
Subject: Re: 5Mb missing...

Martin Dalecki wrote:
>
> Jonathan Morton wrote:
> >
> > The kernel itself takes up some RAM, which is simply subtracted from the
> > "total memory available" field in the memory summaries available to
> > user-mode processes. This is perfectly normal.
>
> The kernel reserves 4m for hilself. The off by one error is a rounding
> bug.

Sounds pretty reasonable. I have actually tested the memory card
with memtest, just to make sure that it was all there and working
properly, and the test succeeded, so it must really be the kernel
eating away a few megs.

Alex