[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1627979206-32663-4-git-send-email-pmorel@linux.ibm.com>
Date: Tue, 3 Aug 2021 10:26:46 +0200
From: Pierre Morel <pmorel@...ux.ibm.com>
To: kvm@...r.kernel.org
Cc: linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org,
borntraeger@...ibm.com, frankja@...ux.ibm.com, cohuck@...hat.com,
david@...hat.com, thuth@...hat.com, imbrenda@...ux.ibm.com,
hca@...ux.ibm.com, gor@...ux.ibm.com, pmorel@...ux.ibm.com
Subject: [PATCH v3 3/3] s390x: optimization of the check for CPU topology change
Now that the PTF instruction is interpreted by the SIE we can optimize
the arch_update_cpu_topology callback to check if there is a real need
to update the topology by using the PTF instruction.
Signed-off-by: Pierre Morel <pmorel@...ux.ibm.com>
---
arch/s390/kernel/topology.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index 26aa2614ee35..741cb447e78e 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -322,6 +322,9 @@ int arch_update_cpu_topology(void)
struct device *dev;
int cpu, rc;
+ if (!ptf(PTF_CHECK))
+ return 0;
+
rc = __arch_update_cpu_topology();
on_each_cpu(__arch_update_dedicated_flag, NULL, 0);
for_each_online_cpu(cpu) {
--
2.25.1
Powered by blists - more mailing lists