[patch] sched, mm: fix scheduling latencies in get_user_pages()

From: Ingo Molnar
Date: Tue Sep 14 2004 - 06:00:42 EST



The attached patch fixes long scheduling latencies in get_user_pages().

has been tested as part of the -VP patchset.

Ingo

The attached patch fixes long scheduling latencies in get_user_pages().

has been tested as part of the -VP patchset.

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>

--- linux/mm/memory.c.orig
+++ linux/mm/memory.c
@@ -781,6 +781,8 @@ int get_user_pages(struct task_struct *t
do {
struct page *map;
int lookup_write = write;
+
+ cond_resched_lock(&mm->page_table_lock);
while (!(map = follow_page(mm, start, lookup_write))) {
/*
* Shortcut for anonymous pages. We don't want