aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2005-01-07 21:53:24 -0800
committerLinus Torvalds <torvalds@evo.osdl.org>2005-01-07 21:53:24 -0800
commit2b5726db9f5d0583eaad993c5a0b99355bf05a20 (patch)
tree718af726aa66b66506d3801c8ad1ec436a029a83 /fs
parenta0332406058f2ffc44c15c60d5650708914465a2 (diff)
downloadhistory-2b5726db9f5d0583eaad993c5a0b99355bf05a20.tar.gz
[PATCH] sched: fix scheduling latencies for !PREEMPT kernels
This patch adds a handful of cond_resched() points to a number of key, scheduling-latency related non-inlined functions. This reduces preemption latency for !PREEMPT kernels. These are scheduling points complementary to PREEMPT_VOLUNTARY scheduling points (might_sleep() places) - i.e. these are all points where an explicit cond_resched() had to be added. Has been tested as part of the -VP patchset. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/exec.c1
-rw-r--r--fs/fs-writeback.c1
-rw-r--r--fs/select.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 0bf4d2af69df8f..c401dc74226ea2 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -186,6 +186,7 @@ static int count(char __user * __user * argv, int max)
argv++;
if(++i > max)
return -E2BIG;
+ cond_resched();
}
}
return i;
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 969e9b0e0afc14..26f234a0da93d1 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -378,6 +378,7 @@ sync_sb_inodes(struct super_block *sb, struct writeback_control *wbc)
list_move(&inode->i_list, &sb->s_dirty);
}
spin_unlock(&inode_lock);
+ cond_resched();
iput(inode);
spin_lock(&inode_lock);
if (wbc->nr_to_write <= 0)
diff --git a/fs/select.c b/fs/select.c
index 57e776cafb3b37..1de9b6ac7d352f 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -240,6 +240,7 @@ int do_select(int n, fd_set_bits *fds, long *timeout)
retval++;
}
}
+ cond_resched();
}
if (res_in)
*rinp = res_in;