From: Dennis Zhou <dennis@kernel.org>
To: Alexandre Ghiti <alexghiti@rivosinc.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Andrey Ryabinin <ryabinin.a.a@gmail.com>,
Alexander Potapenko <glider@google.com>,
Andrey Konovalov <andreyknvl@gmail.com>,
Dmitry Vyukov <dvyukov@google.com>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
Arnd Bergmann <arnd@arndb.de>, Tejun Heo <tj@kernel.org>,
Christoph Lameter <cl@linux.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
kasan-dev@googlegroups.com, linux-arch@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [PATCH v2 0/2] riscv: Enable percpu page first chunk allocator
Date: Thu, 14 Dec 2023 00:40:58 -0800 [thread overview]
Message-ID: <ZXq/msjihOEZAo3w@snowbird> (raw)
In-Reply-To: <20231212213457.132605-1-alexghiti@rivosinc.com>
Hello,
On Tue, Dec 12, 2023 at 10:34:55PM +0100, Alexandre Ghiti wrote:
> While working with pcpu variables, I noticed that riscv did not support
> first chunk allocation in the vmalloc area which may be needed as a fallback
> in case of a sparse NUMA configuration.
>
> patch 1 starts by introducing a new function flush_cache_vmap_early() which
> is needed since a new vmalloc mapping is established and directly accessed:
> on riscv, this would likely fail in case of a reordered access or if the
> uarch caches invalid entries in TLB.
> Note that most architectures do not include asm-generic/cacheflush.h so to
> avoid build failures, this patch implements the new function on each of
> those architectures. For all architectures except riscv, this new function
> is implemented as a no-op to keep the existing behaviour but it likely
> needs another implementation.
>
> patch 2 simply enables the page percpu first chunk allocator in riscv.
>
> Changes in v2:
> - Rebase on top of 6.7
> - Define flush_cache_vmap_early() for all architectures that do
> not include <asm-generic/cacheflush.h> to avoid build failures
>
> Alexandre Ghiti (2):
> mm: Introduce flush_cache_vmap_early()
> riscv: Enable pcpu page first chunk allocator
>
> arch/arc/include/asm/cacheflush.h | 1 +
> arch/arm/include/asm/cacheflush.h | 2 ++
> arch/csky/abiv1/inc/abi/cacheflush.h | 1 +
> arch/csky/abiv2/inc/abi/cacheflush.h | 1 +
> arch/m68k/include/asm/cacheflush_mm.h | 1 +
> arch/mips/include/asm/cacheflush.h | 2 ++
> arch/nios2/include/asm/cacheflush.h | 1 +
> arch/parisc/include/asm/cacheflush.h | 1 +
> arch/riscv/Kconfig | 2 ++
> arch/riscv/include/asm/cacheflush.h | 3 ++-
> arch/riscv/include/asm/tlbflush.h | 1 +
> arch/riscv/mm/kasan_init.c | 8 ++++++++
> arch/riscv/mm/tlbflush.c | 5 +++++
> arch/sh/include/asm/cacheflush.h | 1 +
> arch/sparc/include/asm/cacheflush_32.h | 1 +
> arch/sparc/include/asm/cacheflush_64.h | 1 +
> arch/xtensa/include/asm/cacheflush.h | 6 ++++--
> include/asm-generic/cacheflush.h | 6 ++++++
> mm/percpu.c | 8 +-------
> 19 files changed, 42 insertions(+), 10 deletions(-)
>
> --
> 2.39.2
>
Thanks for the quick v2. Applied to percpu#for-6.8.
Thanks,
Dennis
next prev parent reply other threads:[~2023-12-14 8:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-12 21:34 Alexandre Ghiti
2023-12-12 21:34 ` [PATCH v2 1/2] mm: Introduce flush_cache_vmap_early() Alexandre Ghiti
2023-12-13 8:36 ` Geert Uytterhoeven
2023-12-12 21:34 ` [PATCH v2 2/2] riscv: Enable pcpu page first chunk allocator Alexandre Ghiti
2023-12-14 8:40 ` Dennis Zhou [this message]
2024-01-20 21:09 ` [PATCH v2 0/2] riscv: Enable percpu " patchwork-bot+linux-riscv
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=ZXq/msjihOEZAo3w@snowbird \
--to=dennis@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=alexghiti@rivosinc.com \
--cc=andreyknvl@gmail.com \
--cc=aou@eecs.berkeley.edu \
--cc=arnd@arndb.de \
--cc=cl@linux.com \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=ryabinin.a.a@gmail.com \
--cc=tj@kernel.org \
--cc=vincenzo.frascino@arm.com \
/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