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

Commit 93019340 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 container_of() to get root domain in rto_push_irq_work_func()"

parents 7f8d0df0 9c72eb30
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -2133,9 +2133,8 @@ static void push_rt_tasks(struct rq *rq)
 * the rt_loop_next will cause the iterator to perform another scan.
 *
 */
static int rto_next_cpu(struct rq *rq)
static int rto_next_cpu(struct root_domain *rd)
{
	struct root_domain *rd = rq->rd;
	int next;
	int cpu;

@@ -2211,7 +2210,7 @@ static void tell_cpu_to_push(struct rq *rq)
	 * Otherwise it is finishing up and an ipi needs to be sent.
	 */
	if (rq->rd->rto_cpu < 0)
		cpu = rto_next_cpu(rq);
		cpu = rto_next_cpu(rq->rd);

	raw_spin_unlock(&rq->rd->rto_lock);

@@ -2224,6 +2223,8 @@ static void tell_cpu_to_push(struct rq *rq)
/* Called from hardirq context */
void rto_push_irq_work_func(struct irq_work *work)
{
	struct root_domain *rd =
		container_of(work, struct root_domain, rto_push_work);
	struct rq *rq;
	int cpu;

@@ -2239,18 +2240,18 @@ void rto_push_irq_work_func(struct irq_work *work)
		raw_spin_unlock(&rq->lock);
	}

	raw_spin_lock(&rq->rd->rto_lock);
	raw_spin_lock(&rd->rto_lock);

	/* Pass the IPI to the next rt overloaded queue */
	cpu = rto_next_cpu(rq);
	cpu = rto_next_cpu(rd);

	raw_spin_unlock(&rq->rd->rto_lock);
	raw_spin_unlock(&rd->rto_lock);

	if (cpu < 0)
		return;

	/* Try the next RT overloaded CPU */
	irq_work_queue_on(&rq->rd->rto_push_work, cpu);
	irq_work_queue_on(&rd->rto_push_work, cpu);
}
#endif /* HAVE_RT_PUSH_IPI */

+14 −14
Original line number Diff line number Diff line
@@ -346,6 +346,20 @@ static struct ctl_table kern_table[] = {
		.extra2		= &three,
	},
#endif
	{
		.procname	= "sched_upmigrate",
		.data		= &sysctl_sched_capacity_margin_up,
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
		.proc_handler	= sched_updown_migrate_handler,
	},
	{
		.procname	= "sched_downmigrate",
		.data		= &sysctl_sched_capacity_margin_down,
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
		.proc_handler	= sched_updown_migrate_handler,
	},
#ifdef CONFIG_SCHED_DEBUG
	{
		.procname	= "sched_min_granularity_ns",
@@ -404,20 +418,6 @@ static struct ctl_table kern_table[] = {
		.extra1		= &min_wakeup_granularity_ns,
		.extra2		= &max_wakeup_granularity_ns,
	},
	{
		.procname	= "sched_upmigrate",
		.data		= &sysctl_sched_capacity_margin_up,
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
		.proc_handler	= sched_updown_migrate_handler,
	},
	{
		.procname	= "sched_downmigrate",
		.data		= &sysctl_sched_capacity_margin_down,
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
		.proc_handler	= sched_updown_migrate_handler,
	},
#ifdef CONFIG_SMP
	{
		.procname	= "sched_tunable_scaling",