linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.6.0-test2 : size of /proc/kcore is different from RAM size.
@ 2003-08-10 20:12 Rémi Colinet
  2003-08-10 21:20 ` Rémi Colinet
  0 siblings, 1 reply; 3+ messages in thread
From: Rémi Colinet @ 2003-08-10 20:12 UTC (permalink / raw)
  To: linux-kernel

Hi,

I have noticed that the /proc/kcore file has a different size (1Go) 
compared with the available memory of my box (640Mo).

[root@tigre01 kernel]# dmesg | grep Memory
Memory: 643148k/655360k available (2331k kernel code, 11424k reserved, 
730k data, 348k init, 0k highmem)

[root@tigre01 proc]# ls -l /proc | grep kcore
-r--------    1 root     root     1073692672 Aug 10 21:43 kcore
[root@tigre01 proc]#

Is it a bug or just a new behaviour of the /proc/kcore?

Regards,
Rémi


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

* Re: 2.6.0-test2 : size of /proc/kcore is different from RAM size.
  2003-08-10 20:12 2.6.0-test2 : size of /proc/kcore is different from RAM size Rémi Colinet
@ 2003-08-10 21:20 ` Rémi Colinet
  0 siblings, 0 replies; 3+ messages in thread
From: Rémi Colinet @ 2003-08-10 21:20 UTC (permalink / raw)
  To: linux-kernel

Rémi Colinet wrote:

> Hi,
>
> I have noticed that the /proc/kcore file has a different size (1Go) 
> compared with the available memory of my box (640Mo).
>
> [root@tigre01 kernel]# dmesg | grep Memory
> Memory: 643148k/655360k available (2331k kernel code, 11424k reserved, 
> 730k data, 348k init, 0k highmem)
>
> [root@tigre01 proc]# ls -l /proc | grep kcore
> -r--------    1 root     root     1073692672 Aug 10 21:43 kcore
> [root@tigre01 proc]#
>
> Is it a bug or just a new behaviour of the /proc/kcore?
>
> Regards,
> Rémi 

It's ok with 2.6.0-test3-mm1.

Remi






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

* Re: 2.6.0-test2 : size of /proc/kcore is different from RAM size.
@ 2003-08-13 17:00 Luck, Tony
  0 siblings, 0 replies; 3+ messages in thread
From: Luck, Tony @ 2003-08-13 17:00 UTC (permalink / raw)
  To: linux-kernel; +Cc: remi.colinet

> I have noticed that the /proc/kcore file has a different size (1Go) 
> compared with the available memory of my box (640Mo).
> 
> [root@tigre01 kernel]# dmesg | grep Memory
> Memory: 643148k/655360k available (2331k kernel code, 11424k reserved, 
> 730k data, 348k init, 0k highmem)
> 
> [root@tigre01 proc]# ls -l /proc | grep kcore
> -r--------    1 root     root     1073692672 Aug 10 21:43 kcore
> [root@tigre01 proc]#
> 
> Is it a bug or just a new behaviour of the /proc/kcore?

New behaivour ... /proc/kcore is a pseudo-file that tries to
look as much like a "core" file as possible.  For architectures
that use ELF executable format, this means that it starts with
an ELF header, then a few elf_phdr structures to describe the
various virtual sections, and then the sections themselves.  You
can use "objdump -fp" to display these in human readable form.

/proc/kcore will usually be somewhat sparse, as the offsets chosen
for the sections within the file depend on the virtual addresses
of the sections in kernel virtual memory.

The size of the file should be large enough to cover all of the
sections.  One glitch, that probably ought to be fixed, is that
the size is initially assigned based on memory size, but the first
time the file is opened we compute the correct size for all the
sections.

-Tony Luck  


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

end of thread, other threads:[~2003-08-13 17:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-10 20:12 2.6.0-test2 : size of /proc/kcore is different from RAM size Rémi Colinet
2003-08-10 21:20 ` Rémi Colinet
2003-08-13 17:00 Luck, Tony

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).