From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
To: Matt Domsch <Matt_Domsch@dell.com>
Cc: Rik van Riel <riel@redhat.com>,
linux-kernel@vger.kernel.org,
Ernie Petrides <petrides@redhat.com>
Subject: Re: [PATCH] reserved buffers only for PF_MEMALLOC
Date: Tue, 10 Aug 2004 16:50:10 -0300 [thread overview]
Message-ID: <20040810195009.GC13509@logos.cnet> (raw)
In-Reply-To: <20040810204232.GA2528@lists.us.dell.com>
On Tue, Aug 10, 2004 at 03:42:32PM -0500, Matt Domsch wrote:
> On Tue, Aug 10, 2004 at 04:04:55PM -0300, Marcelo Tosatti wrote:
> > On Tue, Aug 10, 2004 at 01:20:24PM -0400, Rik van Riel wrote:
> > >
> > > The buffer allocation path in 2.4 has a long standing bug,
> > > where non-PF_MEMALLOC tasks can dig into the reserved pool
> > > in get_unused_buffer_head(). The following patch makes the
> > > reserved pool only accessible to PF_MEMALLOC tasks.
> >
> > Out of curiosity: Do you actually seen any practical problem due to
> > get_unused_buffer_head() calls eating into the reserved pool?
> >
> > Or have any testcase which would trigger a problem (OOM) due to it?
>
> My team has seen an application which mallocs as much memory as
> possible, up to 95% of system RAM, using multiple processes as
> necessary, and then has threads which touch all the malloc'd bytes and
> threads which touch all the malloc'd pages. It keeps kswapd pretty
> busy, such that you can get down to zero free and inactive clean
> ZONE_NORMAL pages from which to allocate additional buffer_heads for
> swapout, deadlocking the system.
>
> We believe that by limiting the use of the reserved buffer_head pool
> to PF_MEMALLOC tasks like kswapd, kswapd can make forward progress
> even in extremely low memory situations.
OK, makes sense. I assume Rik's patch fixes the deadlock you are seeing?
Have you tested it?
next prev parent reply other threads:[~2004-08-10 20:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-10 17:20 [PATCH] reserved buffers only for PF_MEMALLOC Rik van Riel
2004-08-10 19:04 ` Marcelo Tosatti
2004-08-10 20:42 ` Matt Domsch
2004-08-10 19:50 ` Marcelo Tosatti [this message]
2004-08-10 20:59 ` Rik van Riel
2004-08-10 20:16 ` Marcelo Tosatti
2004-10-20 14:02 ` Matt Domsch
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=20040810195009.GC13509@logos.cnet \
--to=marcelo.tosatti@cyclades.com \
--cc=Matt_Domsch@dell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=petrides@redhat.com \
--cc=riel@redhat.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