diff options
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 41 |
1 files changed, 25 insertions, 16 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 89115ec7d43f..e89857812be6 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1102,7 +1102,7 @@ struct sched_class { | |||
1102 | 1102 | ||
1103 | void (*set_curr_task) (struct rq *rq); | 1103 | void (*set_curr_task) (struct rq *rq); |
1104 | void (*task_tick) (struct rq *rq, struct task_struct *p, int queued); | 1104 | void (*task_tick) (struct rq *rq, struct task_struct *p, int queued); |
1105 | void (*task_new) (struct rq *rq, struct task_struct *p); | 1105 | void (*task_fork) (struct task_struct *p); |
1106 | 1106 | ||
1107 | void (*switched_from) (struct rq *this_rq, struct task_struct *task, | 1107 | void (*switched_from) (struct rq *this_rq, struct task_struct *task, |
1108 | int running); | 1108 | int running); |
@@ -1111,7 +1111,8 @@ struct sched_class { | |||
1111 | void (*prio_changed) (struct rq *this_rq, struct task_struct *task, | 1111 | void (*prio_changed) (struct rq *this_rq, struct task_struct *task, |
1112 | int oldprio, int running); | 1112 | int oldprio, int running); |
1113 | 1113 | ||
1114 | unsigned int (*get_rr_interval) (struct task_struct *task); | 1114 | unsigned int (*get_rr_interval) (struct rq *rq, |
1115 | struct task_struct *task); | ||
1115 | 1116 | ||
1116 | #ifdef CONFIG_FAIR_GROUP_SCHED | 1117 | #ifdef CONFIG_FAIR_GROUP_SCHED |
1117 | void (*moved_group) (struct task_struct *p); | 1118 | void (*moved_group) (struct task_struct *p); |
@@ -1151,8 +1152,6 @@ struct sched_entity { | |||
1151 | u64 start_runtime; | 1152 | u64 start_runtime; |
1152 | u64 avg_wakeup; | 1153 | u64 avg_wakeup; |
1153 | 1154 | ||
1154 | u64 avg_running; | ||
1155 | |||
1156 | #ifdef CONFIG_SCHEDSTATS | 1155 | #ifdef CONFIG_SCHEDSTATS |
1157 | u64 wait_start; | 1156 | u64 wait_start; |
1158 | u64 wait_max; | 1157 | u64 wait_max; |
@@ -1175,7 +1174,6 @@ struct sched_entity { | |||
1175 | u64 nr_failed_migrations_running; | 1174 | u64 nr_failed_migrations_running; |
1176 | u64 nr_failed_migrations_hot; | 1175 | u64 nr_failed_migrations_hot; |
1177 | u64 nr_forced_migrations; | 1176 | u64 nr_forced_migrations; |
1178 | u64 nr_forced2_migrations; | ||
1179 | 1177 | ||
1180 | u64 nr_wakeups; | 1178 | u64 nr_wakeups; |
1181 | u64 nr_wakeups_sync; | 1179 | u64 nr_wakeups_sync; |
@@ -1411,7 +1409,7 @@ struct task_struct { | |||
1411 | #endif | 1409 | #endif |
1412 | 1410 | ||
1413 | /* Protection of the PI data structures: */ | 1411 | /* Protection of the PI data structures: */ |
1414 | spinlock_t pi_lock; | 1412 | raw_spinlock_t pi_lock; |
1415 | 1413 | ||
1416 | #ifdef CONFIG_RT_MUTEXES | 1414 | #ifdef CONFIG_RT_MUTEXES |
1417 | /* PI waiters blocked on a rt_mutex held by this task */ | 1415 | /* PI waiters blocked on a rt_mutex held by this task */ |
@@ -1544,10 +1542,18 @@ struct task_struct { | |||
1544 | unsigned long trace_recursion; | 1542 | unsigned long trace_recursion; |
1545 | #endif /* CONFIG_TRACING */ | 1543 | #endif /* CONFIG_TRACING */ |
1546 | unsigned long stack_start; | 1544 | unsigned long stack_start; |
1545 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR /* memcg uses this to do batch job */ | ||
1546 | struct memcg_batch_info { | ||
1547 | int do_batch; /* incremented when batch uncharge started */ | ||
1548 | struct mem_cgroup *memcg; /* target memcg of uncharge */ | ||
1549 | unsigned long bytes; /* uncharged usage */ | ||
1550 | unsigned long memsw_bytes; /* uncharged mem+swap usage */ | ||
1551 | } memcg_batch; | ||
1552 | #endif | ||
1547 | }; | 1553 | }; |
1548 | 1554 | ||
1549 | /* Future-safe accessor for struct task_struct's cpus_allowed. */ | 1555 | /* Future-safe accessor for struct task_struct's cpus_allowed. */ |
1550 | #define tsk_cpumask(tsk) (&(tsk)->cpus_allowed) | 1556 | #define tsk_cpus_allowed(tsk) (&(tsk)->cpus_allowed) |
1551 | 1557 | ||
1552 | /* | 1558 | /* |
1553 | * Priority of a process goes from 0..MAX_PRIO-1, valid RT | 1559 | * Priority of a process goes from 0..MAX_PRIO-1, valid RT |
@@ -1840,7 +1846,8 @@ static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) | |||
1840 | extern int sched_clock_stable; | 1846 | extern int sched_clock_stable; |
1841 | #endif | 1847 | #endif |
1842 | 1848 | ||
1843 | extern unsigned long long sched_clock(void); | 1849 | /* ftrace calls sched_clock() directly */ |
1850 | extern unsigned long long notrace sched_clock(void); | ||
1844 | 1851 | ||
1845 | extern void sched_clock_init(void); | 1852 | extern void sched_clock_init(void); |
1846 | extern u64 sched_clock_cpu(int cpu); | 1853 | extern u64 sched_clock_cpu(int cpu); |
@@ -1903,14 +1910,22 @@ extern unsigned int sysctl_sched_wakeup_granularity; | |||
1903 | extern unsigned int sysctl_sched_shares_ratelimit; | 1910 | extern unsigned int sysctl_sched_shares_ratelimit; |
1904 | extern unsigned int sysctl_sched_shares_thresh; | 1911 | extern unsigned int sysctl_sched_shares_thresh; |
1905 | extern unsigned int sysctl_sched_child_runs_first; | 1912 | extern unsigned int sysctl_sched_child_runs_first; |
1913 | |||
1914 | enum sched_tunable_scaling { | ||
1915 | SCHED_TUNABLESCALING_NONE, | ||
1916 | SCHED_TUNABLESCALING_LOG, | ||
1917 | SCHED_TUNABLESCALING_LINEAR, | ||
1918 | SCHED_TUNABLESCALING_END, | ||
1919 | }; | ||
1920 | extern enum sched_tunable_scaling sysctl_sched_tunable_scaling; | ||
1921 | |||
1906 | #ifdef CONFIG_SCHED_DEBUG | 1922 | #ifdef CONFIG_SCHED_DEBUG |
1907 | extern unsigned int sysctl_sched_features; | ||
1908 | extern unsigned int sysctl_sched_migration_cost; | 1923 | extern unsigned int sysctl_sched_migration_cost; |
1909 | extern unsigned int sysctl_sched_nr_migrate; | 1924 | extern unsigned int sysctl_sched_nr_migrate; |
1910 | extern unsigned int sysctl_sched_time_avg; | 1925 | extern unsigned int sysctl_sched_time_avg; |
1911 | extern unsigned int sysctl_timer_migration; | 1926 | extern unsigned int sysctl_timer_migration; |
1912 | 1927 | ||
1913 | int sched_nr_latency_handler(struct ctl_table *table, int write, | 1928 | int sched_proc_update_handler(struct ctl_table *table, int write, |
1914 | void __user *buffer, size_t *length, | 1929 | void __user *buffer, size_t *length, |
1915 | loff_t *ppos); | 1930 | loff_t *ppos); |
1916 | #endif | 1931 | #endif |
@@ -2066,7 +2081,6 @@ extern int kill_proc_info(int, struct siginfo *, pid_t); | |||
2066 | extern int do_notify_parent(struct task_struct *, int); | 2081 | extern int do_notify_parent(struct task_struct *, int); |
2067 | extern void __wake_up_parent(struct task_struct *p, struct task_struct *parent); | 2082 | extern void __wake_up_parent(struct task_struct *p, struct task_struct *parent); |
2068 | extern void force_sig(int, struct task_struct *); | 2083 | extern void force_sig(int, struct task_struct *); |
2069 | extern void force_sig_specific(int, struct task_struct *); | ||
2070 | extern int send_sig(int, struct task_struct *, int); | 2084 | extern int send_sig(int, struct task_struct *, int); |
2071 | extern void zap_other_threads(struct task_struct *p); | 2085 | extern void zap_other_threads(struct task_struct *p); |
2072 | extern struct sigqueue *sigqueue_alloc(void); | 2086 | extern struct sigqueue *sigqueue_alloc(void); |
@@ -2085,11 +2099,6 @@ static inline int kill_cad_pid(int sig, int priv) | |||
2085 | #define SEND_SIG_PRIV ((struct siginfo *) 1) | 2099 | #define SEND_SIG_PRIV ((struct siginfo *) 1) |
2086 | #define SEND_SIG_FORCED ((struct siginfo *) 2) | 2100 | #define SEND_SIG_FORCED ((struct siginfo *) 2) |
2087 | 2101 | ||
2088 | static inline int is_si_special(const struct siginfo *info) | ||
2089 | { | ||
2090 | return info <= SEND_SIG_FORCED; | ||
2091 | } | ||
2092 | |||
2093 | /* | 2102 | /* |
2094 | * True if we are on the alternate signal stack. | 2103 | * True if we are on the alternate signal stack. |
2095 | */ | 2104 | */ |