aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2011-01-12 18:06:06 -0500
committerLen Brown <len.brown@intel.com>2011-01-12 18:06:06 -0500
commit56dbed129df3fdd4caf9018b6e7599ee258a5420 (patch)
treeb902491aef3a99efe0d9d49edd0f6e414dba654f /include/linux/sched.h
parent2a2d31c8dc6f1ebcf5eab1d93a0cb0fb4ed57c7c (diff)
parentf878133bf022717b880d0e0995b8f91436fd605c (diff)
Merge branch 'linus' into idle-test
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h55
1 files changed, 43 insertions, 12 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 223874538b33..abc527aa8550 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -70,7 +70,6 @@ struct sched_param {
70#include <linux/smp.h> 70#include <linux/smp.h>
71#include <linux/sem.h> 71#include <linux/sem.h>
72#include <linux/signal.h> 72#include <linux/signal.h>
73#include <linux/path.h>
74#include <linux/compiler.h> 73#include <linux/compiler.h>
75#include <linux/completion.h> 74#include <linux/completion.h>
76#include <linux/pid.h> 75#include <linux/pid.h>
@@ -88,7 +87,6 @@ struct sched_param {
88#include <linux/timer.h> 87#include <linux/timer.h>
89#include <linux/hrtimer.h> 88#include <linux/hrtimer.h>
90#include <linux/task_io_accounting.h> 89#include <linux/task_io_accounting.h>
91#include <linux/kobject.h>
92#include <linux/latencytop.h> 90#include <linux/latencytop.h>
93#include <linux/cred.h> 91#include <linux/cred.h>
94 92
@@ -316,6 +314,7 @@ extern int proc_dowatchdog_thresh(struct ctl_table *table, int write,
316 size_t *lenp, loff_t *ppos); 314 size_t *lenp, loff_t *ppos);
317extern unsigned int softlockup_panic; 315extern unsigned int softlockup_panic;
318extern int softlockup_thresh; 316extern int softlockup_thresh;
317void lockup_detector_init(void);
319#else 318#else
320static inline void touch_softlockup_watchdog(void) 319static inline void touch_softlockup_watchdog(void)
321{ 320{
@@ -326,6 +325,9 @@ static inline void touch_softlockup_watchdog_sync(void)
326static inline void touch_all_softlockup_watchdogs(void) 325static inline void touch_all_softlockup_watchdogs(void)
327{ 326{
328} 327}
328static inline void lockup_detector_init(void)
329{
330}
329#endif 331#endif
330 332
331#ifdef CONFIG_DETECT_HUNG_TASK 333#ifdef CONFIG_DETECT_HUNG_TASK
@@ -509,6 +511,8 @@ struct thread_group_cputimer {
509 spinlock_t lock; 511 spinlock_t lock;
510}; 512};
511 513
514struct autogroup;
515
512/* 516/*
513 * NOTE! "signal_struct" does not have it's own 517 * NOTE! "signal_struct" does not have it's own
514 * locking, because a shared signal_struct always 518 * locking, because a shared signal_struct always
@@ -576,6 +580,9 @@ struct signal_struct {
576 580
577 struct tty_struct *tty; /* NULL if no tty */ 581 struct tty_struct *tty; /* NULL if no tty */
578 582
583#ifdef CONFIG_SCHED_AUTOGROUP
584 struct autogroup *autogroup;
585#endif
579 /* 586 /*
580 * Cumulative resource counters for dead threads in the group, 587 * Cumulative resource counters for dead threads in the group,
581 * and for reaped dead child processes forked by this group. 588 * and for reaped dead child processes forked by this group.
@@ -1229,13 +1236,18 @@ struct task_struct {
1229#ifdef CONFIG_TREE_PREEMPT_RCU 1236#ifdef CONFIG_TREE_PREEMPT_RCU
1230 struct rcu_node *rcu_blocked_node; 1237 struct rcu_node *rcu_blocked_node;
1231#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ 1238#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
1239#ifdef CONFIG_RCU_BOOST
1240 struct rt_mutex *rcu_boost_mutex;
1241#endif /* #ifdef CONFIG_RCU_BOOST */
1232 1242
1233#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) 1243#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT)
1234 struct sched_info sched_info; 1244 struct sched_info sched_info;
1235#endif 1245#endif
1236 1246
1237 struct list_head tasks; 1247 struct list_head tasks;
1248#ifdef CONFIG_SMP
1238 struct plist_node pushable_tasks; 1249 struct plist_node pushable_tasks;
1250#endif
1239 1251
1240 struct mm_struct *mm, *active_mm; 1252 struct mm_struct *mm, *active_mm;
1241#if defined(SPLIT_RSS_COUNTING) 1253#if defined(SPLIT_RSS_COUNTING)
@@ -1759,7 +1771,8 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *
1759#ifdef CONFIG_PREEMPT_RCU 1771#ifdef CONFIG_PREEMPT_RCU
1760 1772
1761#define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */ 1773#define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */
1762#define RCU_READ_UNLOCK_NEED_QS (1 << 1) /* RCU core needs CPU response. */ 1774#define RCU_READ_UNLOCK_BOOSTED (1 << 1) /* boosted while in RCU read-side. */
1775#define RCU_READ_UNLOCK_NEED_QS (1 << 2) /* RCU core needs CPU response. */
1763 1776
1764static inline void rcu_copy_process(struct task_struct *p) 1777static inline void rcu_copy_process(struct task_struct *p)
1765{ 1778{
@@ -1767,7 +1780,10 @@ static inline void rcu_copy_process(struct task_struct *p)
1767 p->rcu_read_unlock_special = 0; 1780 p->rcu_read_unlock_special = 0;
1768#ifdef CONFIG_TREE_PREEMPT_RCU 1781#ifdef CONFIG_TREE_PREEMPT_RCU
1769 p->rcu_blocked_node = NULL; 1782 p->rcu_blocked_node = NULL;
1770#endif 1783#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
1784#ifdef CONFIG_RCU_BOOST
1785 p->rcu_boost_mutex = NULL;
1786#endif /* #ifdef CONFIG_RCU_BOOST */
1771 INIT_LIST_HEAD(&p->rcu_node_entry); 1787 INIT_LIST_HEAD(&p->rcu_node_entry);
1772} 1788}
1773 1789
@@ -1872,14 +1888,11 @@ extern void sched_clock_idle_sleep_event(void);
1872extern void sched_clock_idle_wakeup_event(u64 delta_ns); 1888extern void sched_clock_idle_wakeup_event(u64 delta_ns);
1873 1889
1874#ifdef CONFIG_HOTPLUG_CPU 1890#ifdef CONFIG_HOTPLUG_CPU
1875extern void move_task_off_dead_cpu(int dead_cpu, struct task_struct *p);
1876extern void idle_task_exit(void); 1891extern void idle_task_exit(void);
1877#else 1892#else
1878static inline void idle_task_exit(void) {} 1893static inline void idle_task_exit(void) {}
1879#endif 1894#endif
1880 1895
1881extern void sched_idle_next(void);
1882
1883#if defined(CONFIG_NO_HZ) && defined(CONFIG_SMP) 1896#if defined(CONFIG_NO_HZ) && defined(CONFIG_SMP)
1884extern void wake_up_idle_cpu(int cpu); 1897extern void wake_up_idle_cpu(int cpu);
1885#else 1898#else
@@ -1889,8 +1902,6 @@ static inline void wake_up_idle_cpu(int cpu) { }
1889extern unsigned int sysctl_sched_latency; 1902extern unsigned int sysctl_sched_latency;
1890extern unsigned int sysctl_sched_min_granularity; 1903extern unsigned int sysctl_sched_min_granularity;
1891extern unsigned int sysctl_sched_wakeup_granularity; 1904extern unsigned int sysctl_sched_wakeup_granularity;
1892extern unsigned int sysctl_sched_shares_ratelimit;
1893extern unsigned int sysctl_sched_shares_thresh;
1894extern unsigned int sysctl_sched_child_runs_first; 1905extern unsigned int sysctl_sched_child_runs_first;
1895 1906
1896enum sched_tunable_scaling { 1907enum sched_tunable_scaling {
@@ -1906,6 +1917,7 @@ extern unsigned int sysctl_sched_migration_cost;
1906extern unsigned int sysctl_sched_nr_migrate; 1917extern unsigned int sysctl_sched_nr_migrate;
1907extern unsigned int sysctl_sched_time_avg; 1918extern unsigned int sysctl_sched_time_avg;
1908extern unsigned int sysctl_timer_migration; 1919extern unsigned int sysctl_timer_migration;
1920extern unsigned int sysctl_sched_shares_window;
1909 1921
1910int sched_proc_update_handler(struct ctl_table *table, int write, 1922int sched_proc_update_handler(struct ctl_table *table, int write,
1911 void __user *buffer, size_t *length, 1923 void __user *buffer, size_t *length,
@@ -1931,6 +1943,24 @@ int sched_rt_handler(struct ctl_table *table, int write,
1931 1943
1932extern unsigned int sysctl_sched_compat_yield; 1944extern unsigned int sysctl_sched_compat_yield;
1933 1945
1946#ifdef CONFIG_SCHED_AUTOGROUP
1947extern unsigned int sysctl_sched_autogroup_enabled;
1948
1949extern void sched_autogroup_create_attach(struct task_struct *p);
1950extern void sched_autogroup_detach(struct task_struct *p);
1951extern void sched_autogroup_fork(struct signal_struct *sig);
1952extern void sched_autogroup_exit(struct signal_struct *sig);
1953#ifdef CONFIG_PROC_FS
1954extern void proc_sched_autogroup_show_task(struct task_struct *p, struct seq_file *m);
1955extern int proc_sched_autogroup_set_nice(struct task_struct *p, int *nice);
1956#endif
1957#else
1958static inline void sched_autogroup_create_attach(struct task_struct *p) { }
1959static inline void sched_autogroup_detach(struct task_struct *p) { }
1960static inline void sched_autogroup_fork(struct signal_struct *sig) { }
1961static inline void sched_autogroup_exit(struct signal_struct *sig) { }
1962#endif
1963
1934#ifdef CONFIG_RT_MUTEXES 1964#ifdef CONFIG_RT_MUTEXES
1935extern int rt_mutex_getprio(struct task_struct *p); 1965extern int rt_mutex_getprio(struct task_struct *p);
1936extern void rt_mutex_setprio(struct task_struct *p, int prio); 1966extern void rt_mutex_setprio(struct task_struct *p, int prio);
@@ -1949,9 +1979,10 @@ extern int task_nice(const struct task_struct *p);
1949extern int can_nice(const struct task_struct *p, const int nice); 1979extern int can_nice(const struct task_struct *p, const int nice);
1950extern int task_curr(const struct task_struct *p); 1980extern int task_curr(const struct task_struct *p);
1951extern int idle_cpu(int cpu); 1981extern int idle_cpu(int cpu);
1952extern int sched_setscheduler(struct task_struct *, int, struct sched_param *); 1982extern int sched_setscheduler(struct task_struct *, int,
1983 const struct sched_param *);
1953extern int sched_setscheduler_nocheck(struct task_struct *, int, 1984extern int sched_setscheduler_nocheck(struct task_struct *, int,
1954 struct sched_param *); 1985 const struct sched_param *);
1955extern struct task_struct *idle_task(int cpu); 1986extern struct task_struct *idle_task(int cpu);
1956extern struct task_struct *curr_task(int cpu); 1987extern struct task_struct *curr_task(int cpu);
1957extern void set_curr_task(int cpu, struct task_struct *p); 1988extern void set_curr_task(int cpu, struct task_struct *p);
@@ -2478,7 +2509,7 @@ extern void normalize_rt_tasks(void);
2478 2509
2479#ifdef CONFIG_CGROUP_SCHED 2510#ifdef CONFIG_CGROUP_SCHED
2480 2511
2481extern struct task_group init_task_group; 2512extern struct task_group root_task_group;
2482 2513
2483extern struct task_group *sched_create_group(struct task_group *parent); 2514extern struct task_group *sched_create_group(struct task_group *parent);
2484extern void sched_destroy_group(struct task_group *tg); 2515extern void sched_destroy_group(struct task_group *tg);