Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4096872 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched: rt: Use RCU lock in rt task cpu select path"

parents a4500722 0cdc29e2
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1805,7 +1805,6 @@ static int find_lowest_rq(struct task_struct *task)
				}
			}
		} while (sg = sg->next, sg != sd->groups);
		rcu_read_unlock();

		if (sg_target) {
			cpumask_and(&search_cpu, lowest_mask,
@@ -1894,6 +1893,7 @@ static int find_lowest_rq(struct task_struct *task)
		}

		if (best_cpu != -1 && placement_boost != SCHED_BOOST_ON_ALL) {
			rcu_read_unlock();
			return best_cpu;
		} else if (!cpumask_empty(&backup_search_cpu)) {
			cpumask_copy(&search_cpu, &backup_search_cpu);
@@ -1902,6 +1902,7 @@ static int find_lowest_rq(struct task_struct *task)
			placement_boost = SCHED_BOOST_NONE;
			goto retry;
		}
		rcu_read_unlock();
	}

noea:
+8 −3
Original line number Diff line number Diff line
@@ -87,11 +87,16 @@ late_initcall(sched_init_ops);
static void acquire_rq_locks_irqsave(const cpumask_t *cpus,
				     unsigned long *flags)
{
	int cpu;
	int cpu, level = 0;

	local_irq_save(*flags);
	for_each_cpu(cpu, cpus)
	for_each_cpu(cpu, cpus) {
		if (level == 0)
			raw_spin_lock(&cpu_rq(cpu)->lock);
		else
			raw_spin_lock_nested(&cpu_rq(cpu)->lock, level);
		level++;
	}
}

static void release_rq_locks_irqrestore(const cpumask_t *cpus,