public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* /proc/kcore size
@ 2004-01-12  9:04 J.A. Magallon
  2004-01-12  9:08 ` J.A. Magallon
  0 siblings, 1 reply; 4+ messages in thread
From: J.A. Magallon @ 2004-01-12  9:04 UTC (permalink / raw)
  To: Lista Linux-Kernel

Hi all...

To the request of one of my users, I installed the 'hinv' program (1.4pre1) by
Larry McVoy.

Problem: it detects the memory amount in the box by stat'ing /proc/kcore.
Thats not the problem, but that the box has 1Gb of memory, and kcore is just
896Mb big.

Kernel is built with 4Gb support:

annwn:/proc# free
             total       used       free     shared    buffers     cached
Mem:       1033172    1017772      15400          0     164792     556416
-/+ buffers/cache:     296564     736608
Swap:      1951856          8    1951848

annwn:/proc# hinv
Main memory size: 896 Mbytes
...

annwn:/proc# ll /proc/kcore
-r--------    1 root     root     939528192 Jan 12 10:02 /proc/kcore

Exactly the same as a box that has _really_ 896 Mb:

werewolf:/proc# ll kcore
-r--------    1 root     root     939528192 Jan 12 10:02 kcore

werewolf:/proc# free
             total       used       free     shared    buffers     cached
Mem:        905012     276008     629004          0      27268     109344
-/+ buffers/cache:     139396     765616
Swap:       345356          0     345356

BUG ?

TIA

-- 
J.A. Magallon <jamagallon()able!es>     \                 Software is like sex:
werewolf!able!es                         \           It's better when it's free
Mandrake Linux release 10.0 (Cooker) for i586
Linux 2.6.1-jam2 (gcc 3.3.2 (Mandrake Linux 10.0 3.3.2-4mdk))

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: /proc/kcore size
@ 2004-01-12 18:00 Luck, Tony
  2004-01-12 18:52 ` Jesse Barnes
  0 siblings, 1 reply; 4+ messages in thread
From: Luck, Tony @ 2004-01-12 18:00 UTC (permalink / raw)
  To: linux-kernel; +Cc: jamagallon

> Problem: it detects the memory amount in the box by stat'ing /proc/kcore.
> Thats not the problem, but that the box has 1Gb of memory, and kcore is just
> 896Mb big.

It may not be the specific problem that you have now, but it is a
problem in general.  The size of /proc/kcore may be a good
approximation for the amount of memory on machines that have
contiguous physical memory starting at a base physical address
of 0x0, but on an increasing number of machines it may give
a grossly inflated value (perhaps an SGI Altix user will post
the output from "ls -l /proc/kcore").

-Tony Luck  


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-01-12 18:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-12  9:04 /proc/kcore size J.A. Magallon
2004-01-12  9:08 ` J.A. Magallon
  -- strict thread matches above, loose matches on Subject: below --
2004-01-12 18:00 Luck, Tony
2004-01-12 18:52 ` Jesse Barnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox