linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* A file of 5 MB on tmpfs file system uses 5 MB of RAM or more?
@ 2008-01-18 13:15 DI BACCO ANTONIO - technolabs
  2008-01-18 15:50 ` Kumar Gala
  2008-01-18 15:58 ` Scott Wood
  0 siblings, 2 replies; 5+ messages in thread
From: DI BACCO ANTONIO - technolabs @ 2008-01-18 13:15 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 549 bytes --]

I have a linux-2.6.19.2 board with an MPC880 with 16MB ram and 16 MB
flash. 
Normally I have 9-10 MB of free RAM.
 
If I allocate 5 MB of ram memory, the system continues to work normally,
but if, instead of allocating 5 MB directly, I fill the /tmp directory
(that has a tmpfs file system) with a 5MB file the system becomes slow
and after some minutes the oom_killer is invoked. Before it dies I had
the time to see that mtdblockd is taking a lot of CPU (20%), what could
be the problem?
 
Any hint will be appreciate,
Bye,
Antonio.

[-- Attachment #2: Type: text/html, Size: 1456 bytes --]

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

* Re: A file of 5 MB on tmpfs file system uses 5 MB of RAM or more?
  2008-01-18 13:15 A file of 5 MB on tmpfs file system uses 5 MB of RAM or more? DI BACCO ANTONIO - technolabs
@ 2008-01-18 15:50 ` Kumar Gala
  2008-01-18 15:58 ` Scott Wood
  1 sibling, 0 replies; 5+ messages in thread
From: Kumar Gala @ 2008-01-18 15:50 UTC (permalink / raw)
  To: DI BACCO ANTONIO - technolabs; +Cc: linuxppc-embedded


On Jan 18, 2008, at 7:15 AM, DI BACCO ANTONIO - technolabs wrote:

> I have a linux-2.6.19.2 board with an MPC880 with 16MB ram and 16 MB  
> flash.
> Normally I have 9-10 MB of free RAM.
>
> If I allocate 5 MB of ram memory, the system continues to work  
> normally, but if, instead of allocating 5 MB directly, I fill the / 
> tmp directory (that has a tmpfs file system) with a 5MB file the  
> system becomes slow and after some minutes the oom_killer is  
> invoked. Before it dies I had the time to see that mtdblockd is  
> taking a lot of CPU (20%), what could be the problem?
>
Posting any output from OOM, etc would be useful.

- k

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

* Re: A file of 5 MB on tmpfs file system uses 5 MB of RAM or more?
  2008-01-18 13:15 A file of 5 MB on tmpfs file system uses 5 MB of RAM or more? DI BACCO ANTONIO - technolabs
  2008-01-18 15:50 ` Kumar Gala
@ 2008-01-18 15:58 ` Scott Wood
  2008-01-18 22:23   ` DI BACCO ANTONIO - technolabs
  1 sibling, 1 reply; 5+ messages in thread
From: Scott Wood @ 2008-01-18 15:58 UTC (permalink / raw)
  To: DI BACCO ANTONIO - technolabs; +Cc: linuxppc-embedded

On Fri, Jan 18, 2008 at 02:15:02PM +0100, DI BACCO ANTONIO - technolabs wrote:
> I have a linux-2.6.19.2 board with an MPC880 with 16MB ram and 16 MB
> flash. 
> Normally I have 9-10 MB of free RAM.
>  
> If I allocate 5 MB of ram memory, the system continues to work normally,

Are you sure the RAM was actually allocated (i.e. did you write to all of
the pages)?

-Scott

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

* RE: A file of 5 MB on tmpfs file system uses 5 MB of RAM or more?
  2008-01-18 15:58 ` Scott Wood
@ 2008-01-18 22:23   ` DI BACCO ANTONIO - technolabs
  2008-01-18 22:25     ` Scott Wood
  0 siblings, 1 reply; 5+ messages in thread
From: DI BACCO ANTONIO - technolabs @ 2008-01-18 22:23 UTC (permalink / raw)
  To: Scott Wood; +Cc: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 777 bytes --]

No I simply did several malloc(s) without writing to the allocated space.

This means that the pages are not allocated really?



-----Original Message-----
From: Scott Wood [mailto:scottwood@freescale.com]
Sent: Fri 18/01/2008 16.58
To: DI BACCO ANTONIO - technolabs
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: A file of 5 MB on tmpfs file system uses 5 MB of RAM or more?
 
On Fri, Jan 18, 2008 at 02:15:02PM +0100, DI BACCO ANTONIO - technolabs wrote:
> I have a linux-2.6.19.2 board with an MPC880 with 16MB ram and 16 MB
> flash. 
> Normally I have 9-10 MB of free RAM.
>  
> If I allocate 5 MB of ram memory, the system continues to work normally,

Are you sure the RAM was actually allocated (i.e. did you write to all of
the pages)?

-Scott


[-- Attachment #2: Type: text/html, Size: 1346 bytes --]

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

* Re: A file of 5 MB on tmpfs file system uses 5 MB of RAM or more?
  2008-01-18 22:23   ` DI BACCO ANTONIO - technolabs
@ 2008-01-18 22:25     ` Scott Wood
  0 siblings, 0 replies; 5+ messages in thread
From: Scott Wood @ 2008-01-18 22:25 UTC (permalink / raw)
  To: DI BACCO ANTONIO - technolabs; +Cc: linuxppc-embedded

DI BACCO ANTONIO - technolabs wrote:
> No I simply did several malloc(s) without writing to the allocated space.
> 
> This means that the pages are not allocated really?

Correct.

-Scott

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

end of thread, other threads:[~2008-01-18 22:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-18 13:15 A file of 5 MB on tmpfs file system uses 5 MB of RAM or more? DI BACCO ANTONIO - technolabs
2008-01-18 15:50 ` Kumar Gala
2008-01-18 15:58 ` Scott Wood
2008-01-18 22:23   ` DI BACCO ANTONIO - technolabs
2008-01-18 22:25     ` Scott Wood

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).