lkml.org 
[lkml]   [2003]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] tmpfs 5/6 use cond_resched
cond_resched each time around the loop in shmem_file_write
and do_shmem_file_read, matching filemap.c.

--- tmpfs4/mm/shmem.c Tue Apr 1 21:35:21 2003
+++ tmpfs5/mm/shmem.c Tue Apr 1 21:35:32 2003
@@ -1211,6 +1211,8 @@
buf += bytes;
if (pos > inode->i_size)
inode->i_size = pos;
+
+ cond_resched();
} while (count);

*ppos = pos;
@@ -1302,6 +1304,8 @@
page_cache_release(page);
if (ret != nr || !desc->count)
break;
+
+ cond_resched();
}

*ppos = ((loff_t) index << PAGE_CACHE_SHIFT) + offset;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.082 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site