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

Ingo Molnar
2004-09-14T10:57:53Z

[-- Attachment #1: Type: text/plain, Size: 126 bytes --]

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

has been tested as part of the -VP patchset.

Ingo

[-- Attachment #2: fix-latency-get_user_pages.patch --]
[-- Type: text/plain, Size: 503 bytes --]

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@elte.hu>

--- 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