lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAhV-H7+Wf+tUBNs4-NASaJX0jzHjLN8r6Yq0yesTRqhsvUrww@mail.gmail.com>
Date: Tue, 6 May 2025 10:02:05 +0800
From: Huacai Chen <chenhuacai@...nel.org>
To: Yuquan Wang <wangyuquan1236@...tium.com.cn>
Cc: Mike Rapoport <rppt@...nel.org>, Huacai Chen <chenhuacai@...ngson.cn>, loongarch@...ts.linux.dev, 
	Xuefeng Li <lixuefeng@...ngson.cn>, Guo Ren <guoren@...nel.org>, 
	Xuerui Wang <kernel@...0n.name>, Jiaxun Yang <jiaxun.yang@...goat.com>, 
	linux-kernel@...r.kernel.org, Binbin Zhou <zhoubinbin@...ngson.cn>
Subject: Re: [PATCH V2] LoongArch: Introduce the numa_memblks conversion

Hi, Yuquan,

On Tue, May 6, 2025 at 9:29 AM Yuquan Wang
<wangyuquan1236@...tium.com.cn> wrote:
>
> On Sat, Apr 19, 2025 at 03:57:16PM +0800, Huacai Chen wrote:
> > Hi, Mike,
> >
> > On Sat, Apr 19, 2025 at 3:48 PM Mike Rapoport <rppt@...nel.org> wrote:
> > >
> > > Hi Huacai,
> > >
> > > On Tue, Apr 15, 2025 at 03:21:18PM +0800, Huacai Chen wrote:
> > > > Commit 87482708210ff3333a ("mm: introduce numa_memblks") has moved
> > > > numa_memblks from x86 to the generic code, but LoongArch was left out
> > > > of this conversion.
> > > >
> > > > This patch introduces the generic numa_memblks for LoongArch.
> > > >
> > > > In detail:
> > > > 1. Enable NUMA_MEMBLKS (but disable NUMA_EMU) in Kconfig;
> > > > 2. Use generic definition for numa_memblk and numa_meminfo;
> > > > 3. Use generic implementation for numa_add_memblk() and its friends;
> > > > 4. Use generic implementation for numa_set_distance() and its friends;
> > > > 5. Use generic implementation for memory_add_physaddr_to_nid() and its
> > > >    friends.
> > > >
> > > > Note: Disable NUMA_EMU because it needs more efforts and no obvious
> > > > demand now.
> > > >
> > > > Tested-by: Binbin Zhou <zhoubinbin@...ngson.cn>
> > > > Signed-off-by: Yuquan Wang <wangyuquan1236@...tium.com.cn>
> > > > Signed-off-by: Huacai Chen <chenhuacai@...ngson.cn>
> > > > ---
> > > >  arch/loongarch/Kconfig                 |   1 +
> > > >  arch/loongarch/include/asm/numa.h      |  14 ----
> > > >  arch/loongarch/include/asm/sparsemem.h |   5 --
> > > >  arch/loongarch/include/asm/topology.h  |   7 +-
> > > >  arch/loongarch/kernel/acpi.c           |  11 ---
> > > >  arch/loongarch/kernel/numa.c           | 108 +++----------------------
> > > >  arch/loongarch/mm/init.c               |   8 --
> > > >  mm/Kconfig                             |   1 +
> > > >  8 files changed, 16 insertions(+), 139 deletions(-)
> > >
> > > This is really cool simplification!
> > >
> > > I wonder if maybe we can take a step or two further and make loongarch to
> > > share more code with other architectures.
> > >
> > > Is there a strong reason not to call numa_memblks_init() from
> > > init_numa_memory()?
> > > And more broadly, maybe loongarch can be even switched to arch_numa?
> > This is a minimal change for Yuquan, I will make it in linux-next as
> > soon as possible so Yuquan can continue his work.
> >
> Hi, Huacai & Mike
>
> Where could I know this has been merged in linux-next? After that, should I
> re-push my commit "introduce numa_add_reserved_memblk"?
Now this patch is in linux-next.
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20250505&id=cb49fa125c0115824233ee3ef167af6c5c8b23db

Huacai

>
> Sorry for my unfamiliarity with the community rules.
>
> Yuquan
> > Switching to numa_memblks_init() or arch_numa will be done in future,
> > but need some time because some machines seem to need some hacks.
> >
> > Huacai
> >
> > >
> > > --
> > > Sincerely yours,
> > > Mike.
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ