public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Christian Kujau <lists@nerdbynature.de>
Cc: minchan.kim@gmail.com, LKML <linux-kernel@vger.kernel.org>,
	Markus Trippelsdorf <markus@trippelsdorf.de>,
	xfs@oss.sgi.com
Subject: Re: 2.6.39-rc4+: oom-killer busy killing tasks
Date: Wed, 4 May 2011 21:12:11 +1000	[thread overview]
Message-ID: <20110504111211.GF9114@dastard> (raw)
In-Reply-To: <20110504073615.GD9114@dastard>

On Wed, May 04, 2011 at 05:36:15PM +1000, Dave Chinner wrote:
> On Tue, May 03, 2011 at 05:46:14PM -0700, Christian Kujau wrote:
> > And another one, please see the files marked with 15- here:
> > 
> >    https://trent.utfs.org/p/bits/2.6.39-rc4/oom/trace/
> > 
> > I tried to have more concise timestamps in each of these files, hope that 
> > helps. Sadly though, trace-cmd reports still segfaults on the tracefile.
> 
> Ok, that will be helpful. Also helpful is that I've (FINALLY!)
> reproduced this myself, and i think i can now reproduce it at will
> on a highmem i686 machine. I'll look into it more later tonight....

And here's a patch for you to try. It fixes the problem on my test
machine.....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

xfs: ensure reclaim cursor is reset correctly at end of AG

From: Dave Chinner <dchinner@redhat.com>

On a 32 bit highmem PowerPC machine, the XFS inode cache was growing
without bound and exhausting low memory causing the OOM killer to be
triggered. After some effort, the problem was reproduced on a 32 bit
x86 highmem machine.

The problem is that the per-ag inode reclaim index cursor was not
getting reset to the start of the AG if the radix tree tag lookup
found no more reclaimable inodes. Hence every further reclaim
attempt started at the same index beyond where any reclaimable
inodes lay, and no further background reclaim ever occurred from the
AG.

Without background inode reclaim the VM driven cache shrinker
simply cannot keep up with cache growth, and OOM is the result.

While the change that exposed the problem was the conversion of the
inode reclaim to use work queues for background reclaim, it was not
the cause of the bug. The bug was introduced when the cursor code
was added, just waiting for some weird configuration to strike....

Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
 fs/xfs/linux-2.6/xfs_sync.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c
index 3253572..4e1f23a 100644
--- a/fs/xfs/linux-2.6/xfs_sync.c
+++ b/fs/xfs/linux-2.6/xfs_sync.c
@@ -936,6 +936,7 @@ restart:
 					XFS_LOOKUP_BATCH,
 					XFS_ICI_RECLAIM_TAG);
 			if (!nr_found) {
+				done = 1;
 				rcu_read_unlock();
 				break;
 			}

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2011-05-04 11:08 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-22  1:57 2.6.39-rc4+: oom-killer busy killing tasks Christian Kujau
2011-04-22  2:58 ` Minchan Kim
2011-04-22  3:03   ` Christian Kujau
2011-04-22 17:41   ` Christian Kujau
2011-04-22 18:46     ` Christian Kujau
2011-04-22 22:47       ` Minchan Kim
2011-04-24 23:46 ` Dave Chinner
2011-04-25  5:51   ` Christian Kujau
2011-04-25  7:19     ` Christian Kujau
2011-04-26 15:14       ` Christian Kujau
2011-04-27  2:26       ` Dave Chinner
2011-04-27  7:46         ` Christian Kujau
2011-04-27 10:28           ` Dave Chinner
2011-04-27 23:16             ` Minchan Kim
2011-04-27 23:56               ` Dave Chinner
2011-04-28 17:30             ` Christian Kujau
2011-04-28 23:37               ` Dave Chinner
2011-04-29 17:32                 ` Christian Kujau
2011-04-29 19:58                 ` Christian Kujau
2011-04-29 20:17                   ` Markus Trippelsdorf
2011-04-29 20:20                     ` Christian Kujau
2011-04-29 20:21                       ` Markus Trippelsdorf
2011-04-30  0:17                     ` Christian Kujau
2011-05-01  8:01                       ` Dave Chinner
2011-05-02  4:59                         ` Christian Kujau
2011-05-02 12:19                           ` Dave Chinner
2011-05-02 19:59                             ` Christian Kujau
2011-05-03  0:51                               ` Dave Chinner
2011-05-03  4:04                                 ` Christian Kujau
2011-05-03  6:36                                   ` Dave Chinner
2011-05-03 20:53                                 ` Christian Kujau
2011-05-04  0:46                                   ` Christian Kujau
2011-05-04  1:51                                     ` Christian Kujau
2011-05-04  7:36                                     ` Dave Chinner
2011-05-04 11:12                                       ` Dave Chinner [this message]
2011-05-04 19:10                                         ` Christian Kujau
2011-05-04 23:15                                           ` Dave Chinner
2011-05-05  2:07                                             ` Christian Kujau
2011-05-02  9:26                         ` Christian Kujau
2011-05-02 12:38                           ` Dave Chinner
2011-04-25  8:02   ` Christian Kujau
2011-04-25  9:50     ` Christian Kujau

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=20110504111211.GF9114@dastard \
    --to=david@fromorbit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lists@nerdbynature.de \
    --cc=markus@trippelsdorf.de \
    --cc=minchan.kim@gmail.com \
    --cc=xfs@oss.sgi.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