From: Zhenzhong Duan <zhenzhong.duan@oracle.com>
To: <linux-kernel@vger.kernel.org>
Cc: <mingo@redhat.com>, <konrad.wilk@oracle.com>,
<tglx@linutronix.de>, <dwmw@amazon.co.uk>, <bp@suse.de>,
<srinivas.eeda@oracle.com>, <peterz@infradead.org>,
<hpa@zytor.com>
Subject: [PATCH] x86/speculation: Remove redundant arch_smt_update() call in sysfs SMT control
Date: Thu, 17 Jan 2019 02:10:59 -0800 (PST) [thread overview]
Message-ID: <e2e064f2-e8ef-42ca-bf4f-76b612964752@default> (raw)
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
next reply other threads:[~2019-01-17 10:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-17 10:10 Zhenzhong Duan [this message]
2019-01-29 21:24 ` [tip:smp/urgent] x86/speculation: Remove redundant arch_smt_update() invocation tip-bot for Zhenzhong Duan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e2e064f2-e8ef-42ca-bf4f-76b612964752@default \
--to=zhenzhong.duan@oracle.com \
--cc=bp@suse.de \
--cc=dwmw@amazon.co.uk \
--cc=hpa@zytor.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=srinivas.eeda@oracle.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox