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, 7 Jun 2005 12:08:11 -0700	[thread overview]
Message-ID: <20050607120811.6527a9ff.akpm@osdl.org> (raw)
In-Reply-To: <42A5AD4A.6080100@fujitsu-siemens.com>

Martin Wilck <martin.wilck@fujitsu-siemens.com> wrote:
>
> > It might be neater to do this at the mempool level: that way we're adding
>  > general-purpose infrastructure and then just using it, rather than
>  > special-casing the bounce code.
>  > 
>  > See below a (n untested) patch against the latest devel tree.  It won't be
>  > stunningly scalable on big SMP, but the overhead of bouncing will probably
>  > hide that.
> 
>  I don't quite understand your patch. You introduce a "limit" field but 
>  you never actually use it. You also don't count the allocated pages.
>  Are you using the semaphore for slowing things down on purpose?

The semaphore is initialised with the limit level, so once it has been
down()ed more than `limit' times, processes will block until someone does
up().

>  (Note that the problem is not in the mempool allocation itself but in 
>  the "normal" allocation path (page_pool_alloc() -> alloc_page()))

yup.  The semaphore will prevent more than `limit' pages being allocated at
any point in time.

>  Anyway, I think could figure out your patch but with 2.6.12-rc5-mm2 I 
>  couldn't reproduce the problem any more.

Oh bugger.

> It appears to run much more 
>  smoothly now, perhaps because wakeup_bdflush() isn't called any more. 
>  Are you still interested in more data?

Perhaps the newer kernel has writeback thresholding fixes so it's not
possible to dirty as much memory with write().

You can probably trigger the same problem if the memory is instead dirtied
with mmap(MAP_SHARED).

  reply	other threads:[~2005-06-07 19:08 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 [this message]
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

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=20050607120811.6527a9ff.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®