mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Martin Wilck <martin.wilck@fujitsu-siemens.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: RFC for 2.6: avoid OOM at bounce buffer storm
Date: Tue, 14 Jun 2005 13:38:59 -0700	[thread overview]
Message-ID: <20050614133859.0d2a5eab.akpm@osdl.org> (raw)
In-Reply-To: <42AF0443.6050209@fujitsu-siemens.com>

Martin Wilck <martin.wilck@fujitsu-siemens.com> wrote:
>
> Hi Andrew,
> 
> > Well.  As I said, I think what you're seeing here is recent changes to
> > mm/page-writeback.c which reduce the amount of memory which we'll permit to
> > be dirtied due to write() calls.  You'll probably find that the bounce
> > buffer problem is also fixable by reducing /proc/sys/vm/dirty_ratio in
> > 2.6.9, for the same reasons.
> > 
> > What concerns me is that there are other ways of dirtying lots of memory
> > apart from write(): namely mmap(MAP_SHARED).  If someone dirties 90% of all
> > memory via mmap() then we might again get into bounce buffer starvation.
> 
> I have tried the mmap(MAP_SHARED) method now extensively. I haven't been 
> able to come anywhere near the catastrophic situations I saw with the 
> 2.6.9 kernel, even by dirtying the full 8GB in fractions of a second.

OK, thanks.

> There was another strangeness there though: Even with the high memory 
> pressure applied, The ZONE_NORMAL free memory would never go below 
> ~300MB. When the mem pressure got too high, the kernel would rather free 
> almost slabs and start swapping than use those remaining 300M. It seems 
> to me that the new logic is a bit too conservative with ZONE_NORMAL 
> allocations.

Yes, we reserve lots of ZONE_NORMAL memory when performing GFP_HIGHMEM
allocations to avoid a weird corner case in which all of the lowmem memory
is pinned down because some application mlocked a lot of memory.

You can do

	echo 1000 > /proc/sys/vm/lowmem_reserve_ratio 

to get the old behaviour back (I do this all the time).


      reply	other threads:[~2005-06-14 20:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-03 15:47 Martin Wilck
2005-06-03 23:06 ` Andrew Morton
2005-06-07 14:20   ` Martin Wilck
2005-06-07 19:08     ` Andrew Morton
2005-06-08 18:54       ` Martin Wilck
2005-06-08 21:46         ` Andrew Morton
2005-06-14 16:22           ` Martin Wilck
2005-06-14 20:38             ` Andrew Morton [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=20050614133859.0d2a5eab.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.wilck@fujitsu-siemens.com \
    /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

all inboxes | Powered by JetHome®