diff options
| author | Clark Williams <williams@redhat.com> | 2013-02-07 10:47:07 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2013-02-07 14:51:08 -0500 |
| commit | 8bd75c77b7c6a3954140dd2e20346aef3efe4a35 (patch) | |
| tree | 10e0d451a58aeb6c8f48b871a848276bf3a8a359 | |
| parent | ce0dbbbb30aee6a835511d5be446462388ba9eee (diff) | |
sched/rt: Move rt specific bits into new header file
Move rt scheduler definitions out of include/linux/sched.h into
new file include/linux/sched/rt.h
Signed-off-by: Clark Williams <williams@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/20130207094707.7b9f825f@riff.lan
Signed-off-by: Ingo Molnar <mingo@kernel.org>
| -rw-r--r-- | drivers/spi/spi.c | 2 | ||||
| -rw-r--r-- | drivers/staging/csr/bh.c | 2 | ||||
| -rw-r--r-- | drivers/staging/csr/unifi_sme.c | 2 | ||||
| -rw-r--r-- | drivers/tty/sysrq.c | 1 | ||||
| -rw-r--r-- | fs/select.c | 1 | ||||
| -rw-r--r-- | include/linux/sched.h | 55 | ||||
| -rw-r--r-- | include/linux/sched/rt.h | 58 | ||||
| -rw-r--r-- | init/init_task.c | 1 | ||||
| -rw-r--r-- | kernel/futex.c | 1 | ||||
| -rw-r--r-- | kernel/hrtimer.c | 1 | ||||
| -rw-r--r-- | kernel/irq/manage.c | 1 | ||||
| -rw-r--r-- | kernel/mutex.c | 1 | ||||
| -rw-r--r-- | kernel/rtmutex-debug.c | 1 | ||||
| -rw-r--r-- | kernel/rtmutex-tester.c | 1 | ||||
| -rw-r--r-- | kernel/rtmutex.c | 1 | ||||
| -rw-r--r-- | kernel/sched/cpupri.c | 2 | ||||
| -rw-r--r-- | kernel/sched/sched.h | 1 | ||||
| -rw-r--r-- | kernel/trace/trace.c | 1 | ||||
| -rw-r--r-- | kernel/trace/trace_sched_wakeup.c | 2 | ||||
| -rw-r--r-- | kernel/watchdog.c | 1 | ||||
| -rw-r--r-- | mm/page-writeback.c | 1 | ||||
| -rw-r--r-- | mm/page_alloc.c | 1 |
22 files changed, 81 insertions, 57 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 19ee901577da..3a6083b386a1 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | #include <linux/of_gpio.h> | 33 | #include <linux/of_gpio.h> |
| 34 | #include <linux/pm_runtime.h> | 34 | #include <linux/pm_runtime.h> |
| 35 | #include <linux/export.h> | 35 | #include <linux/export.h> |
| 36 | #include <linux/sched.h> | 36 | #include <linux/sched/rt.h> |
| 37 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
| 38 | #include <linux/kthread.h> | 38 | #include <linux/kthread.h> |
| 39 | #include <linux/ioport.h> | 39 | #include <linux/ioport.h> |
diff --git a/drivers/staging/csr/bh.c b/drivers/staging/csr/bh.c index 1a1f5c79822a..7b133597e923 100644 --- a/drivers/staging/csr/bh.c +++ b/drivers/staging/csr/bh.c | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | */ | 15 | */ |
| 16 | #include "csr_wifi_hip_unifi.h" | 16 | #include "csr_wifi_hip_unifi.h" |
| 17 | #include "unifi_priv.h" | 17 | #include "unifi_priv.h" |
| 18 | 18 | #include <linux/sched/rt.h> | |
| 19 | 19 | ||
| 20 | /* | 20 | /* |
| 21 | * --------------------------------------------------------------------------- | 21 | * --------------------------------------------------------------------------- |
diff --git a/drivers/staging/csr/unifi_sme.c b/drivers/staging/csr/unifi_sme.c index 7c6c4138fc76..49395da34b7f 100644 --- a/drivers/staging/csr/unifi_sme.c +++ b/drivers/staging/csr/unifi_sme.c | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | #include "unifi_priv.h" | 15 | #include "unifi_priv.h" |
| 16 | #include "csr_wifi_hip_unifi.h" | 16 | #include "csr_wifi_hip_unifi.h" |
| 17 | #include "csr_wifi_hip_conversions.h" | 17 | #include "csr_wifi_hip_conversions.h" |
| 18 | 18 | #include <linux/sched/rt.h> | |
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | 21 | ||
diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c index b3c4a250ff86..40e5b3919e27 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 15 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
| 16 | 16 | ||
| 17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
| 18 | #include <linux/sched/rt.h> | ||
| 18 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
| 19 | #include <linux/mm.h> | 20 | #include <linux/mm.h> |
| 20 | #include <linux/fs.h> | 21 | #include <linux/fs.h> |
diff --git a/fs/select.c b/fs/select.c index 2ef72d965036..8c1c96c27062 100644 --- a/fs/select.c +++ b/fs/select.c | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #include <linux/fs.h> | 26 | #include <linux/fs.h> |
| 27 | #include <linux/rcupdate.h> | 27 | #include <linux/rcupdate.h> |
| 28 | #include <linux/hrtimer.h> | 28 | #include <linux/hrtimer.h> |
| 29 | #include <linux/sched/rt.h> | ||
| 29 | 30 | ||
| 30 | #include <asm/uaccess.h> | 31 | #include <asm/uaccess.h> |
| 31 | 32 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 8fc9b2710a80..33cc42130371 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -1164,6 +1164,7 @@ struct sched_entity { | |||
| 1164 | /* rq "owned" by this entity/group: */ | 1164 | /* rq "owned" by this entity/group: */ |
| 1165 | struct cfs_rq *my_q; | 1165 | struct cfs_rq *my_q; |
| 1166 | #endif | 1166 | #endif |
| 1167 | |||
| 1167 | /* | 1168 | /* |
| 1168 | * Load-tracking only depends on SMP, FAIR_GROUP_SCHED dependency below may be | 1169 | * Load-tracking only depends on SMP, FAIR_GROUP_SCHED dependency below may be |
| 1169 | * removed when useful for applications beyond shares distribution (e.g. | 1170 | * removed when useful for applications beyond shares distribution (e.g. |
| @@ -1191,6 +1192,7 @@ struct sched_rt_entity { | |||
| 1191 | #endif | 1192 | #endif |
| 1192 | }; | 1193 | }; |
| 1193 | 1194 | ||
| 1195 | |||
| 1194 | struct rcu_node; | 1196 | struct rcu_node; |
| 1195 | 1197 | ||
| 1196 | enum perf_event_task_context { | 1198 | enum perf_event_task_context { |
| @@ -1596,37 +1598,6 @@ static inline void set_numabalancing_state(bool enabled) | |||
| 1596 | } | 1598 | } |
| 1597 | #endif | 1599 | #endif |
| 1598 | 1600 | ||
| 1599 | /* | ||
| 1600 | * Priority of a process goes from 0..MAX_PRIO-1, valid RT | ||
| 1601 | * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH | ||
| 1602 | * tasks are in the range MAX_RT_PRIO..MAX_PRIO-1. Priority | ||
| 1603 | * values are inverted: lower p->prio value means higher priority. | ||
| 1604 | * | ||
| 1605 | * The MAX_USER_RT_PRIO value allows the actual maximum | ||
| 1606 | * RT priority to be separate from the value exported to | ||
| 1607 | * user-space. This allows kernel threads to set their | ||
| 1608 | * priority to a value higher than any user task. Note: | ||
| 1609 | * MAX_RT_PRIO must not be smaller than MAX_USER_RT_PRIO. | ||
| 1610 | */ | ||
| 1611 | |||
| 1612 | #define MAX_USER_RT_PRIO 100 | ||
| 1613 | #define MAX_RT_PRIO MAX_USER_RT_PRIO | ||
| 1614 | |||
| 1615 | #define MAX_PRIO (MAX_RT_PRIO + 40) | ||
| 1616 | #define DEFAULT_PRIO (MAX_RT_PRIO + 20) | ||
| 1617 | |||
| 1618 | static inline int rt_prio(int prio) | ||
| 1619 | { | ||
| 1620 | if (unlikely(prio < MAX_RT_PRIO)) | ||
| 1621 | return 1; | ||
| 1622 | return 0; | ||
| 1623 | } | ||
| 1624 | |||
| 1625 | static inline int rt_task(struct task_struct *p) | ||
| 1626 | { | ||
| 1627 | return rt_prio(p->prio); | ||
| 1628 | } | ||
| 1629 | |||
| 1630 | static inline struct pid *task_pid(struct task_struct *task) | 1601 | static inline struct pid *task_pid(struct task_struct *task) |
| 1631 | { | 1602 | { |
| 1632 | return task->pids[PIDTYPE_PID].pid; | 1603 | return task->pids[PIDTYPE_PID].pid; |
| @@ -2054,26 +2025,6 @@ static inline void sched_autogroup_fork(struct signal_struct *sig) { } | |||
| 2054 | static inline void sched_autogroup_exit(struct signal_struct *sig) { } | 2025 | static inline void sched_autogroup_exit(struct signal_struct *sig) { } |
| 2055 | #endif | 2026 | #endif |
| 2056 | 2027 | ||
| 2057 | #ifdef CONFIG_RT_MUTEXES | ||
| 2058 | extern int rt_mutex_getprio(struct task_struct *p); | ||
| 2059 | extern void rt_mutex_setprio(struct task_struct *p, int prio); | ||
| 2060 | extern void rt_mutex_adjust_pi(struct task_struct *p); | ||
| 2061 | static inline bool tsk_is_pi_blocked(struct task_struct *tsk) | ||
| 2062 | { | ||
| 2063 | return tsk->pi_blocked_on != NULL; | ||
| 2064 | } | ||
| 2065 | #else | ||
| 2066 | static inline int rt_mutex_getprio(struct task_struct *p) | ||
| 2067 | { | ||
| 2068 | return p->normal_prio; | ||
| 2069 | } | ||
| 2070 | # define rt_mutex_adjust_pi(p) do { } while (0) | ||
| 2071 | static inline bool tsk_is_pi_blocked(struct task_struct *tsk) | ||
| 2072 | { | ||
| 2073 | return false; | ||
| 2074 | } | ||
| 2075 | #endif | ||
| 2076 | |||
| 2077 | extern bool yield_to(struct task_struct *p, bool preempt); | 2028 | extern bool yield_to(struct task_struct *p, bool preempt); |
| 2078 | extern void set_user_nice(struct task_struct *p, long nice); | 2029 | extern void set_user_nice(struct task_struct *p, long nice); |
| 2079 | extern int task_prio(const struct task_struct *p); | 2030 | extern int task_prio(const struct task_struct *p); |
| @@ -2703,8 +2654,6 @@ static inline void set_task_cpu(struct task_struct *p, unsigned int cpu) | |||
| 2703 | extern long sched_setaffinity(pid_t pid, const struct cpumask *new_mask); | 2654 | extern long sched_setaffinity(pid_t pid, const struct cpumask *new_mask); |
| 2704 | extern long sched_getaffinity(pid_t pid, struct cpumask *mask); | 2655 | extern long sched_getaffinity(pid_t pid, struct cpumask *mask); |
| 2705 | 2656 | ||
| 2706 | extern void normalize_rt_tasks(void); | ||
| 2707 | |||
| 2708 | #ifdef CONFIG_CGROUP_SCHED | 2657 | #ifdef CONFIG_CGROUP_SCHED |
| 2709 | 2658 | ||
| 2710 | extern struct task_group root_task_group; | 2659 | extern struct task_group root_task_group; |
