Re: [PATCH v3 07/26] mm: drop CONFIG_HAVE_ARCH_NODEDATA_EXTENSION

2024-08-02 Thread Jonathan Cameron
On Thu, 1 Aug 2024 09:08:07 +0300 Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > There are no users of HAVE_ARCH_NODEDATA_EXTENSION left, so > arch_alloc_nodedata() and arch_refresh_nodedata() are not needed > anymore. > > Replace the call to arch_alloc_nodedata() in free_area_i

Re: [PATCH v3 09/26] arch, mm: pull out allocation of NODE_DATA to generic code

2024-08-02 Thread Jonathan Cameron
On Thu, 1 Aug 2024 09:08:09 +0300 Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > Architectures that support NUMA duplicate the code that allocates > NODE_DATA on the node-local memory with slight variations in reporting > of the addresses where the memory was allocated. > > Use

Re: [PATCH v3 10/26] x86/numa: simplify numa_distance allocation

2024-08-02 Thread Jonathan Cameron
On Thu, 1 Aug 2024 09:08:10 +0300 Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > Allocation of numa_distance uses memblock_phys_alloc_range() to limit > allocation to be below the last mapped page. > > But NUMA initializaition runs after the direct map is populated and > there i

Re: [PATCH v3 17/26] mm: introduce numa_memblks

2024-08-02 Thread Jonathan Cameron
On Thu, 1 Aug 2024 09:08:17 +0300 Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > Move code dealing with numa_memblks from arch/x86 to mm/ and add Kconfig > options to let x86 select it in its Kconfig. > > This code will be later reused by arch_numa. > > No functional changes. >

Re: [PATCH v3 18/26] mm: move numa_distance and related code from x86 to numa_memblks

2024-08-02 Thread Jonathan Cameron
On Thu, 1 Aug 2024 09:08:18 +0300 Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > Move code dealing with numa_distance array from arch/x86 to > mm/numa_memblks.c > > This code will be later reused by arch_numa. > > No functional changes. > > Signed-off-by: Mike Rapoport (Micros

Re: [PATCH v3 11/26] x86/numa: use get_pfn_range_for_nid to verify that node spans memory

2024-08-02 Thread Jonathan Cameron
On Thu, 1 Aug 2024 09:08:11 +0300 Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > Instead of looping over numa_meminfo array to detect node's start and > end addresses use get_pfn_range_for_init(). > > This is shorter and make it easier to lift numa_memblks to generic code. > >

Re: [PATCH v3 20/26] mm: numa_memblks: introduce numa_memblks_init

2024-08-02 Thread Jonathan Cameron
On Thu, 1 Aug 2024 09:08:20 +0300 Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > Move most of x86::numa_init() to numa_memblks so that the latter will be > more self-contained. > > With this numa_memblk data structures should not be exposed to the > architecture specific code. >

Re: [PATCH v3 21/26] mm: numa_memblks: make several functions and variables static

2024-08-02 Thread Jonathan Cameron
On Thu, 1 Aug 2024 09:08:21 +0300 Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > Make functions and variables that are exclusively used by numa_memblks > static. > > Move numa_nodemask_from_meminfo() before its callers to avoid forward > declaration. > > Signed-off-by: Mike Rap

Re: [PATCH v3 22/26] mm: numa_memblks: use memblock_{start,end}_of_DRAM() when sanitizing meminfo

2024-08-02 Thread Jonathan Cameron
On Thu, 1 Aug 2024 09:08:22 +0300 Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > numa_cleanup_meminfo() moves blocks outside system RAM to > numa_reserved_meminfo and it uses 0 and PFN_PHYS(max_pfn) to determine > the memory boundaries. > > Replace the memory range boundaries wi

Re: [PATCH v3 19/26] mm: introduce numa_emulation

2024-08-02 Thread Jonathan Cameron
On Thu, 1 Aug 2024 09:08:19 +0300 Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > Move numa_emulation codfrom arch/x86 to mm/numa_emulation.c > > This code will be later reused by arch_numa. > > No functional changes. > > Signed-off-by: Mike Rapoport (Microsoft) > Tested-by: Z

Re: [PATCH v3 23/26] of, numa: return -EINVAL when no numa-node-id is found

2024-08-02 Thread Jonathan Cameron
On Thu, 1 Aug 2024 09:08:23 +0300 Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > Currently of_numa_parse_memory_nodes() returns 0 if no "memory" node in > device tree contains "numa-node-id" property. This makes of_numa_init() > to return "success" despite no NUMA nodes were actu

Re: [PATCH v3 24/26] arch_numa: switch over to numa_memblks

2024-08-02 Thread Jonathan Cameron
On Thu, 1 Aug 2024 09:08:24 +0300 Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > Until now arch_numa was directly translating firmware NUMA information > to memblock. > > Using numa_memblks as an intermediate step has a few advantages: > * alignment with more battle tested x86 i

Re: [PATCH v3 26/26] docs: move numa=fake description to kernel-parameters.txt

2024-08-02 Thread Jonathan Cameron
On Thu, 1 Aug 2024 09:08:26 +0300 Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > NUMA emulation can be now enabled on arm64 and riscv in addition to x86. > > Move description of numa=fake parameters from x86 documentation of > admin-guide/kernel-parameters.txt > > Suggested-by:

Re: [PATCH v3 00/26] mm: introduce numa_memblks

2024-08-02 Thread Jonathan Cameron
On Thu, 1 Aug 2024 09:08:00 +0300 Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > Hi, > > Following the discussion about handling of CXL fixed memory windows on > arm64 [1] I decided to bite the bullet and move numa_memblks from x86 to > the generic code so they will be available

Re: [PATCH v13] mm: report per-page metadata information

2024-08-02 Thread Alison Schofield
++ nvdimm, linux-cxl, Yu Zhang On Wed, Jun 05, 2024 at 10:27:51PM +, Sourav Panda wrote: > Today, we do not have any observability of per-page metadata > and how much it takes away from the machine capacity. Thus, > we want to describe the amount of memory that is going towards > per-page meta