linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Scott Anderson <scott_anderson@mvista.com>
To: Joe Green <jgreen@mvista.com>
Cc: Michael Fischer <fischi@epygi.de>, linuxppc-embedded@lists.linuxppc.org
Subject: Re: Memory optimization of diskless system
Date: Thu, 09 Aug 2001 10:05:12 -0700	[thread overview]
Message-ID: <3B72C2C8.F8685834@mvista.com> (raw)
In-Reply-To: 01080909352601.18546@minotaur.mvista.com


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/

      reply	other threads:[~2001-08-09 17:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B72C2C8.F8685834@mvista.com \
    --to=scott_anderson@mvista.com \
    --cc=fischi@epygi.de \
    --cc=jgreen@mvista.com \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).