diff options
author | Ingo Molnar <mingo@elte.hu> | 2005-01-07 21:53:24 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-01-07 21:53:24 -0800 |
commit | 2b5726db9f5d0583eaad993c5a0b99355bf05a20 (patch) | |
tree | 718af726aa66b66506d3801c8ad1ec436a029a83 /kernel | |
parent | a0332406058f2ffc44c15c60d5650708914465a2 (diff) | |
download | history-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 'kernel')
-rw-r--r-- | kernel/printk.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/printk.c b/kernel/printk.c index 4e9fd492f30ec5..d59c715677cb34 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -284,6 +284,7 @@ int do_syslog(int type, char __user * buf, int len) error = __put_user(c,buf); buf++; i++; + cond_resched(); spin_lock_irq(&logbuf_lock); } spin_unlock_irq(&logbuf_lock); @@ -325,6 +326,7 @@ int do_syslog(int type, char __user * buf, int len) c = LOG_BUF(j); spin_unlock_irq(&logbuf_lock); error = __put_user(c,&buf[count-1-i]); + cond_resched(); spin_lock_irq(&logbuf_lock); } spin_unlock_irq(&logbuf_lock); @@ -340,6 +342,7 @@ int do_syslog(int type, char __user * buf, int len) error = -EFAULT; break; } + cond_resched(); } } break; |