diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-02-05 09:38:10 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-03-02 02:42:24 -0500 |
commit | 0c98d344fe5c27f6e4bce42ac503e9e9a51c7d1d (patch) | |
tree | 98a45a561f3cfe6a1be9942cfdf23af5f70ca7dd /kernel/sched/rt.c | |
parent | 59ddbcb2f45b958cf1f11f122b666cbcf50cd57b (diff) |
sched/core: Remove the tsk_cpus_allowed() wrapper
So the original intention of tsk_cpus_allowed() was to 'future-proof'
the field - but it's pretty ineffectual at that, because half of
the code uses ->cpus_allowed directly ...
Also, the wrapper makes the code longer than the original expression!
So just get rid of it. This also shrinks <linux/sched.h> a bit.
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/rt.c')
-rw-r--r-- | kernel/sched/rt.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index e8836cfc4cdb..cbd356f63883 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c | |||
@@ -1591,7 +1591,7 @@ static void put_prev_task_rt(struct rq *rq, struct task_struct *p) | |||
1591 | static int pick_rt_task(struct rq *rq, struct task_struct *p, int cpu) | 1591 | static int pick_rt_task(struct rq *rq, struct task_struct *p, int cpu) |
1592 | { | 1592 | { |
1593 | if (!task_running(rq, p) && | 1593 | if (!task_running(rq, p) && |
1594 | cpumask_test_cpu(cpu, tsk_cpus_allowed(p))) | 1594 | cpumask_test_cpu(cpu, &p->cpus_allowed)) |
1595 | return 1; | 1595 | return 1; |
1596 | return 0; | 1596 | return 0; |
1597 | } | 1597 | } |
@@ -1726,8 +1726,7 @@ static struct rq *find_lock_lowest_rq(struct task_struct *task, struct rq *rq) | |||
1726 | * Also make sure that it wasn't scheduled on its rq. | 1726 | * Also make sure that it wasn't scheduled on its rq. |
1727 | */ | 1727 | */ |
1728 | if (unlikely(task_rq(task) != rq || | 1728 | if (unlikely(task_rq(task) != rq || |
1729 | !cpumask_test_cpu(lowest_rq->cpu, | 1729 | !cpumask_test_cpu(lowest_rq->cpu, &task->cpus_allowed) || |
1730 | tsk_cpus_allowed(task)) || | ||
1731 | task_running(rq, task) || | 1730 | task_running(rq, task) || |
1732 | !rt_task(task) || | 1731 | !rt_task(task) || |
1733 | !task_on_rq_queued(task))) { | 1732 | !task_on_rq_queued(task))) { |