linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Memory optimization of diskless system
@ 2001-08-09 14:49 Michael Fischer
  2001-08-09 16:33 ` Joe Green
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Fischer @ 2001-08-09 14:49 UTC (permalink / raw)
  To: linuxppc-embedded


Hello,
i have a Linuxppc Kernel 2.4.8 pre 4 running on a motorola asd8260 board
(16M ram). When using initrd and ramdisk to boot the system i run into out
of memory problems.
proc/meminfo shows:

        total:    used:    free:  shared: buffers:  cached:
Mem:  14958592 12062720  2895872  7421952  6656000  2191360
Swap:        0        0        0
MemTotal:        14608 kB
MemFree:          2828 kB
MemShared:        7248 kB
Buffers:          6500 kB
Cached:           2140 kB
Active:           8640 kB
Inact_dirty:         0 kB
Inact_clean:         0 kB
Inact_target:       12 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:        14608 kB
LowFree:          2828 kB
SwapTotal:           0 kB
SwapFree:            0 kB

is it really necessary to have so many buffers allocated and if not, how can
i change the amount?
(i already tried to change the values in /proc/sys/vm/buffermem without any
success).
Also other ideas how to optimize the ram usage are highly appreciated.

Thanks a lot for your input,
Michael


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: Memory optimization of diskless system
  2001-08-09 14:49 Memory optimization of diskless system Michael Fischer
@ 2001-08-09 16:33 ` Joe Green
  2001-08-09 17:05   ` Scott Anderson
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Green @ 2001-08-09 16:33 UTC (permalink / raw)
  To: Michael Fischer, linuxppc-embedded


Michael Fischer wrote:
> i have a Linuxppc Kernel 2.4.8 pre 4 running on a motorola asd8260 board
> (16M ram). When using initrd and ramdisk to boot the system i run into out
> of memory problems.
> proc/meminfo shows:
>
>         total:    used:    free:  shared: buffers:  cached:
> Mem:  14958592 12062720  2895872  7421952  6656000  2191360
> Swap:        0        0        0
> MemTotal:        14608 kB
> MemFree:          2828 kB
> MemShared:        7248 kB
> Buffers:          6500 kB
> Cached:           2140 kB
> Active:           8640 kB
> Inact_dirty:         0 kB
> Inact_clean:         0 kB
> Inact_target:       12 kB
> HighTotal:           0 kB
> HighFree:            0 kB
> LowTotal:        14608 kB
> LowFree:          2828 kB
> SwapTotal:           0 kB
> SwapFree:            0 kB
>
> is it really necessary to have so many buffers allocated and if not, how can
> i change the amount?

How big is you ramdisk?  That's included in the buffers.

--
Joe Green <jgreen@mvista.com>
MontaVista Software, Inc.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

* Re: Memory optimization of diskless system
  2001-08-09 16:33 ` Joe Green
@ 2001-08-09 17:05   ` Scott Anderson
  0 siblings, 0 replies; 3+ messages in thread
From: Scott Anderson @ 2001-08-09 17:05 UTC (permalink / raw)
  To: Joe Green; +Cc: Michael Fischer, linuxppc-embedded


Joe Green wrote:
> How big is you ramdisk?  That's included in the buffers.

and unfortunately, the kernel thinks the ramdisk buffers can be freed
up to make more room, but of course, they can't be freed (the data in
them has no place to go).  I've seen this cause the system to deadlock
under 2.2.  Under 2.4 I would assume the out of memory killer would
get invoked.

Gory details:
mm/mmap.c:vm_enough_memory() assumes that all buffermem_pages can be
freed up to make more space, drivers/block/rd.c:rd_make_request() marks
buffers as protected, and kswapd calls do_try_to_free_pages which calls
page_launder which calls fs/buffer.c:try_to_free_buffers() to try to get
more space, but try_to_free_buffers refuses to free busy (dirty, locked
or protected) buffers.

In my opinion, the fix is to teach vm_enough_memory() that protected
buffers can't be freed up.  Fixing this is one of those things I hope
to get around to; unless of course, someone else fixes it first.

    Scott Anderson
    scott_anderson@mvista.com   MontaVista Software Inc.
    (408)328-9214               1237 East Arques Ave.
    http://www.mvista.com       Sunnyvale, CA  94085

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

end of thread, other threads:[~2001-08-09 17:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-09 14:49 Memory optimization of diskless system Michael Fischer
2001-08-09 16:33 ` Joe Green
2001-08-09 17:05   ` Scott Anderson

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