>>>>> "jeff" == Jeff Garzik <jgarzik@mandrakesoft.com> writes:
jeff> Netscape Mail and Navigator turn out to be wonderful test tools :)
jeff> After booting pre7 release on a Dual P-II (CONFIG_M686/CONFIG_SMP),
jeff> Netscape quickly hangs in the disk wait state, whenever going any
jeff> (AFAICS) mmap-heavy operation.
jeff> Since my home dir is over NFS, that may be a factor too.
jeff> .config attached..
jeff> Jeff
There is a bug in NFS in pre7 (and previous), could you test this
patch, please. The function invalidate_inode_pages should not wait in
locked pages, but I didn't know when I did the previous patch.
Later, Juan.
diff -u -urN --exclude=CVS --exclude=*~ --exclude=.#* --exclude=TAGS pre7/mm/filemap.c testing2/mm/filemap.c
--- pre7/mm/filemap.c Fri May 12 01:11:43 2000
+++ testing2/mm/filemap.c Fri May 12 03:42:22 2000
@@ -111,15 +111,23 @@
#define ITERATIONS 100
+/**
+ * invalidate_inode_pages - Invalidate all the unlocked pages of one inode
+ * @inode: the inode which pages we want to invalidate
+ *
+ * This function only removes the unlocked pages, if you want to
+ * remove all the pages of one inode, you must call truncate_inode_pages.
+ */
+
void invalidate_inode_pages(struct inode * inode)
{
struct list_head *head, *curr;
struct page * page;
- int count;
+ int count = ITERATIONS;
head = &inode->i_mapping->pages;
- while (head != head->next) {
+ while (count == ITERATIONS) {
spin_lock(&pagecache_lock);
spin_lock(&pagemap_lru_lock);
head = &inode->i_mapping->pages;
@@ -140,22 +148,8 @@
page_cache_release(page);
}
- /* At this stage we have passed through the list
- * once, and there may still be locked pages. */
-
- if (head->next!=head) {
- page = list_entry(head->next, struct page, list);
- get_page(page);
- spin_unlock(&pagemap_lru_lock);
- spin_unlock(&pagecache_lock);
- /* We need to block */
- lock_page(page);
- UnlockPage(page);
- page_cache_release(page);
- } else {
- spin_unlock(&pagemap_lru_lock);
- spin_unlock(&pagecache_lock);
- }
+ spin_unlock(&pagemap_lru_lock);
+ spin_unlock(&pagecache_lock);
}
}
-- In theory, practice and theory are the same, but in practice they are different -- Larry McVoy- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:21 EST