aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2005-06-27 04:55:12 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-27 17:33:29 -0400
commit22e2c507c301c3dbbcf91b4948b88f78842ee6c9 (patch)
tree9a97c91d1362e69703aa286021daffb8a5456f4c /kernel
parent020f46a39eb7b99a575b9f4d105fce2b142acdf1 (diff)
[PATCH] Update cfq io scheduler to time sliced design
This updates the CFQ io scheduler to the new time sliced design (cfq v3). It provides full process fairness, while giving excellent aggregate system throughput even for many competing processes. It supports io priorities, either inherited from the cpu nice value or set directly with the ioprio_get/set syscalls. The latter closely mimic set/getpriority. This import is based on my latest from -mm. Signed-off-by: Jens Axboe <axboe@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/exit.c2
-rw-r--r--kernel/fork.c5
-rw-r--r--kernel/sched.c8
3 files changed, 7 insertions, 8 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 3ebcd60a19c6..9d1b10ed0135 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -784,6 +784,8 @@ fastcall NORET_TYPE void do_exit(long code)
784 784
785 profile_task_exit(tsk); 785 profile_task_exit(tsk);
786 786
787 WARN_ON(atomic_read(&tsk->fs_excl));
788
787 if (unlikely(in_interrupt())) 789 if (unlikely(in_interrupt()))
788 panic("Aiee, killing interrupt handler!"); 790 panic("Aiee, killing interrupt handler!");
789 if (unlikely(!tsk->pid)) 791 if (unlikely(!tsk->pid))
diff --git a/kernel/fork.c b/kernel/fork.c
index 2c7806873bfd..cdef6cea8900 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1090,6 +1090,11 @@ static task_t *copy_process(unsigned long clone_flags,
1090 spin_unlock(&current->sighand->siglock); 1090 spin_unlock(&current->sighand->siglock);
1091 } 1091 }
1092 1092
1093 /*
1094 * inherit ioprio
1095 */
1096 p->ioprio = current->ioprio;
1097
1093 SET_LINKS(p); 1098 SET_LINKS(p);
1094 if (unlikely(p->ptrace & PT_PTRACED)) 1099 if (unlikely(p->ptrace & PT_PTRACED))
1095 __ptrace_link(p, current->parent); 1100 __ptrace_link(p, current->parent);
diff --git a/kernel/sched.c b/kernel/sched.c
index a07cff90d849..e2b0d3e4dd06 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -3448,15 +3448,7 @@ int task_nice(const task_t *p)
3448{ 3448{
3449 return TASK_NICE(p); 3449 return TASK_NICE(p);
3450} 3450}
3451
3452/*
3453 * The only users of task_nice are binfmt_elf and binfmt_elf32.
3454 * binfmt_elf is no longer modular, but binfmt_elf32 still is.
3455 * Therefore, task_nice is needed if there is a compat_mode.
3456 */
3457#ifdef CONFIG_COMPAT
3458EXPORT_SYMBOL_GPL(task_nice); 3451EXPORT_SYMBOL_GPL(task_nice);
3459#endif
3460 3452
3461/** 3453/**
3462 * idle_cpu - is a given cpu idle currently? 3454 * idle_cpu - is a given cpu idle currently?