This is the diff for the free_inode conditional schedule. The spin_unlock
thing probably couldn't harm since such code is all under the big kernel
lock too in 2.2.x.
--- 2.2.14/fs/inode.c Fri Jan 7 18:19:18 2000
+++ /tmp/inode.c Mon Feb 28 19:57:05 2000
@@ -347,7 +347,9 @@
{
struct list_head *entry;
int found = 0;
+ int resched = 0;
+ again:
entry = inode_in_use.next;
while (entry != &inode_in_use) {
struct list_head *tmp = entry;
@@ -361,6 +363,18 @@
list_add(tmp, freeable);
list_entry(tmp, struct inode, i_list)->i_state = I_FREEING;
found++;
+
+ if (current->need_resched && !resched) {
+ INODE(tmp)->i_count++;
+ spin_unlock(&inode_lock);
+
+ schedule();
+ iput(INODE(tmp));
+
+ spin_lock(&inode_lock);
+ resched = 1;
+ goto again;
+ }
}
return found;
Andrea
-
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 : Tue Feb 29 2000 - 21:00:20 EST