diff mbox series

[2/2] powerpc/locking: enable HAVE_CMPXCHG_LOCAL in kconfig

Message ID 4250629DA95C6D4F+20231204022303.528-2-luming.yu@shingroup.cn (mailing list archive)
State New
Headers show
Series [1/2] powerpc/locking: implement this_cpu_cmpxchg local API | expand

Checks

Context Check Description
snowpatch_ozlabs/github-powerpc_selftests success Successfully ran 8 jobs.
snowpatch_ozlabs/github-powerpc_sparse fail sparse (pmac32, fedora-38, ppc64) failed at step Build.
snowpatch_ozlabs/github-powerpc_kernel_qemu fail 2 of 18 jobs failed.
snowpatch_ozlabs/github-powerpc_ppctests success Successfully ran 8 jobs.
snowpatch_ozlabs/github-powerpc_clang fail 3 of 6 jobs failed.

Commit Message

Luming Yu Dec. 4, 2023, 2:23 a.m. UTC
enable arch feature HAVE_CMPXCHG_LOCAL for ppc by default

Signed-off-by: Luming Yu <luming.yu@shingroup.cn>
---
 arch/powerpc/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Luming Yu Aug. 22, 2024, 8:26 a.m. UTC | #1
Hi,


specific for local cmpxchg enabled on p8 powernv platform on which the patch enabled vm_state update path,
ftrace data below indicates it is&nbsp; at the level&nbsp; ofabout 4us or 5us latency,&nbsp; for such a big cache cold operations.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <...&gt;-277787&nbsp; [008] ..... 88366.233643: refresh_cpu_vm_stats <-vmstat_update
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <idle&gt;-0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [008] d.... 88366.233648: tick_nohz_idle_stop_tick <-do_idle


I have no diff data against the latency without the patch. But based on the estimation of the pipeline overhead for
such a big operation incurred by the vm stats update, it looks not bad.
&nbsp;I will do more testing and collect more histogram for different scenarios to ensure that
the latency level of understanding is something statistically make sense.


Just for the record that the small patch works as expected. :-)


BR
Luming

------------------&nbsp;Original&nbsp;------------------
From: &nbsp;"虞陆铭"<luming.yu@shingroup.cn&gt;;
Date: &nbsp;Mon, Dec 4, 2023 10:23 AM
To: &nbsp;"linuxppc-dev"<linuxppc-dev@lists.ozlabs.org&gt;; "linux-kernel"<linux-kernel@vger.kernel.org&gt;; "mpe"<mpe@ellerman.id.au&gt;; "npiggin"<npiggin@gmail.com&gt;; "christophe.leroy"<christophe.leroy@csgroup.eu&gt;; 
Cc: &nbsp;"luming.yu"<luming.yu@gmail.com&gt;; "ke.zhao"<ke.zhao@shingroup.cn&gt;; "dawei.li"<dawei.li@shingroup.cn&gt;; "shenghui.qu"<shenghui.qu@shingroup.cn&gt;; "虞陆铭"<luming.yu@shingroup.cn&gt;; 
Subject: &nbsp;[PATCH 2/2] powerpc/locking: enable HAVE_CMPXCHG_LOCAL in kconfig

&nbsp;

enable arch feature HAVE_CMPXCHG_LOCAL for ppc by default

Signed-off-by: Luming Yu <luming.yu@shingroup.cn&gt;
---
&nbsp;arch/powerpc/Kconfig | 1 +
&nbsp;1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 6f105ee4f3cf..c10229c0243c 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -226,6 +226,7 @@ config PPC
&nbsp;	select HAVE_ARCH_SECCOMP_FILTER
&nbsp;	select HAVE_ARCH_TRACEHOOK
&nbsp;	select HAVE_ASM_MODVERSIONS
+	select HAVE_CMPXCHG_LOCAL
&nbsp;	select HAVE_CONTEXT_TRACKING_USER
&nbsp;	select HAVE_C_RECORDMCOUNT
&nbsp;	select HAVE_DEBUG_KMEMLEAK
Luming Yu Aug. 22, 2024, 8:31 a.m. UTC | #2
(in text)

Hi,

specific for local cmpxchg enabled on p8 powernv platform on which the patch enabled vm_state update path,
ftrace data below indicates it is  at the level  ofabout 4us or 5us latency,  for such a big cache cold operations.
          <...>-277787  [008] ..... 88366.233643: refresh_cpu_vm_stats <-vmstat_update
          <idle>-0       [008] d.... 88366.233648: tick_nohz_idle_stop_tick <-do_idle

I have no diff data against the latency without the patch. But based on the estimation of the pipeline overhead for
such a big operation incurred by the vm stats update, it looks not bad.
 I will do more testing and collect more histogram for different scenarios to ensure that
the latency level of understanding is something statistically make sense.

Just for the record that the small patch works as expected. :-)

BR
Luming
 
 
------------------ Original ------------------
From:  "虞陆铭"<luming.yu@shingroup.cn>;
Date:  Mon, Dec 4, 2023 10:23 AM
To:  "linuxppc-dev"<linuxppc-dev@lists.ozlabs.org>; "linux-kernel"<linux-kernel@vger.kernel.org>; "mpe"<mpe@ellerman.id.au>; "npiggin"<npiggin@gmail.com>; "christophe.leroy"<christophe.leroy@csgroup.eu>; 
Cc:  "luming.yu"<luming.yu@gmail.com>; "ke.zhao"<ke.zhao@shingroup.cn>; "dawei.li"<dawei.li@shingroup.cn>; "shenghui.qu"<shenghui.qu@shingroup.cn>; "虞陆铭"<luming.yu@shingroup.cn>; 
Subject:  [PATCH 2/2] powerpc/locking: enable HAVE_CMPXCHG_LOCAL in kconfig

 

enable arch feature HAVE_CMPXCHG_LOCAL for ppc by default

Signed-off-by: Luming Yu <luming.yu@shingroup.cn>
---
 arch/powerpc/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 6f105ee4f3cf..c10229c0243c 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -226,6 +226,7 @@ config PPC
 	select HAVE_ARCH_SECCOMP_FILTER
 	select HAVE_ARCH_TRACEHOOK
 	select HAVE_ASM_MODVERSIONS
+	select HAVE_CMPXCHG_LOCAL
 	select HAVE_CONTEXT_TRACKING_USER
 	select HAVE_C_RECORDMCOUNT
 	select HAVE_DEBUG_KMEMLEAK
diff mbox series

Patch

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 6f105ee4f3cf..c10229c0243c 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -226,6 +226,7 @@  config PPC
 	select HAVE_ARCH_SECCOMP_FILTER
 	select HAVE_ARCH_TRACEHOOK
 	select HAVE_ASM_MODVERSIONS
+	select HAVE_CMPXCHG_LOCAL
 	select HAVE_CONTEXT_TRACKING_USER
 	select HAVE_C_RECORDMCOUNT
 	select HAVE_DEBUG_KMEMLEAK