From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.9-rc2-mm2
Date: Thu, 23 Sep 2004 13:00:54 +1000 [thread overview]
Message-ID: <41523C66.3080508@yahoo.com.au> (raw)
In-Reply-To: <20040922131210.6c08b94c.akpm@osdl.org>
[-- Attachment #1: Type: text/plain, Size: 582 bytes --]
Andrew Morton wrote:
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.9-rc2/2.6.9-rc2-mm2/
>
fs/dcache.c:select_parent()
{
...
/*
* select_parent() is a performance optimization, it is
* not necessary to complete it. Abort if a reschedule is
* pending:
*/
if (need_resched())
goto out;
...
}
This one came back. It is the
VFS: Busy inodes after unmount. Self-destruct in 5 seconds. Have a nice day...
thing.
Attached is a fix.
[-- Attachment #2: sched-vfs-fix.patch --]
[-- Type: text/x-patch, Size: 1743 bytes --]
---
linux-2.6-npiggin/fs/dcache.c | 26 +++++++++++++++++---------
1 files changed, 17 insertions(+), 9 deletions(-)
diff -puN fs/dcache.c~sched-vfs-fix fs/dcache.c
--- linux-2.6/fs/dcache.c~sched-vfs-fix 2004-09-23 12:53:04.000000000 +1000
+++ linux-2.6-npiggin/fs/dcache.c 2004-09-23 12:59:25.000000000 +1000
@@ -156,7 +156,7 @@ repeat:
spin_unlock(&dcache_lock);
return;
}
-
+
/*
* AV: ->d_delete() is _NOT_ allowed to block now.
*/
@@ -540,6 +540,13 @@ positive:
* list for prune_dcache(). We descend to the next level
* whenever the d_subdirs list is non-empty and continue
* searching.
+ *
+ * It returns zero iff there are no unused children,
+ * otherwise it returns the number of children moved to
+ * the end of the unused list. This may not be the total
+ * number of unused children, because select_parent can
+ * drop the lock and return early due to latency
+ * constraints.
*/
static int select_parent(struct dentry * parent)
{
@@ -556,14 +563,6 @@ resume:
struct dentry *dentry = list_entry(tmp, struct dentry, d_child);
next = tmp->next;
- /*
- * select_parent() is a performance optimization, it is
- * not necessary to complete it. Abort if a reschedule is
- * pending:
- */
- if (need_resched())
- goto out;
-
if (!list_empty(&dentry->d_lru)) {
dentry_stat.nr_unused--;
list_del_init(&dentry->d_lru);
@@ -577,6 +576,15 @@ resume:
dentry_stat.nr_unused++;
found++;
}
+
+ /*
+ * We can return to the caller if we have found some (this
+ * ensures forward progress). We'll be coming back to find
+ * the rest.
+ */
+ if (found && need_resched())
+ goto out;
+
/*
* Descend a level if the d_subdirs list is non-empty.
*/
_
next prev parent reply other threads:[~2004-09-23 3:01 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-22 20:12 2.6.9-rc2-mm2 Andrew Morton
2004-09-22 20:48 ` 2.6.9-rc2-mm2 Jesse Barnes
2004-09-22 20:54 ` 2.6.9-rc2-mm2 Andrew Morton
2004-09-22 21:05 ` 2.6.9-rc2-mm2 Jesse Barnes
2004-09-22 20:55 ` 2.6.9-rc2-mm2 William Lee Irwin III
2004-09-22 20:59 ` 2.6.9-rc2-mm2 Jesse Barnes
2004-09-22 21:04 ` 2.6.9-rc2-mm2 Andrew Morton
2004-09-22 21:10 ` 2.6.9-rc2-mm2 Jesse Barnes
2004-09-22 21:02 ` 2.6.9-rc2-mm2 Stefan Seyfried
2004-09-22 22:27 ` 2.6.9-rc2-mm2 Peter Williams
2004-09-23 1:47 ` 2.6.9-rc2-mm2 Nuno Ferreira
2004-09-23 2:03 ` 2.6.9-rc2-mm2 Andrew Morton
2004-09-23 2:58 ` 2.6.9-rc2-mm2 Herbert Xu
2004-09-23 9:29 ` 2.6.9-rc2-mm2 Nuno Ferreira
2004-09-23 3:00 ` Nick Piggin [this message]
2004-09-23 5:07 ` 2.6.9-rc2-mm2 William Lee Irwin III
2004-09-23 5:27 ` 2.6.9-rc2-mm2 William Lee Irwin III
2004-09-23 5:46 ` 2.6.9-rc2-mm2 Peter Williams
2004-09-23 6:01 ` 2.6.9-rc2-mm2 William Lee Irwin III
2004-09-23 13:15 ` 2.6.9-rc2-mm2 Vladimir Saveliev
2004-09-23 15:51 ` 2.6.9-rc2-mm2 (disable repacker) Mike Houston
2004-09-23 16:48 ` 2.6.9-rc2-mm2 William Lee Irwin III
2004-09-23 17:59 ` 2.6.9-rc2-mm2 Akinobu Mita
2004-09-24 0:53 ` 2.6.9-rc2-mm2 [u] Martin Schlemmer [c]
2004-10-02 7:44 ` 2.6.9-rc2-mm2 Jaakko Hyvätti
2004-10-02 7:49 ` 2.6.9-rc2-mm2 Andrew Morton
2004-10-02 18:21 ` 2.6.9-rc2-mm2 Jaakko Hyvätti
2004-10-08 11:24 ` 2.6.9-rc2-mm2 William Lee Irwin III
[not found] <747804697@toto.iv>
2004-09-23 0:39 ` 2.6.9-rc2-mm2 Peter Chubb
2004-09-23 0:43 ` 2.6.9-rc2-mm2 Jesse Barnes
2004-09-23 6:23 ` 2.6.9-rc2-mm2 Andrew Morton
2004-09-23 6:23 ` 2.6.9-rc2-mm2 Andrew Morton
2004-09-23 16:10 ` 2.6.9-rc2-mm2 Luck, Tony
2004-09-23 16:10 ` 2.6.9-rc2-mm2 Luck, Tony
2004-09-23 18:31 ` 2.6.9-rc2-mm2 Andrew Morton
2004-09-23 18:31 ` 2.6.9-rc2-mm2 Andrew Morton
2004-09-23 0:49 ` 2.6.9-rc2-mm2 Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2004-09-24 6:27 2.6.9-rc2-mm2 Tim Krieglstein
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=41523C66.3080508@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/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.