From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Subject: [PATCH 1/5] xfs: ensure reclaim cursor is reset correctly at end of AG
Date: Fri, 6 May 2011 12:54:04 +1000 [thread overview]
Message-ID: <1304650448-28438-2-git-send-email-david@fromorbit.com> (raw)
In-Reply-To: <1304650448-28438-1-git-send-email-david@fromorbit.com>
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>
Tested-By: Christian Kujau <lists@nerdbynature.de>
---
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 e0da841..cb1bb20 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;
}
--
1.7.4.4
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2011-05-06 2:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-06 2:54 [PATCH 0/5] xfs: regression fixes for 2.6.39-rc6 Dave Chinner
2011-05-06 2:54 ` Dave Chinner [this message]
2011-05-09 14:07 ` [PATCH 1/5] xfs: ensure reclaim cursor is reset correctly at end of AG Christoph Hellwig
2011-05-06 2:54 ` [PATCH 2/5] xfs: exit AIL push work correctly when AIL is empty Dave Chinner
2011-05-09 14:08 ` Christoph Hellwig
2011-05-06 2:54 ` [PATCH 3/5] xfs: always push the AIL to the target Dave Chinner
2011-05-09 14:13 ` Christoph Hellwig
2011-05-06 2:54 ` [PATCH 5/5] xfs: fix race condition in AIL push trigger Dave Chinner
2011-05-09 14:16 ` Christoph Hellwig
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=1304650448-28438-2-git-send-email-david@fromorbit.com \
--to=david@fromorbit.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