2020-08-28 04:53:35 +00:00
|
|
|
From 06c646b5acbda25c7ebb05d9cf4f2de77a534a23 Mon Sep 17 00:00:00 2001
|
|
|
|
Message-Id: <06c646b5acbda25c7ebb05d9cf4f2de77a534a23.1596234184.git.zanussi@kernel.org>
|
|
|
|
In-Reply-To: <378ee68279f6a7631221f2670a9298620148690d.1596234183.git.zanussi@kernel.org>
|
|
|
|
References: <378ee68279f6a7631221f2670a9298620148690d.1596234183.git.zanussi@kernel.org>
|
2019-08-18 21:33:52 +00:00
|
|
|
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
|
|
Date: Mon, 24 Jun 2019 19:33:16 +0200
|
2020-07-15 20:05:29 +00:00
|
|
|
Subject: [PATCH 270/329] sched/core: Drop a preempt_disable_rt() statement
|
2020-08-28 04:53:35 +00:00
|
|
|
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.135-rt60.tar.xz
|
2019-08-18 21:33:52 +00:00
|
|
|
|
|
|
|
[ Upstream commit 761126efdcbe3fa3e99c9079fa0ad6eca2f251f2 ]
|
|
|
|
|
|
|
|
The caller holds a lock which already disables preemption.
|
|
|
|
Drop the preempt_disable_rt() statement in get_nohz_timer_target().
|
|
|
|
|
|
|
|
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
|
|
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
|
|
|
|
---
|
|
|
|
kernel/sched/core.c | 9 ++-------
|
|
|
|
1 file changed, 2 insertions(+), 7 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
|
2020-08-28 04:53:35 +00:00
|
|
|
index 8d2452cb5793..9337303a9f43 100644
|
2019-08-18 21:33:52 +00:00
|
|
|
--- a/kernel/sched/core.c
|
|
|
|
+++ b/kernel/sched/core.c
|
|
|
|
@@ -558,14 +558,11 @@ void resched_cpu(int cpu)
|
|
|
|
*/
|
|
|
|
int get_nohz_timer_target(void)
|
|
|
|
{
|
|
|
|
- int i, cpu;
|
|
|
|
+ int i, cpu = smp_processor_id();
|
|
|
|
struct sched_domain *sd;
|
|
|
|
|
|
|
|
- preempt_disable_rt();
|
|
|
|
- cpu = smp_processor_id();
|
|
|
|
-
|
|
|
|
if (!idle_cpu(cpu) && housekeeping_cpu(cpu, HK_FLAG_TIMER))
|
|
|
|
- goto preempt_en_rt;
|
|
|
|
+ return cpu;
|
|
|
|
|
|
|
|
rcu_read_lock();
|
|
|
|
for_each_domain(cpu, sd) {
|
|
|
|
@@ -584,8 +581,6 @@ int get_nohz_timer_target(void)
|
|
|
|
cpu = housekeeping_any_cpu(HK_FLAG_TIMER);
|
|
|
|
unlock:
|
|
|
|
rcu_read_unlock();
|
|
|
|
-preempt_en_rt:
|
|
|
|
- preempt_enable_rt();
|
|
|
|
return cpu;
|
|
|
|
}
|
|
|
|
|
2020-01-03 23:36:11 +00:00
|
|
|
--
|
2020-06-22 13:14:16 +00:00
|
|
|
2.17.1
|
2020-01-03 23:36:11 +00:00
|
|
|
|