All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: "J. Bruce Fields" <bfields@fieldses.org>,
	Justin Piszcz <jpiszcz@lucidpixels.com>,
	linux-kernel@vger.kernel.org
Subject: Re: 2.6.29.1: nfsd: page allocation failure - nfsd or kernel problem?
Date: Thu, 18 Jun 2009 10:07:22 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.00.0906180956560.2894@chino.kir.corp.google.com> (raw)
In-Reply-To: <4A3A00D9.8090504@msgid.tls.msk.ru>

On Thu, 18 Jun 2009, Michael Tokarev wrote:

> David Rientjes wrote:
> > On Thu, 18 Jun 2009, Michael Tokarev wrote:
> > 
> > > > 	http://bugzilla.kernel.org/show_bug.cgi?id=13518
> > > Does not look similar.
> > > 
> > > I repeated the issue here.  The slab which is growing here is buffer_head.
> > > It's growing slowly -- right now, after ~5 minutes of constant writes over
> > > nfs, its size is 428423 objects, growing at about 5000 objects/minute
> > > rate.
> > > When stopping writing, the cache shrinks slowly back to an acceptable
> > > size, probably when the data gets actually written to disk.
> > 
> > Not sure if you're referring to the bugzilla entry or Justin's reported
> > issue.  Justin's issue is actually allocating a skbuff_head_cache slab while
> > the system is oom.
> 
> We have the same issue - I replied to Justin's initial email with exactly
> the same trace as him.  I didn't see your reply up until today, -- the one
> you're referring to below.
> 

If it's the exact same trace, then the page allocation failure is 
occurring as the result of slab's growth of the skbuff_head_cache cache, 
not buffer_head.

So it appears as though the issue you're raising is that buffer_head is 
consuming far too much memory, which causes the system to be oom when 
attempting a GFP_ATOMIC allocation for skbuff_head_cache and is otherwise 
unseen with alloc_buffer_head() because it is allowed to invoke direct 
reclaim:

	$ grep -r alloc_buffer_head\( fs/*
	fs/buffer.c:		bh = alloc_buffer_head(GFP_NOFS);
	fs/buffer.c:struct buffer_head *alloc_buffer_head(gfp_t gfp_flags)
	fs/gfs2/log.c:	bh = alloc_buffer_head(GFP_NOFS | __GFP_NOFAIL);
	fs/jbd/journal.c:	new_bh = alloc_buffer_head(GFP_NOFS|__GFP_NOFAIL);
	fs/jbd2/journal.c:	new_bh = alloc_buffer_head(GFP_NOFS|__GFP_NOFAIL);

> As far as I can see, the warning itself, while harmless, indicates some
> deeper problem.  Namely, we shouldn't have an OOM condition - the system
> is doing nothing but NFS, there's only one NFS client which writes single
> large file, the system has 2GB (or 4Gb on another machine) RAM.  It should
> not OOM to start with.
> 

Thanks to the page allocation failure that Justin posted earlier, which 
shows the state of the available system memory, it shows that the machine 
truly is oom.  You seem to have isolated that to an enormous amount of 
buffer_head slab, which is a good start.

> Well, there ARE side-effects actually.  When the issue happens, the I/O
> over NFS slows down to almost zero bytes/sec for some while, and resumes
> slowly after about half a minute - sometimes faster, sometimes slower.
> Again, the warning itself is harmless, but it shows a deeper issue.  I
> don't think it's wise to ignore the sympthom -- the actual cause should
> be fixed instead.  I think.
> 

Since the GFP_ATOMIC allocation cannot trigger reclaim itself, it must 
rely on other allocations or background writeout to free the memory and 
this will be considerably slower than a blocking allocation.  The page 
allocation failure messages from Justin's post indicate there are 0 pages 
under writeback at the time of oom yet ZONE_NORMAL has reclaimable memory; 
this is the result of the nonblocking allocation.

  reply	other threads:[~2009-06-18 17:07 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <alpine.DEB.2.00.0906161203160.27742@p34.internal.lan>
2009-06-16 16:06 ` 2.6.29.1: nfsd: page allocation failure - nfsd or kernel problem? Justin Piszcz
2009-06-16 20:19   ` Michael Tokarev
2009-06-17  8:43     ` Michael Tokarev
2009-06-17  9:43       ` Justin Piszcz
2009-06-17 10:39         ` Michael Tokarev
2009-06-17 18:51           ` J. Bruce Fields
2009-06-17 20:24             ` Michael Tokarev
2009-06-17 20:39               ` David Rientjes
2009-06-18  8:54                 ` Michael Tokarev
2009-06-18 17:07                   ` David Rientjes [this message]
2009-06-18 17:56                     ` Michael Tokarev
2009-06-18 18:12                       ` J. Bruce Fields
2009-06-18 18:15                       ` David Rientjes
2009-06-17 22:45               ` J. Bruce Fields
2009-06-18  0:14               ` Zdenek Kaspar
2009-06-17 19:44   ` [patch] ipv4: don't warn about skb ack allocation failures David Rientjes
2009-06-17 20:16     ` Eric Dumazet
2009-06-17 20:33       ` David Rientjes
2009-06-17 20:52         ` Eric Dumazet
2009-06-17 21:12           ` David Rientjes
2009-06-17 22:30             ` Eric Dumazet
2009-06-17 23:08               ` David Miller
2009-06-18 16:56                 ` David Rientjes
2009-06-18 19:00                   ` David Miller
2009-06-18 19:23                     ` David Rientjes
2009-06-18 19:37                       ` David Miller
2009-06-19 19:45                         ` David Rientjes
2009-06-19 20:41                         ` Eric W. Biederman
2009-06-19 22:37                           ` David Rientjes
2009-06-19 23:04                             ` David Miller
2009-06-20  1:28                             ` Eric W. Biederman
2009-06-19 23:03                           ` David Miller
2009-06-22 16:08 ` 2.6.30: nfsd: page allocation failure - nfsd or kernel problem? (again with 2.6.30) Justin Piszcz

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=alpine.DEB.2.00.0906180956560.2894@chino.kir.corp.google.com \
    --to=rientjes@google.com \
    --cc=bfields@fieldses.org \
    --cc=jpiszcz@lucidpixels.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjt@tls.msk.ru \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.