diff options
Diffstat (limited to 'kernel/sched_rt.c')
-rw-r--r-- | kernel/sched_rt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index 0749c1837b10..b591b89710a4 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c | |||
@@ -762,6 +762,7 @@ move_one_task_rt(struct rq *this_rq, int this_cpu, struct rq *busiest, | |||
762 | /* don't touch RT tasks */ | 762 | /* don't touch RT tasks */ |
763 | return 0; | 763 | return 0; |
764 | } | 764 | } |
765 | |||
765 | static void set_cpus_allowed_rt(struct task_struct *p, cpumask_t *new_mask) | 766 | static void set_cpus_allowed_rt(struct task_struct *p, cpumask_t *new_mask) |
766 | { | 767 | { |
767 | int weight = cpus_weight(*new_mask); | 768 | int weight = cpus_weight(*new_mask); |
@@ -775,9 +776,9 @@ static void set_cpus_allowed_rt(struct task_struct *p, cpumask_t *new_mask) | |||
775 | if (p->se.on_rq && (weight != p->nr_cpus_allowed)) { | 776 | if (p->se.on_rq && (weight != p->nr_cpus_allowed)) { |
776 | struct rq *rq = task_rq(p); | 777 | struct rq *rq = task_rq(p); |
777 | 778 | ||
778 | if ((p->nr_cpus_allowed <= 1) && (weight > 1)) | 779 | if ((p->nr_cpus_allowed <= 1) && (weight > 1)) { |
779 | rq->rt.rt_nr_migratory++; | 780 | rq->rt.rt_nr_migratory++; |
780 | else if((p->nr_cpus_allowed > 1) && (weight <= 1)) { | 781 | } else if ((p->nr_cpus_allowed > 1) && (weight <= 1)) { |
781 | BUG_ON(!rq->rt.rt_nr_migratory); | 782 | BUG_ON(!rq->rt.rt_nr_migratory); |
782 | rq->rt.rt_nr_migratory--; | 783 | rq->rt.rt_nr_migratory--; |
783 | } | 784 | } |
@@ -788,6 +789,7 @@ static void set_cpus_allowed_rt(struct task_struct *p, cpumask_t *new_mask) | |||
788 | p->cpus_allowed = *new_mask; | 789 | p->cpus_allowed = *new_mask; |
789 | p->nr_cpus_allowed = weight; | 790 | p->nr_cpus_allowed = weight; |
790 | } | 791 | } |
792 | |||
791 | #else /* CONFIG_SMP */ | 793 | #else /* CONFIG_SMP */ |
792 | # define schedule_tail_balance_rt(rq) do { } while (0) | 794 | # define schedule_tail_balance_rt(rq) do { } while (0) |
793 | # define schedule_balance_rt(rq, prev) do { } while (0) | 795 | # define schedule_balance_rt(rq, prev) do { } while (0) |