diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2007-10-17 02:25:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 11:42:45 -0400 |
commit | 3e26c149c358529b1605f8959341d34bc4b880a3 (patch) | |
tree | 9d173b1753b86bcf03a8591e2509e3162234447c /include | |
parent | 04fbfdc14e5f48463820d6b9807daa5e9c92c51f (diff) |
mm: dirty balancing for tasks
Based on ideas of Andrew:
http://marc.info/?l=linux-kernel&m=102912915020543&w=2
Scale the bdi dirty limit inversly with the tasks dirty rate.
This makes heavy writers have a lower dirty limit than the occasional writer.
Andrea proposed something similar:
http://lwn.net/Articles/152277/
The main disadvantage to his patch is that he uses an unrelated quantity to
measure time, which leaves him with a workload dependant tunable. Other than
that the two approaches appear quite similar.
[akpm@linux-foundation.org: fix warning]
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/init_task.h | 1 | ||||
-rw-r--r-- | include/linux/sched.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 513bc3e489f0..3a619f57a2b2 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -171,6 +171,7 @@ extern struct group_info init_groups; | |||
171 | [PIDTYPE_PGID] = INIT_PID_LINK(PIDTYPE_PGID), \ | 171 | [PIDTYPE_PGID] = INIT_PID_LINK(PIDTYPE_PGID), \ |
172 | [PIDTYPE_SID] = INIT_PID_LINK(PIDTYPE_SID), \ | 172 | [PIDTYPE_SID] = INIT_PID_LINK(PIDTYPE_SID), \ |
173 | }, \ | 173 | }, \ |
174 | .dirties = INIT_PROP_LOCAL_SINGLE(dirties), \ | ||
174 | INIT_TRACE_IRQFLAGS \ | 175 | INIT_TRACE_IRQFLAGS \ |
175 | INIT_LOCKDEP \ | 176 | INIT_LOCKDEP \ |
176 | } | 177 | } |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 592e3a55f818..59738efff8ad 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -74,6 +74,7 @@ struct sched_param { | |||
74 | #include <linux/pid.h> | 74 | #include <linux/pid.h> |
75 | #include <linux/percpu.h> | 75 | #include <linux/percpu.h> |
76 | #include <linux/topology.h> | 76 | #include <linux/topology.h> |
77 | #include <linux/proportions.h> | ||
77 | #include <linux/seccomp.h> | 78 | #include <linux/seccomp.h> |
78 | #include <linux/rcupdate.h> | 79 | #include <linux/rcupdate.h> |
79 | #include <linux/futex.h> | 80 | #include <linux/futex.h> |
@@ -1149,6 +1150,7 @@ struct task_struct { | |||
1149 | #ifdef CONFIG_FAULT_INJECTION | 1150 | #ifdef CONFIG_FAULT_INJECTION |
1150 | int make_it_fail; | 1151 | int make_it_fail; |
1151 | #endif | 1152 | #endif |
1153 | struct prop_local_single dirties; | ||
1152 | }; | 1154 | }; |
1153 | 1155 | ||
1154 | /* | 1156 | /* |