diff options
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index a1707583de49..3d95c480f58d 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -194,6 +194,14 @@ extern void sched_init_smp(void); | |||
194 | extern void init_idle(struct task_struct *idle, int cpu); | 194 | extern void init_idle(struct task_struct *idle, int cpu); |
195 | 195 | ||
196 | extern cpumask_t nohz_cpu_mask; | 196 | extern cpumask_t nohz_cpu_mask; |
197 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) | ||
198 | extern int select_nohz_load_balancer(int cpu); | ||
199 | #else | ||
200 | static inline int select_nohz_load_balancer(int cpu) | ||
201 | { | ||
202 | return 0; | ||
203 | } | ||
204 | #endif | ||
197 | 205 | ||
198 | /* | 206 | /* |
199 | * Only dump TASK_* tasks. (0 for all tasks) | 207 | * Only dump TASK_* tasks. (0 for all tasks) |
@@ -226,6 +234,7 @@ extern void scheduler_tick(void); | |||
226 | extern void softlockup_tick(void); | 234 | extern void softlockup_tick(void); |
227 | extern void spawn_softlockup_task(void); | 235 | extern void spawn_softlockup_task(void); |
228 | extern void touch_softlockup_watchdog(void); | 236 | extern void touch_softlockup_watchdog(void); |
237 | extern void touch_all_softlockup_watchdogs(void); | ||
229 | #else | 238 | #else |
230 | static inline void softlockup_tick(void) | 239 | static inline void softlockup_tick(void) |
231 | { | 240 | { |
@@ -236,6 +245,9 @@ static inline void spawn_softlockup_task(void) | |||
236 | static inline void touch_softlockup_watchdog(void) | 245 | static inline void touch_softlockup_watchdog(void) |
237 | { | 246 | { |
238 | } | 247 | } |
248 | static inline void touch_all_softlockup_watchdogs(void) | ||
249 | { | ||
250 | } | ||
239 | #endif | 251 | #endif |
240 | 252 | ||
241 | 253 | ||
@@ -668,8 +680,14 @@ struct sched_group { | |||
668 | /* | 680 | /* |
669 | * CPU power of this group, SCHED_LOAD_SCALE being max power for a | 681 | * CPU power of this group, SCHED_LOAD_SCALE being max power for a |
670 | * single CPU. This is read only (except for setup, hotplug CPU). | 682 | * single CPU. This is read only (except for setup, hotplug CPU). |
683 | * Note : Never change cpu_power without recompute its reciprocal | ||
684 | */ | ||
685 | unsigned int __cpu_power; | ||
686 | /* | ||
687 | * reciprocal value of cpu_power to avoid expensive divides | ||
688 | * (see include/linux/reciprocal_div.h) | ||
671 | */ | 689 | */ |
672 | unsigned long cpu_power; | 690 | u32 reciprocal_cpu_power; |
673 | }; | 691 | }; |
674 | 692 | ||
675 | struct sched_domain { | 693 | struct sched_domain { |
@@ -801,8 +819,8 @@ struct task_struct { | |||
801 | volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ | 819 | volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ |
802 | struct thread_info *thread_info; | 820 | struct thread_info *thread_info; |
803 | atomic_t usage; | 821 | atomic_t usage; |
804 | unsigned long flags; /* per process flags, defined below */ | 822 | unsigned int flags; /* per process flags, defined below */ |
805 | unsigned long ptrace; | 823 | unsigned int ptrace; |
806 | 824 | ||
807 | int lock_depth; /* BKL lock depth */ | 825 | int lock_depth; /* BKL lock depth */ |
808 | 826 | ||
@@ -825,7 +843,7 @@ struct task_struct { | |||
825 | unsigned long long sched_time; /* sched_clock time spent running */ | 843 | unsigned long long sched_time; /* sched_clock time spent running */ |
826 | enum sleep_type sleep_type; | 844 | enum sleep_type sleep_type; |
827 | 845 | ||
828 | unsigned long policy; | 846 | unsigned int policy; |
829 | cpumask_t cpus_allowed; | 847 | cpumask_t cpus_allowed; |
830 | unsigned int time_slice, first_time_slice; | 848 | unsigned int time_slice, first_time_slice; |
831 | 849 | ||
@@ -845,11 +863,11 @@ struct task_struct { | |||
845 | 863 | ||
846 | /* task state */ | 864 | /* task state */ |
847 | struct linux_binfmt *binfmt; | 865 | struct linux_binfmt *binfmt; |
848 | long exit_state; | 866 | int exit_state; |
849 | int exit_code, exit_signal; | 867 | int exit_code, exit_signal; |
850 | int pdeath_signal; /* The signal sent when the parent dies */ | 868 | int pdeath_signal; /* The signal sent when the parent dies */ |
851 | /* ??? */ | 869 | /* ??? */ |
852 | unsigned long personality; | 870 | unsigned int personality; |
853 | unsigned did_exec:1; | 871 | unsigned did_exec:1; |
854 | pid_t pid; | 872 | pid_t pid; |
855 | pid_t tgid; | 873 | pid_t tgid; |
@@ -881,7 +899,7 @@ struct task_struct { | |||
881 | int __user *set_child_tid; /* CLONE_CHILD_SETTID */ | 899 | int __user *set_child_tid; /* CLONE_CHILD_SETTID */ |
882 | int __user *clear_child_tid; /* CLONE_CHILD_CLEARTID */ | 900 | int __user *clear_child_tid; /* CLONE_CHILD_CLEARTID */ |
883 | 901 | ||
884 | unsigned long rt_priority; | 902 | unsigned int rt_priority; |
885 | cputime_t utime, stime; | 903 | cputime_t utime, stime; |
886 | unsigned long nvcsw, nivcsw; /* context switch counts */ | 904 | unsigned long nvcsw, nivcsw; /* context switch counts */ |
887 | struct timespec start_time; | 905 | struct timespec start_time; |
@@ -1641,10 +1659,7 @@ static inline void arch_pick_mmap_layout(struct mm_struct *mm) | |||
1641 | extern long sched_setaffinity(pid_t pid, cpumask_t new_mask); | 1659 | extern long sched_setaffinity(pid_t pid, cpumask_t new_mask); |
1642 | extern long sched_getaffinity(pid_t pid, cpumask_t *mask); | 1660 | extern long sched_getaffinity(pid_t pid, cpumask_t *mask); |
1643 | 1661 | ||
1644 | #include <linux/sysdev.h> | ||
1645 | extern int sched_mc_power_savings, sched_smt_power_savings; | 1662 | extern int sched_mc_power_savings, sched_smt_power_savings; |
1646 | extern struct sysdev_attribute attr_sched_mc_power_savings, attr_sched_smt_power_savings; | ||
1647 | extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls); | ||
1648 | 1663 | ||
1649 | extern void normalize_rt_tasks(void); | 1664 | extern void normalize_rt_tasks(void); |
1650 | 1665 | ||