diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-18 11:27:54 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-18 11:27:54 -0400 |
| commit | b8ae30ee26d379db436b0b8c8c3ff1b52f69e5d1 (patch) | |
| tree | 506aa0b4bdbf90f61e7e9261c7db90aa1452dcce /include | |
| parent | 4d7b4ac22fbec1a03206c6cde353f2fd6942f828 (diff) | |
| parent | 9c6f7e43b4e02c161b53e97ba913855246876c61 (diff) | |
Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (49 commits)
stop_machine: Move local variable closer to the usage site in cpu_stop_cpu_callback()
sched, wait: Use wrapper functions
sched: Remove a stale comment
ondemand: Make the iowait-is-busy time a sysfs tunable
ondemand: Solve a big performance issue by counting IOWAIT time as busy
sched: Intoduce get_cpu_iowait_time_us()
sched: Eliminate the ts->idle_lastupdate field
sched: Fold updating of the last_update_time_info into update_ts_time_stats()
sched: Update the idle statistics in get_cpu_idle_time_us()
sched: Introduce a function to update the idle statistics
sched: Add a comment to get_cpu_idle_time_us()
cpu_stop: add dummy implementation for UP
sched: Remove rq argument to the tracepoints
rcu: need barrier() in UP synchronize_sched_expedited()
sched: correctly place paranioa memory barriers in synchronize_sched_expedited()
sched: kill paranoia check in synchronize_sched_expedited()
sched: replace migration_thread with cpu_stop
stop_machine: reimplement using cpu_stop
cpu_stop: implement stop_cpu[s]()
sched: Fix select_idle_sibling() logic in select_task_rq_fair()
...
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/cpuset.h | 16 | ||||
| -rw-r--r-- | include/linux/rcutiny.h | 2 | ||||
| -rw-r--r-- | include/linux/rcutree.h | 1 | ||||
| -rw-r--r-- | include/linux/sched.h | 70 | ||||
| -rw-r--r-- | include/linux/stop_machine.h | 122 | ||||
| -rw-r--r-- | include/linux/tick.h | 5 | ||||
| -rw-r--r-- | include/linux/wait.h | 35 | ||||
| -rw-r--r-- | include/trace/events/sched.h | 32 |
8 files changed, 166 insertions, 117 deletions
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index a5740fc4d04b..a73454aec333 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
| @@ -21,8 +21,7 @@ extern int number_of_cpusets; /* How many cpusets are defined in system? */ | |||
| 21 | extern int cpuset_init(void); | 21 | extern int cpuset_init(void); |
| 22 | extern void cpuset_init_smp(void); | 22 | extern void cpuset_init_smp(void); |
| 23 | extern void cpuset_cpus_allowed(struct task_struct *p, struct cpumask *mask); | 23 | extern void cpuset_cpus_allowed(struct task_struct *p, struct cpumask *mask); |
| 24 | extern void cpuset_cpus_allowed_locked(struct task_struct *p, | 24 | extern int cpuset_cpus_allowed_fallback(struct task_struct *p); |
| 25 | struct cpumask *mask); | ||
| 26 | extern nodemask_t cpuset_mems_allowed(struct task_struct *p); | 25 | extern nodemask_t cpuset_mems_allowed(struct task_struct *p); |
| 27 | #define cpuset_current_mems_allowed (current->mems_allowed) | 26 | #define cpuset_current_mems_allowed (current->mems_allowed) |
| 28 | void cpuset_init_current_mems_allowed(void); | 27 | void cpuset_init_current_mems_allowed(void); |
| @@ -69,9 +68,6 @@ struct seq_file; | |||
| 69 | extern void cpuset_task_status_allowed(struct seq_file *m, | 68 | extern void cpuset_task_status_allowed(struct seq_file *m, |
| 70 | struct task_struct *task); | 69 | struct task_struct *task); |
| 71 | 70 | ||
| 72 | extern void cpuset_lock(void); | ||
| 73 | extern void cpuset_unlock(void); | ||
| 74 | |||
| 75 | extern int cpuset_mem_spread_node(void); | 71 | extern int cpuset_mem_spread_node(void); |
| 76 | 72 | ||
| 77 | static inline int cpuset_do_page_mem_spread(void) | 73 | static inline int cpuset_do_page_mem_spread(void) |
| @@ -105,10 +101,11 @@ static inline void cpuset_cpus_allowed(struct task_struct *p, | |||
| 105 | { | 101 | { |
| 106 | cpumask_copy(mask, cpu_possible_mask); | 102 | cpumask_copy(mask, cpu_possible_mask); |
| 107 | } | 103 | } |
| 108 | static inline void cpuset_cpus_allowed_locked(struct task_struct *p, | 104 | |
| 109 | struct cpumask *mask) | 105 | static inline int cpuset_cpus_allowed_fallback(struct task_struct *p) |
| 110 | { | 106 | { |
| 111 | cpumask_copy(mask, cpu_possible_mask); | 107 | cpumask_copy(&p->cpus_allowed, cpu_possible_mask); |
| 108 | return cpumask_any(cpu_active_mask); | ||
| 112 | } | 109 | } |
| 113 | 110 | ||
| 114 | static inline nodemask_t cpuset_mems_allowed(struct task_struct *p) | 111 | static inline nodemask_t cpuset_mems_allowed(struct task_struct *p) |
| @@ -157,9 +154,6 @@ static inline void cpuset_task_status_allowed(struct seq_file *m, | |||
| 157 | { | 154 | { |
| 158 | } | 155 | } |
| 159 | 156 | ||
| 160 | static inline void cpuset_lock(void) {} | ||
| 161 | static inline void cpuset_unlock(void) {} | ||
| 162 | |||
| 163 | static inline int cpuset_mem_spread_node(void) | 157 | static inline int cpuset_mem_spread_node(void) |
| 164 | { | 158 | { |
| 165 | return 0; | 159 | return 0; |
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index 14e5a76b2c06..e2e893144a84 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h | |||
| @@ -64,8 +64,6 @@ static inline long rcu_batches_completed_bh(void) | |||
| 64 | return 0; | 64 | return 0; |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | extern int rcu_expedited_torture_stats(char *page); | ||
| 68 | |||
| 69 | static inline void rcu_force_quiescent_state(void) | 67 | static inline void rcu_force_quiescent_state(void) |
| 70 | { | 68 | { |
| 71 | } | 69 | } |
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index 48282055e83d..c0ed1c056f29 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
| @@ -36,7 +36,6 @@ extern void rcu_sched_qs(int cpu); | |||
| 36 | extern void rcu_bh_qs(int cpu); | 36 | extern void rcu_bh_qs(int cpu); |
| 37 | extern void rcu_note_context_switch(int cpu); | 37 | extern void rcu_note_context_switch(int cpu); |
| 38 | extern int rcu_needs_cpu(int cpu); | 38 | extern int rcu_needs_cpu(int cpu); |
| 39 | extern int rcu_expedited_torture_stats(char *page); | ||
| 40 | 39 | ||
| 41 | #ifdef CONFIG_TREE_PREEMPT_RCU | 40 | #ifdef CONFIG_TREE_PREEMPT_RCU |
| 42 | 41 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 28b71ee133f0..b55e988988b5 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -274,11 +274,17 @@ extern cpumask_var_t nohz_cpu_mask; | |||
| 274 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) | 274 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) |
| 275 | extern int select_nohz_load_balancer(int cpu); | 275 | extern int select_nohz_load_balancer(int cpu); |
| 276 | extern int get_nohz_load_balancer(void); | 276 | extern int get_nohz_load_balancer(void); |
| 277 | extern int nohz_ratelimit(int cpu); | ||
| 277 | #else | 278 | #else |
| 278 | static inline int select_nohz_load_balancer(int cpu) | 279 | static inline int select_nohz_load_balancer(int cpu) |
| 279 | { | 280 | { |
| 280 | return 0; | 281 | return 0; |
| 281 | } | 282 | } |
| 283 | |||
| 284 | static inline int nohz_ratelimit(int cpu) | ||
| 285 | { | ||
| 286 | return 0; | ||
| 287 | } | ||
| 282 | #endif | 288 | #endif |
| 283 | 289 | ||
| 284 | /* | 290 | /* |
| @@ -953,6 +959,7 @@ struct sched_domain { | |||
| 953 | char *name; | 959 | char *name; |
| 954 | #endif | 960 | #endif |
| 955 | 961 | ||
| 962 | unsigned int span_weight; | ||
| 956 | /* | 963 | /* |
| 957 | * Span of all CPUs in this domain. | 964 | * Span of all CPUs in this domain. |
| 958 | * | 965 | * |
| @@ -1025,12 +1032,17 @@ struct sched_domain; | |||
| 1025 | #define WF_SYNC 0x01 /* waker goes to sleep after wakup */ | 1032 | #define WF_SYNC 0x01 /* waker goes to sleep after wakup */ |
| 1026 | #define WF_FORK 0x02 /* child wakeup after fork */ | 1033 | #define WF_FORK 0x02 /* child wakeup after fork */ |
| 1027 | 1034 | ||
| 1035 | #define ENQUEUE_WAKEUP 1 | ||
| 1036 | #define ENQUEUE_WAKING 2 | ||
| 1037 | #define ENQUEUE_HEAD 4 | ||
| 1038 | |||
| 1039 | #define DEQUEUE_SLEEP 1 | ||
| 1040 | |||
| 1028 | struct sched_class { | 1041 | struct sched_class { |
| 1029 | const struct sched_class *next; | 1042 | const struct sched_class *next; |
| 1030 | 1043 | ||
| 1031 | void (*enqueue_task) (struct rq *rq, struct task_struct *p, int wakeup, | 1044 | void (*enqueue_task) (struct rq *rq, struct task_struct *p, int flags); |
| 1032 | bool head); | 1045 | void (*dequeue_task) (struct rq *rq, struct task_struct *p, int flags); |
| 1033 | void (*dequeue_task) (struct rq *rq, struct task_struct *p, int sleep); | ||
| 1034 | void (*yield_task) (struct rq *rq); | 1046 | void (*yield_task) (struct rq *rq); |
| 1035 | 1047 | ||
| 1036 | void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int flags); | 1048 | void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int flags); |
| @@ -1039,7 +1051,8 @@ struct sched_class { | |||
| 1039 | void (*put_prev_task) (struct rq *rq, struct task_struct *p); | 1051 | void (*put_prev_task) (struct rq *rq, struct task_struct *p); |
| 1040 | 1052 | ||
| 1041 | #ifdef CONFIG_SMP | 1053 | #ifdef CONFIG_SMP |
| 1042 | int (*select_task_rq)(struct task_struct *p, int sd_flag, int flags); | 1054 | int (*select_task_rq)(struct rq *rq, struct task_struct *p, |
| 1055 | int sd_flag, int flags); | ||
| 1043 | 1056 | ||
| 1044 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); | 1057 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); |
| 1045 | void (*post_schedule) (struct rq *this_rq); | 1058 | void (*post_schedule) (struct rq *this_rq); |
| @@ -1076,36 +1089,8 @@ struct load_weight { | |||
| 1076 | unsigned long weight, inv_weight; | 1089 | unsigned long weight, inv_weight; |
| 1077 | }; | 1090 | }; |
| 1078 | 1091 | ||
| 1079 | /* | ||
| 1080 | * CFS stats for a schedulable entity (task, task-group etc) | ||
| 1081 | * | ||
| 1082 | * Current field usage histogram: | ||
| 1083 | * | ||
| 1084 | * 4 se->block_start | ||
| 1085 | * 4 se->run_node | ||
| 1086 | * 4 se->sleep_start | ||
| 1087 | * 6 se->load.weight | ||
| 1088 | */ | ||
| 1089 | struct sched_entity { | ||
| 1090 | struct load_weight load; /* for load-balancing */ | ||
| 1091 | struct rb_node run_node; | ||
| 1092 | struct list_head group_node; | ||
| 1093 | unsigned int on_rq; | ||
| 1094 | |||
| 1095 | u64 exec_start; | ||
| 1096 | u64 sum_exec_runtime; | ||
| 1097 | u64 vruntime; | ||
| 1098 | u64 prev_sum_exec_runtime; | ||
| 1099 | |||
