diff options
author | David S. Miller <davem@davemloft.net> | 2010-05-19 02:01:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-19 02:01:55 -0400 |
commit | 2ec8c6bb5d8f3a62a79f463525054bae1e3d4487 (patch) | |
tree | fa7f8400ac685fb52e96f64997c7c682fc2aa021 /include/linux/sched.h | |
parent | 7b39f90fabcf9e2af0cd79d0a60440d821e22b56 (diff) | |
parent | 537b60d17894b7c19a6060feae40299d7109d6e7 (diff) |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts:
include/linux/mod_devicetable.h
scripts/mod/file2alias.c
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 79 |
1 files changed, 37 insertions, 42 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 2b7b81df78b3..b55e988988b5 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -99,7 +99,6 @@ struct futex_pi_state; | |||
99 | struct robust_list_head; | 99 | struct robust_list_head; |
100 | struct bio_list; | 100 | struct bio_list; |
101 | struct fs_struct; | 101 | struct fs_struct; |
102 | struct bts_context; | ||
103 | struct perf_event_context; | 102 | struct perf_event_context; |
104 | 103 | ||
105 | /* | 104 | /* |
@@ -275,11 +274,17 @@ extern cpumask_var_t nohz_cpu_mask; | |||
275 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) | 274 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) |
276 | extern int select_nohz_load_balancer(int cpu); | 275 | extern int select_nohz_load_balancer(int cpu); |
277 | extern int get_nohz_load_balancer(void); | 276 | extern int get_nohz_load_balancer(void); |
277 | extern int nohz_ratelimit(int cpu); | ||
278 | #else | 278 | #else |
279 | static inline int select_nohz_load_balancer(int cpu) | 279 | static inline int select_nohz_load_balancer(int cpu) |
280 | { | 280 | { |
281 | return 0; | 281 | return 0; |
282 | } | 282 | } |
283 | |||
284 | static inline int nohz_ratelimit(int cpu) | ||
285 | { | ||
286 | return 0; | ||
287 | } | ||
283 | #endif | 288 | #endif |
284 | 289 | ||
285 | /* | 290 | /* |
@@ -954,6 +959,7 @@ struct sched_domain { | |||
954 | char *name; | 959 | char *name; |
955 | #endif | 960 | #endif |
956 | 961 | ||
962 | unsigned int span_weight; | ||
957 | /* | 963 | /* |
958 | * Span of all CPUs in this domain. | 964 | * Span of all CPUs in this domain. |
959 | * | 965 | * |
@@ -1026,12 +1032,17 @@ struct sched_domain; | |||
1026 | #define WF_SYNC 0x01 /* waker goes to sleep after wakup */ | 1032 | #define WF_SYNC 0x01 /* waker goes to sleep after wakup */ |
1027 | #define WF_FORK 0x02 /* child wakeup after fork */ | 1033 | #define WF_FORK 0x02 /* child wakeup after fork */ |
1028 | 1034 | ||
1035 | #define ENQUEUE_WAKEUP 1 | ||
1036 | #define ENQUEUE_WAKING 2 | ||
1037 | #define ENQUEUE_HEAD 4 | ||
1038 | |||
1039 | #define DEQUEUE_SLEEP 1 | ||
1040 | |||
1029 | struct sched_class { | 1041 | struct sched_class { |
1030 | const struct sched_class *next; | 1042 | const struct sched_class *next; |
1031 | 1043 | ||
1032 | 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); |
1033 | bool head); | 1045 | void (*dequeue_task) (struct rq *rq, struct task_struct *p, int flags); |
1034 | void (*dequeue_task) (struct rq *rq, struct task_struct *p, int sleep); | ||
1035 | void (*yield_task) (struct rq *rq); | 1046 | void (*yield_task) (struct rq *rq); |
1036 | 1047 | ||
1037 | 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); |
@@ -1040,7 +1051,8 @@ struct sched_class { | |||
1040 | void (*put_prev_task) (struct rq *rq, struct task_struct *p); | 1051 | void (*put_prev_task) (struct rq *rq, struct task_struct *p); |
1041 | 1052 | ||
1042 | #ifdef CONFIG_SMP | 1053 | #ifdef CONFIG_SMP |
1043 | 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); | ||
1044 | 1056 | ||
1045 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); | 1057 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); |
1046 | void (*post_schedule) (struct rq *this_rq); | 1058 | void (*post_schedule) (struct rq *this_rq); |
@@ -1077,36 +1089,8 @@ struct load_weight { | |||
1077 | unsigned long weight, inv_weight; | 1089 | unsigned long weight, inv_weight; |
1078 | }; | 1090 | }; |
1079 | 1091 | ||
1080 | /* | ||
1081 | * CFS stats for a schedulable entity (task, task-group etc) | ||
1082 | * | ||
1083 | * Current field usage histogram: | ||
1084 | * | ||
1085 | * 4 se->block_start | ||
1086 | * 4 se->run_node | ||
1087 | * 4 se->sleep_start | ||
1088 | * 6 se->load.weight | ||
1089 | */ | ||
1090 | struct sched_entity { | ||
1091 | struct load_weight load; /* for load-balancing */ | ||
1092 | struct rb_node run_node; | ||
1093 | struct list_head group_node; | ||
1094 | unsigned int on_rq; | ||
1095 | |||
1096 | u64 exec_start; | ||
1097 | u64 sum_exec_runtime; | ||
1098 | u64 vruntime; | ||
1099 | u64 prev_sum_exec_runtime; | ||
1100 | |||
1101 | u64 last_wakeup; | ||
1102 | u64 avg_overlap; | ||
1103 | |||
1104 | u64 nr_migrations; | ||
1105 | |||
1106 | u64 start_runtime; | ||
1107 | u64 avg_wakeup; | ||
1108 | |||
1109 | #ifdef CONFIG_SCHEDSTATS | 1092 | #ifdef CONFIG_SCHEDSTATS |
1093 | struct sched_statistics { | ||
1110 | u64 wait_start; | 1094 | u64 wait_start; |
1111 | u64 wait_max; | 1095 | u64 wait_max; |
1112 | u64 wait_count; | 1096 | u64 wait_count; |
@@ -1138,6 +1122,24 @@ struct sched_entity { | |||
1138 | u64 nr_wakeups_affine_attempts; | 1122 | u64 nr_wakeups_affine_attempts; |
1139 | u64 nr_wakeups_passive; | 1123 | u64 nr_wakeups_passive; |
1140 | u64 nr_wakeups_idle; | 1124 | u64 nr_wakeups_idle; |
1125 | }; | ||
1126 | #endif | ||
1127 | |||
1128 | struct sched_entity { | ||
1129 | struct load_weight load; /* for load-balancing */ | ||
1130 | struct rb_node run_node; | ||
1131 | struct list_head group_node; | ||
1132 | unsigned int on_rq; | ||
1133 | |||
1134 | u64 exec_start; | ||
1135 | u64 sum_exec_runtime; | ||
1136 | u64 vruntime; | ||
1137 | u64 prev_sum_exec_runtime; | ||
1138 | |||
1139 | u64 nr_migrations; | ||
1140 | |||
1141 | #ifdef CONFIG_SCHEDSTATS | ||
1142 | struct sched_statistics statistics; | ||
1141 | #endif | 1143 | #endif |
1142 | 1144 | ||
1143 | #ifdef CONFIG_FAIR_GROUP_SCHED | 1145 | #ifdef CONFIG_FAIR_GROUP_SCHED |
@@ -1272,12 +1274,6 @@ struct task_struct { | |||
1272 | struct list_head ptraced; | 1274 | struct list_head ptraced; |
1273 | struct list_head ptrace_entry; | 1275 | struct list_head ptrace_entry; |
1274 | 1276 | ||
1275 | /* | ||
1276 | * This is the tracer handle for the ptrace BTS extension. | ||
1277 | * This field actually belongs to the ptracer task. | ||
1278 | */ | ||
1279 | struct bts_context *bts; | ||
1280 | |||
1281 | /* PID/PID hash table linkage. */ | 1277 | /* PID/PID hash table linkage. */ |
1282 | struct pid_link pids[PIDTYPE_MAX]; | 1278 | struct pid_link pids[PIDTYPE_MAX]; |
1283 | struct list_head thread_group; | 1279 | struct list_head thread_group; |
@@ -1846,6 +1842,7 @@ extern void sched_clock_idle_sleep_event(void); | |||
1846 | extern void sched_clock_idle_wakeup_event(u64 delta_ns); | 1842 | extern void sched_clock_idle_wakeup_event(u64 delta_ns); |
1847 | 1843 | ||
1848 | #ifdef CONFIG_HOTPLUG_CPU | 1844 | #ifdef CONFIG_HOTPLUG_CPU |
1845 | extern void move_task_off_dead_cpu(int dead_cpu, struct task_struct *p); | ||
1849 | extern void idle_task_exit(void); | 1846 | extern void idle_task_exit(void); |
1850 | #else | 1847 | #else |
1851 | static inline void idle_task_exit(void) {} | 1848 | static inline void idle_task_exit(void) {} |
@@ -2122,10 +2119,8 @@ extern void set_task_comm(struct task_struct *tsk, char *from); | |||
2122 | extern char *get_task_comm(char *to, struct task_struct *tsk); | 2119 | extern char *get_task_comm(char *to, struct task_struct *tsk); |
2123 | 2120 | ||
2124 | #ifdef CONFIG_SMP | 2121 | #ifdef CONFIG_SMP |
2125 | extern void wait_task_context_switch(struct task_struct *p); | ||
2126 | extern unsigned long wait_task_inactive(struct task_struct *, long match_state); | 2122 | extern unsigned long wait_task_inactive(struct task_struct *, long match_state); |
2127 | #else | 2123 | #else |
2128 | static inline void wait_task_context_switch(struct task_struct *p) {} | ||
2129 | static inline unsigned long wait_task_inactive(struct task_struct *p, | 2124 | static inline unsigned long wait_task_inactive(struct task_struct *p, |
2130 | long match_state) | 2125 | long match_state) |
2131 | { | 2126 | { |