linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/speculation: Remove redundant arch_smt_update() call in sysfs SMT control
@ 2019-01-17 10:10 Zhenzhong Duan
  2019-01-29 21:24 ` [tip:smp/urgent] x86/speculation: Remove redundant arch_smt_update() invocation tip-bot for Zhenzhong Duan
  0 siblings, 1 reply; 2+ messages in thread
From: Zhenzhong Duan @ 2019-01-17 10:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: mingo, konrad.wilk, tglx, dwmw, bp, srinivas.eeda, peterz, hpa

With commit a74cfffb03b7 ("x86/speculation: Rework SMT state change"),
arch_smt_update() is invoked from each individual CPU hotplug function.
Then the extra arch_smt_update() call in the sysfs SMT control is
redundant.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
---
 kernel/cpu.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 91d5c38..c0c7f64 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -2090,10 +2090,8 @@ static int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval)
 		 */
 		cpuhp_offline_cpu_device(cpu);
 	}
-	if (!ret) {
+	if (!ret)
 		cpu_smt_control = ctrlval;
-		arch_smt_update();
-	}
 	cpu_maps_update_done();
 	return ret;
 }
@@ -2104,7 +2102,6 @@ static int cpuhp_smt_enable(void)
 
 	cpu_maps_update_begin();
 	cpu_smt_control = CPU_SMT_ENABLED;
-	arch_smt_update();
 	for_each_present_cpu(cpu) {
 		/* Skip online CPUs and CPUs on offline nodes */
 		if (cpu_online(cpu) || !node_online(cpu_to_node(cpu)))
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-29 21:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-17 10:10 [PATCH] x86/speculation: Remove redundant arch_smt_update() call in sysfs SMT control Zhenzhong Duan
2019-01-29 21:24 ` [tip:smp/urgent] x86/speculation: Remove redundant arch_smt_update() invocation tip-bot for Zhenzhong Duan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).