aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h31
1 files changed, 18 insertions, 13 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index fea9d188dbff..4d0754269884 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -92,7 +92,6 @@ struct sched_param {
92 92
93#include <asm/processor.h> 93#include <asm/processor.h>
94 94
95struct mem_cgroup;
96struct exec_domain; 95struct exec_domain;
97struct futex_pi_state; 96struct futex_pi_state;
98struct robust_list_head; 97struct robust_list_head;
@@ -261,6 +260,7 @@ extern void task_rq_unlock_wait(struct task_struct *p);
261extern cpumask_var_t nohz_cpu_mask; 260extern cpumask_var_t nohz_cpu_mask;
262#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) 261#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ)
263extern int select_nohz_load_balancer(int cpu); 262extern int select_nohz_load_balancer(int cpu);
263extern int get_nohz_load_balancer(void);
264#else 264#else
265static inline int select_nohz_load_balancer(int cpu) 265static inline int select_nohz_load_balancer(int cpu)
266{ 266{
@@ -673,7 +673,7 @@ struct user_struct {
673 struct task_group *tg; 673 struct task_group *tg;
674#ifdef CONFIG_SYSFS 674#ifdef CONFIG_SYSFS
675 struct kobject kobj; 675 struct kobject kobj;
676 struct work_struct work; 676 struct delayed_work work;
677#endif 677#endif
678#endif 678#endif
679 679
@@ -1177,7 +1177,6 @@ struct task_struct {
1177 * a short time 1177 * a short time
1178 */ 1178 */
1179 unsigned char fpu_counter; 1179 unsigned char fpu_counter;
1180 s8 oomkilladj; /* OOM kill score adjustment (bit shift). */
1181#ifdef CONFIG_BLK_DEV_IO_TRACE 1180#ifdef CONFIG_BLK_DEV_IO_TRACE
1182 unsigned int btrace_seq; 1181 unsigned int btrace_seq;
1183#endif 1182#endif
@@ -1317,7 +1316,8 @@ struct task_struct {
1317/* Thread group tracking */ 1316/* Thread group tracking */
1318 u32 parent_exec_id; 1317 u32 parent_exec_id;
1319 u32 self_exec_id; 1318 u32 self_exec_id;
1320/* Protection of (de-)allocation: mm, files, fs, tty, keyrings */ 1319/* Protection of (de-)allocation: mm, files, fs, tty, keyrings, mems_allowed,
1320 * mempolicy */
1321 spinlock_t alloc_lock; 1321 spinlock_t alloc_lock;
1322 1322
1323#ifdef CONFIG_GENERIC_HARDIRQS 1323#ifdef CONFIG_GENERIC_HARDIRQS
@@ -1385,8 +1385,7 @@ struct task_struct {
1385 cputime_t acct_timexpd; /* stime + utime since last update */ 1385 cputime_t acct_timexpd; /* stime + utime since last update */
1386#endif 1386#endif
1387#ifdef CONFIG_CPUSETS 1387#ifdef CONFIG_CPUSETS
1388 nodemask_t mems_allowed; 1388 nodemask_t mems_allowed; /* Protected by alloc_lock */
1389 int cpuset_mems_generation;
1390 int cpuset_mem_spread_rotor; 1389 int cpuset_mem_spread_rotor;
1391#endif 1390#endif
1392#ifdef CONFIG_CGROUPS 1391#ifdef CONFIG_CGROUPS
@@ -1409,7 +1408,7 @@ struct task_struct {
1409 struct list_head perf_counter_list; 1408 struct list_head perf_counter_list;
1410#endif 1409#endif
1411#ifdef CONFIG_NUMA 1410#ifdef CONFIG_NUMA
1412 struct mempolicy *mempolicy; 1411 struct mempolicy *mempolicy; /* Protected by alloc_lock */
1413 short il_next; 1412 short il_next;
1414#endif 1413#endif
1415 atomic_t fs_excl; /* holding fs exclusive resources */ 1414 atomic_t fs_excl; /* holding fs exclusive resources */
@@ -1796,11 +1795,23 @@ extern unsigned int sysctl_sched_child_runs_first;
1796extern unsigned int sysctl_sched_features; 1795extern unsigned int sysctl_sched_features;
1797extern unsigned int sysctl_sched_migration_cost; 1796extern unsigned int sysctl_sched_migration_cost;
1798extern unsigned int sysctl_sched_nr_migrate; 1797extern unsigned int sysctl_sched_nr_migrate;
1798extern unsigned int sysctl_timer_migration;
1799 1799
1800int sched_nr_latency_handler(struct ctl_table *table, int write, 1800int sched_nr_latency_handler(struct ctl_table *table, int write,
1801 struct file *file, void __user *buffer, size_t *length, 1801 struct file *file, void __user *buffer, size_t *length,
1802 loff_t *ppos); 1802 loff_t *ppos);
1803#endif 1803#endif
1804#ifdef CONFIG_SCHED_DEBUG
1805static inline unsigned int get_sysctl_timer_migration(void)
1806{
1807 return sysctl_timer_migration;
1808}
1809#else
1810static inline unsigned int get_sysctl_timer_migration(void)
1811{
1812 return 1;
1813}
1814#endif
1804extern unsigned int sysctl_sched_rt_period; 1815extern unsigned int sysctl_sched_rt_period;
1805extern int sysctl_sched_rt_runtime; 1816extern int sysctl_sched_rt_runtime;
1806 1817
@@ -1867,9 +1878,6 @@ extern struct pid_namespace init_pid_ns;
1867/* 1878/*
1868 * find a task by one of its numerical ids 1879 * find a task by one of its numerical ids
1869 * 1880 *
1870 * find_task_by_pid_type_ns():
1871 * it is the most generic call - it finds a task by all id,
1872 * type and namespace specified
1873 * find_task_by_pid_ns(): 1881 * find_task_by_pid_ns():
1874 * finds a task by its pid in the specified namespace 1882 * finds a task by its pid in the specified namespace
1875 * find_task_by_vpid(): 1883 * find_task_by_vpid():
@@ -1878,9 +1886,6 @@ extern struct pid_namespace init_pid_ns;
1878 * see also find_vpid() etc in include/linux/pid.h 1886 * see also find_vpid() etc in include/linux/pid.h
1879 */ 1887 */
1880 1888
1881extern struct task_struct *find_task_by_pid_type_ns(int type, int pid,
1882 struct pid_namespace *ns);
1883
1884extern struct task_struct *find_task_by_vpid(pid_t nr); 1889extern struct task_struct *find_task_by_vpid(pid_t nr);
1885extern struct task_struct *find_task_by_pid_ns(pid_t nr, 1890extern struct task_struct *find_task_by_pid_ns(pid_t nr,
1886 struct pid_namespace *ns); 1891 struct pid_namespace *ns);