From: guoren@kernel.org To: tj@kernel.org, cl@linux.com, palmer@dabbelt.com, will@kernel.org, catalin.marinas@arm.com, peterz@infradead.org, arnd@arndb.de Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Guo Ren <guoren@linux.alibaba.com>, Guo Ren <guoren@kernel.org> Subject: [RFC PATCH 1/4] vmstat: percpu: Rename HAVE_CMPXCHG_LOCAL to HAVE_CMPXCHG_PERCPU_BYTE Date: Mon, 8 Aug 2022 04:05:57 -0400 [thread overview] Message-ID: <20220808080600.3346843-2-guoren@kernel.org> (raw) In-Reply-To: <20220808080600.3346843-1-guoren@kernel.org> From: Guo Ren <guoren@linux.alibaba.com> The name HAVE_CMPXCHG_LOCAL is confused with using cmpxchg_local, but vmstat needs this_cpu_cmpxchg_1. Rename would clarify the meaning, and maybe we could remove cmpxchg(64)_local API (Only drivers/iommu/intel used) in the future. Signed-off-by: Guo Ren <guoren@linux.alibaba.com> Signed-off-by: Guo Ren <guoren@kernel.org> --- .../features/locking/cmpxchg-local/arch-support.txt | 6 +++--- arch/Kconfig | 2 +- arch/arm64/Kconfig | 2 +- arch/s390/Kconfig | 2 +- arch/x86/Kconfig | 2 +- mm/vmstat.c | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Documentation/features/locking/cmpxchg-local/arch-support.txt b/Documentation/features/locking/cmpxchg-local/arch-support.txt index 8b1a8d9e1c79..4d4c5c2fa66d 100644 --- a/Documentation/features/locking/cmpxchg-local/arch-support.txt +++ b/Documentation/features/locking/cmpxchg-local/arch-support.txt @@ -1,7 +1,7 @@ # -# Feature name: cmpxchg-local -# Kconfig: HAVE_CMPXCHG_LOCAL -# description: arch supports the this_cpu_cmpxchg() API +# Feature name: cmpxchg-percpu-byte +# Kconfig: HAVE_CMPXCHG_PERCPU_BYTE +# description: arch supports the this_cpu_cmpxchg_1() API # ----------------------- | arch |status| diff --git a/arch/Kconfig b/arch/Kconfig index f330410da63a..81800cdfe161 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -471,7 +471,7 @@ config HAVE_ALIGNED_STRUCT_PAGE on a struct page for better performance. However selecting this might increase the size of a struct page by a word. -config HAVE_CMPXCHG_LOCAL +config HAVE_CMPXCHG_PERCPU_BYTE bool config HAVE_CMPXCHG_DOUBLE diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 571cc234d0b3..24a82bdc766a 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -175,7 +175,7 @@ config ARM64 select HAVE_EBPF_JIT select HAVE_C_RECORDMCOUNT select HAVE_CMPXCHG_DOUBLE - select HAVE_CMPXCHG_LOCAL + select HAVE_CMPXCHG_PERCPU_BYTE select HAVE_CONTEXT_TRACKING_USER select HAVE_DEBUG_KMEMLEAK select HAVE_DMA_CONTIGUOUS diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 318fce77601d..ac03af800bf7 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -151,7 +151,7 @@ config S390 select HAVE_ARCH_VMAP_STACK select HAVE_ASM_MODVERSIONS select HAVE_CMPXCHG_DOUBLE - select HAVE_CMPXCHG_LOCAL + select HAVE_CMPXCHG_PERCPU_BYTE select HAVE_DEBUG_KMEMLEAK select HAVE_DMA_CONTIGUOUS select HAVE_DYNAMIC_FTRACE diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index f9920f1341c8..5f4f6df7b89f 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -184,7 +184,7 @@ config X86 select HAVE_ARCH_WITHIN_STACK_FRAMES select HAVE_ASM_MODVERSIONS select HAVE_CMPXCHG_DOUBLE - select HAVE_CMPXCHG_LOCAL + select HAVE_CMPXCHG_PERCPU_BYTE select HAVE_CONTEXT_TRACKING_USER if X86_64 select HAVE_CONTEXT_TRACKING_USER_OFFSTACK if HAVE_CONTEXT_TRACKING_USER select HAVE_C_RECORDMCOUNT diff --git a/mm/vmstat.c b/mm/vmstat.c index 373d2730fcf2..b2fc6d28d3b2 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -554,9 +554,9 @@ void __dec_node_page_state(struct page *page, enum node_stat_item item) } EXPORT_SYMBOL(__dec_node_page_state); -#ifdef CONFIG_HAVE_CMPXCHG_LOCAL +#ifdef CONFIG_HAVE_CMPXCHG_PERCPU_BYTE /* - * If we have cmpxchg_local support then we do not need to incur the overhead + * If we have this_cpu_cmpxchg_1 arch support then we do not need to incur the overhead * that comes with local_irq_save/restore if we use this_cpu_cmpxchg. * * mod_state() modifies the zone counter state through atomic per cpu -- 2.36.1
WARNING: multiple messages have this Message-ID (diff)
From: guoren@kernel.org To: tj@kernel.org, cl@linux.com, palmer@dabbelt.com, will@kernel.org, catalin.marinas@arm.com, peterz@infradead.org, arnd@arndb.de Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Guo Ren <guoren@linux.alibaba.com>, Guo Ren <guoren@kernel.org> Subject: [RFC PATCH 1/4] vmstat: percpu: Rename HAVE_CMPXCHG_LOCAL to HAVE_CMPXCHG_PERCPU_BYTE Date: Mon, 8 Aug 2022 04:05:57 -0400 [thread overview] Message-ID: <20220808080600.3346843-2-guoren@kernel.org> (raw) In-Reply-To: <20220808080600.3346843-1-guoren@kernel.org> From: Guo Ren <guoren@linux.alibaba.com> The name HAVE_CMPXCHG_LOCAL is confused with using cmpxchg_local, but vmstat needs this_cpu_cmpxchg_1. Rename would clarify the meaning, and maybe we could remove cmpxchg(64)_local API (Only drivers/iommu/intel used) in the future. Signed-off-by: Guo Ren <guoren@linux.alibaba.com> Signed-off-by: Guo Ren <guoren@kernel.org> --- .../features/locking/cmpxchg-local/arch-support.txt | 6 +++--- arch/Kconfig | 2 +- arch/arm64/Kconfig | 2 +- arch/s390/Kconfig | 2 +- arch/x86/Kconfig | 2 +- mm/vmstat.c | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Documentation/features/locking/cmpxchg-local/arch-support.txt b/Documentation/features/locking/cmpxchg-local/arch-support.txt index 8b1a8d9e1c79..4d4c5c2fa66d 100644 --- a/Documentation/features/locking/cmpxchg-local/arch-support.txt +++ b/Documentation/features/locking/cmpxchg-local/arch-support.txt @@ -1,7 +1,7 @@ # -# Feature name: cmpxchg-local -# Kconfig: HAVE_CMPXCHG_LOCAL -# description: arch supports the this_cpu_cmpxchg() API +# Feature name: cmpxchg-percpu-byte +# Kconfig: HAVE_CMPXCHG_PERCPU_BYTE +# description: arch supports the this_cpu_cmpxchg_1() API # ----------------------- | arch |status| diff --git a/arch/Kconfig b/arch/Kconfig index f330410da63a..81800cdfe161 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -471,7 +471,7 @@ config HAVE_ALIGNED_STRUCT_PAGE on a struct page for better performance. However selecting this might increase the size of a struct page by a word. -config HAVE_CMPXCHG_LOCAL +config HAVE_CMPXCHG_PERCPU_BYTE bool config HAVE_CMPXCHG_DOUBLE diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 571cc234d0b3..24a82bdc766a 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -175,7 +175,7 @@ config ARM64 select HAVE_EBPF_JIT select HAVE_C_RECORDMCOUNT select HAVE_CMPXCHG_DOUBLE - select HAVE_CMPXCHG_LOCAL + select HAVE_CMPXCHG_PERCPU_BYTE select HAVE_CONTEXT_TRACKING_USER select HAVE_DEBUG_KMEMLEAK select HAVE_DMA_CONTIGUOUS diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 318fce77601d..ac03af800bf7 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -151,7 +151,7 @@ config S390 select HAVE_ARCH_VMAP_STACK select HAVE_ASM_MODVERSIONS select HAVE_CMPXCHG_DOUBLE - select HAVE_CMPXCHG_LOCAL + select HAVE_CMPXCHG_PERCPU_BYTE select HAVE_DEBUG_KMEMLEAK select HAVE_DMA_CONTIGUOUS select HAVE_DYNAMIC_FTRACE diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index f9920f1341c8..5f4f6df7b89f 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -184,7 +184,7 @@ config X86 select HAVE_ARCH_WITHIN_STACK_FRAMES select HAVE_ASM_MODVERSIONS select HAVE_CMPXCHG_DOUBLE - select HAVE_CMPXCHG_LOCAL + select HAVE_CMPXCHG_PERCPU_BYTE select HAVE_CONTEXT_TRACKING_USER if X86_64 select HAVE_CONTEXT_TRACKING_USER_OFFSTACK if HAVE_CONTEXT_TRACKING_USER select HAVE_C_RECORDMCOUNT diff --git a/mm/vmstat.c b/mm/vmstat.c index 373d2730fcf2..b2fc6d28d3b2 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -554,9 +554,9 @@ void __dec_node_page_state(struct page *page, enum node_stat_item item) } EXPORT_SYMBOL(__dec_node_page_state); -#ifdef CONFIG_HAVE_CMPXCHG_LOCAL +#ifdef CONFIG_HAVE_CMPXCHG_PERCPU_BYTE /* - * If we have cmpxchg_local support then we do not need to incur the overhead + * If we have this_cpu_cmpxchg_1 arch support then we do not need to incur the overhead * that comes with local_irq_save/restore if we use this_cpu_cmpxchg. * * mod_state() modifies the zone counter state through atomic per cpu -- 2.36.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2022-08-08 8:06 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-08-08 8:05 [RFC PATCH 0/4] riscv: Add basic percpu operations guoren 2022-08-08 8:05 ` guoren 2022-08-08 8:05 ` guoren [this message] 2022-08-08 8:05 ` [RFC PATCH 1/4] vmstat: percpu: Rename HAVE_CMPXCHG_LOCAL to HAVE_CMPXCHG_PERCPU_BYTE guoren 2022-08-08 9:31 ` Christoph Lameter 2022-08-08 9:31 ` Christoph Lameter 2022-08-09 2:58 ` Guo Ren 2022-08-09 2:58 ` Guo Ren 2022-08-08 8:05 ` [RFC PATCH 2/4] arm64: percpu: Use generic PERCPU_RW_OPS guoren 2022-08-08 8:05 ` guoren 2022-08-08 8:05 ` [RFC PATCH 3/4] riscv: percpu: Implement this_cpu operations guoren 2022-08-08 8:05 ` guoren 2022-08-08 8:06 ` [RFC PATCH 4/4] riscv: cmpxchg: Remove unused cmpxchg(64)_local guoren 2022-08-08 8:06 ` guoren
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=20220808080600.3346843-2-guoren@kernel.org \ --to=guoren@kernel.org \ --cc=arnd@arndb.de \ --cc=catalin.marinas@arm.com \ --cc=cl@linux.com \ --cc=guoren@linux.alibaba.com \ --cc=linux-arch@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-riscv@lists.infradead.org \ --cc=palmer@dabbelt.com \ --cc=peterz@infradead.org \ --cc=tj@kernel.org \ --cc=will@kernel.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.