lkml.org 
[lkml]   [2004]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] reserved buffers only for PF_MEMALLOC
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.

Thanks,
Matt

--
Matt Domsch
Sr. Software Engineer, Lead Engineer
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.044 / U:1.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site