[PATCH v6 0/6] Add support for FORM2 associativity

2021-07-27 Thread Aneesh Kumar K.V
during boot. * Rework numa distance code based on review feedback. Changes from v3: * Drop PAPR SCM specific changes and depend completely on NUMA distance information. Changes from v2: * Add nvdimm list to Cc: * update PATCH 8 commit message. Changes from v1: * Update FORM2 documentatio

[PATCH v6 1/6] powerpc/pseries: rename min_common_depth to primary_domain_index

2021-07-27 Thread Aneesh Kumar K.V
No functional change in this patch. Reviewed-by: David Gibson Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index

Re: [PATCH v5 4/6] powerpc/pseries: Consolidate different NUMA distance update code paths

2021-07-26 Thread Aneesh Kumar K.V
David Gibson writes: > On Thu, Jul 22, 2021 at 12:37:46PM +0530, Aneesh Kumar K.V wrote: >> David Gibson writes: >> >> > On Mon, Jun 28, 2021 at 08:41:15PM +0530, Aneesh Kumar K.V wrote: > >> > >> >> + nid = of_read_number([index

Re: [PATCH v5 6/6] powerpc/pseries: Add support for FORM2 associativity

2021-07-22 Thread Aneesh Kumar K.V
David Gibson writes: > On Mon, Jun 28, 2021 at 08:41:17PM +0530, Aneesh Kumar K.V wrote: >> PAPR interface currently supports two different ways of communicating >> resource >> grouping details to the OS. These are referred to as Form 0 and Form 1 >> associativity gr

Re: [PATCH v5 5/6] powerpc/pseries: Add a helper for form1 cpu distance

2021-07-22 Thread Aneesh Kumar K.V
David Gibson writes: > On Mon, Jun 28, 2021 at 08:41:16PM +0530, Aneesh Kumar K.V wrote: >> This helper is only used with the dispatch trace log collection. >> A later patch will add Form2 affinity support and this change helps >> in keeping that simpler. Also add a commen

Re: [PATCH v5 4/6] powerpc/pseries: Consolidate different NUMA distance update code paths

2021-07-22 Thread Aneesh Kumar K.V
David Gibson writes: > On Mon, Jun 28, 2021 at 08:41:15PM +0530, Aneesh Kumar K.V wrote: >> The associativity details of the newly added resourced are collected from >> the hypervisor via "ibm,configure-connector" rtas call. Update the numa >> distance details of

Re: [PATCH v5 1/6] powerpc/pseries: rename min_common_depth to primary_domain_index

2021-07-21 Thread Aneesh Kumar K.V
On 7/22/21 8:06 AM, David Gibson wrote: On Thu, Jul 22, 2021 at 11:59:15AM +1000, David Gibson wrote: On Mon, Jun 28, 2021 at 08:41:12PM +0530, Aneesh Kumar K.V wrote: No functional change in this patch. The new name does not match how you describe "primary domain index" in the doc

Re: [PATCH v5 0/6] Add support for FORM2 associativity

2021-07-13 Thread Aneesh Kumar K.V
On 7/13/21 7:57 PM, Daniel Henrique Barboza wrote: Aneesh, This series compiles with a configuration made with "pseries_le_defconfig" but fails with a config based on an existing RHEL8 config. The reason, which is hinted in the robot replies in patch 4, is that you defined a

Re: [PATCH v4 7/7] powerpc/pseries: Add support for FORM2 associativity

2021-06-28 Thread Aneesh Kumar K.V
David Gibson writes: > On Thu, Jun 24, 2021 at 01:50:34PM +0530, Aneesh Kumar K.V wrote: >> David Gibson writes: >> >> > On Thu, Jun 17, 2021 at 10:21:05PM +0530, Aneesh Kumar K.V wrote: >> >> PAPR interface currently supports two different ways of communic

[PATCH v5 6/6] powerpc/pseries: Add support for FORM2 associativity

2021-06-28 Thread Aneesh Kumar K.V
-off-by: Daniel Henrique Barboza Signed-off-by: Aneesh Kumar K.V --- Documentation/powerpc/associativity.rst | 103 ++ arch/powerpc/include/asm/firmware.h | 3 +- arch/powerpc/include/asm/prom.h | 1 + arch/powerpc/kernel/prom_init.c | 3 +- arch

[PATCH v5 5/6] powerpc/pseries: Add a helper for form1 cpu distance

2021-06-28 Thread Aneesh Kumar K.V
This helper is only used with the dispatch trace log collection. A later patch will add Form2 affinity support and this change helps in keeping that simpler. Also add a comment explaining we don't expect the code to be called with FORM0 Reviewed-by: David Gibson Signed-off-by: Aneesh Kumar K.V

[PATCH v5 4/6] powerpc/pseries: Consolidate different NUMA distance update code paths

2021-06-28 Thread Aneesh Kumar K.V
de id from the associativity property, add helpers that can be used during boot which does this only once. Also remove the distance update from node id lookup helpers. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c| 173 +- arch/powerpc/platforms/pseries/hot

[PATCH v5 3/6] powerpc/pseries: Rename TYPE1_AFFINITY to FORM1_AFFINITY

2021-06-28 Thread Aneesh Kumar K.V
Also make related code cleanup that will allow adding FORM2_AFFINITY in later patches. No functional change in this patch. Reviewed-by: David Gibson Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/firmware.h | 4 +-- arch/powerpc/include/asm/prom.h | 2 +- arch

[PATCH v5 2/6] powerpc/pseries: rename distance_ref_points_depth to max_associativity_domain_index

2021-06-28 Thread Aneesh Kumar K.V
No functional change in this patch Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 8365b298ec48..132813dd1a6c 100644 --- a/arch/powerpc/mm

[PATCH v5 1/6] powerpc/pseries: rename min_common_depth to primary_domain_index

2021-06-28 Thread Aneesh Kumar K.V
No functional change in this patch. Reviewed-by: David Gibson Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index

[PATCH v5 0/6] Add support for FORM2 associativity

2021-06-28 Thread Aneesh Kumar K.V
p PAPR SCM specific changes and depend completely on NUMA distance information. Changes from v2: * Add nvdimm list to Cc: * update PATCH 8 commit message. Changes from v1: * Update FORM2 documentation. * rename max_domain_index to max_associativity_domain_index Aneesh Kumar K.V (6): powerpc/pserie

Re: [PATCH v3] mm: pagewalk: Fix walk for hugepage tables

2021-06-28 Thread Aneesh Kumar K.V
Christophe Leroy writes: > Pagewalk ignores hugepd entries and walk down the tables > as if it was traditionnal entries, leading to crazy result. But we do handle hugetlb separately if (vma && is_vm_hugetlb_page(vma)) { if (ops->hugetlb_entry)

Re: [PATCH v4 7/7] powerpc/pseries: Add support for FORM2 associativity

2021-06-24 Thread Aneesh Kumar K.V
On 6/24/21 4:03 PM, Laurent Dufour wrote: Hi Aneesh, A little bit of wordsmithing below... Le 17/06/2021 à 18:51, Aneesh Kumar K.V a écrit : PAPR interface currently supports two different ways of communicating resource grouping details to the OS. These are referred to as Form 0 and Form 1

Re: [PATCH v4 7/7] powerpc/pseries: Add support for FORM2 associativity

2021-06-24 Thread Aneesh Kumar K.V
David Gibson writes: > On Thu, Jun 17, 2021 at 10:21:05PM +0530, Aneesh Kumar K.V wrote: >> PAPR interface currently supports two different ways of communicating >> resource >> grouping details to the OS. These are referred to as Form 0 and Form 1 >> associativity gr

Re: [PATCH v4 7/7] powerpc/pseries: Add support for FORM2 associativity

2021-06-22 Thread Aneesh Kumar K.V
Daniel Henrique Barboza writes: > On 6/17/21 1:51 PM, Aneesh Kumar K.V wrote: >> PAPR interface currently supports two different ways of communicating >> resource >> grouping details to the OS. These are referred to as Form 0 and Form 1 >> associativity grouping.

Re: [RFC PATCH 8/8] powerpc/papr_scm: Use FORM2 associativity details

2021-06-17 Thread Aneesh Kumar K.V
On 6/18/21 1:30 AM, Daniel Henrique Barboza wrote: On 6/17/21 8:11 AM, Aneesh Kumar K.V wrote: Daniel Henrique Barboza writes: On 6/17/21 4:46 AM, David Gibson wrote: On Tue, Jun 15, 2021 at 12:35:17PM +0530, Aneesh Kumar K.V wrote: David Gibson writes: In fact, the more I speak

[PATCH v4 7/7] powerpc/pseries: Add support for FORM2 associativity

2021-06-17 Thread Aneesh Kumar K.V
-off-by: Daniel Henrique Barboza Signed-off-by: Aneesh Kumar K.V --- Documentation/powerpc/associativity.rst | 135 arch/powerpc/include/asm/firmware.h | 3 +- arch/powerpc/include/asm/prom.h | 1 + arch/powerpc/kernel/prom_init.c | 3 +- arch

[PATCH v4 6/7] powerpc/pseries: Add a helper for form1 cpu distance

2021-06-17 Thread Aneesh Kumar K.V
This helper is only used with the dispatch trace log collection. A later patch will add Form2 affinity support and this change helps in keeping that simpler. Also add a comment explaining we don't expect the code to be called with FORM0 Reviewed-by: David Gibson Signed-off-by: Aneesh Kumar K.V

[PATCH v4 5/7] powerpc/pseries: Consolidate NUMA distance update during boot

2021-06-17 Thread Aneesh Kumar K.V
Instead of updating NUMA distance every time we lookup a node id from the associativity property, add helpers that can be used during boot which does this only once. Also remove the distance update from node id lookup helpers. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c | 135

[PATCH v4 4/7] powerpc/pseries: Consolidate DLPAR NUMA distance update

2021-06-17 Thread Aneesh Kumar K.V
or node id from associativity array. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c| 41 +++ arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 + .../platforms/pseries/hotplug-memory.c| 2 + arch/powerpc/platforms/pseries/pseries.h

[PATCH v4 3/7] powerpc/pseries: Rename TYPE1_AFFINITY to FORM1_AFFINITY

2021-06-17 Thread Aneesh Kumar K.V
Also make related code cleanup that will allow adding FORM2_AFFINITY in later patches. No functional change in this patch. Reviewed-by: David Gibson Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/firmware.h | 4 +-- arch/powerpc/include/asm/prom.h | 2 +- arch

[PATCH v4 1/7] powerpc/pseries: rename min_common_depth to primary_domain_index

2021-06-17 Thread Aneesh Kumar K.V
No functional change in this patch. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index f2bf98bdcea2..8365b298ec48 100644

[PATCH v4 2/7] powerpc/pseries: rename distance_ref_points_depth to max_associativity_domain_index

2021-06-17 Thread Aneesh Kumar K.V
No functional change in this patch Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 8365b298ec48..132813dd1a6c 100644 --- a/arch/powerpc/mm

[PATCH v4 0/7] Add support for FORM2 associativity

2021-06-17 Thread Aneesh Kumar K.V
vel/20210616011944.2996399-1-danielhb...@gmail.com/ Changes from v3: * Drop PAPR SCM specific changes and depend completely on NUMA distance information. Changes from v2: * Add nvdimm list to Cc: * update PATCH 8 commit message. Changes from v1: * Update FORM2 documentation. * rename max_domain_index t

Re: [RFC PATCH 8/8] powerpc/papr_scm: Use FORM2 associativity details

2021-06-17 Thread Aneesh Kumar K.V
Aneesh Kumar K.V writes: > David Gibson writes: > >> On Tue, Jun 15, 2021 at 12:35:17PM +0530, Aneesh Kumar K.V wrote: >>> David Gibson writes: >>> >>> > On Tue, Jun 15, 2021 at 11:27:50AM +0530, Aneesh Kumar K.V wrote: >>> >> David Gi

Re: [RFC PATCH 8/8] powerpc/papr_scm: Use FORM2 associativity details

2021-06-17 Thread Aneesh Kumar K.V
David Gibson writes: > On Tue, Jun 15, 2021 at 12:35:17PM +0530, Aneesh Kumar K.V wrote: >> David Gibson writes: >> >> > On Tue, Jun 15, 2021 at 11:27:50AM +0530, Aneesh Kumar K.V wrote: >> >> David Gibson writes: >> >> >> >> > O

Re: [RFC PATCH 8/8] powerpc/papr_scm: Use FORM2 associativity details

2021-06-17 Thread Aneesh Kumar K.V
On 6/17/21 4:41 PM, Aneesh Kumar K.V wrote: Daniel Henrique Barboza writes: On 6/17/21 4:46 AM, David Gibson wrote: On Tue, Jun 15, 2021 at 12:35:17PM +0530, Aneesh Kumar K.V wrote: David Gibson writes: On Tue, Jun 15, 2021 at 11:27:50AM +0530, Aneesh Kumar K.V wrote: David Gibson

Re: [RFC PATCH 8/8] powerpc/papr_scm: Use FORM2 associativity details

2021-06-17 Thread Aneesh Kumar K.V
Daniel Henrique Barboza writes: > On 6/17/21 4:46 AM, David Gibson wrote: >> On Tue, Jun 15, 2021 at 12:35:17PM +0530, Aneesh Kumar K.V wrote: >>> David Gibson writes: >>> >>>> On Tue, Jun 15, 2021 at 11:27:50AM +0530, Aneesh Kumar K.V wrote: >>>&

Re: [RFC PATCH 8/8] powerpc/papr_scm: Use FORM2 associativity details

2021-06-17 Thread Aneesh Kumar K.V
On 6/17/21 1:16 PM, David Gibson wrote: On Tue, Jun 15, 2021 at 12:35:17PM +0530, Aneesh Kumar K.V wrote: David Gibson writes: On Tue, Jun 15, 2021 at 11:27:50AM +0530, Aneesh Kumar K.V wrote: David Gibson writes: ... It's weird to me that you'd want to consider them in different nodes

Re: [RFC PATCH 7/8] powerpc/pseries: Add support for FORM2 associativity

2021-06-17 Thread Aneesh Kumar K.V
On 6/17/21 1:20 PM, David Gibson wrote: On Tue, Jun 15, 2021 at 01:10:27PM +0530, Aneesh Kumar K.V wrote: David Gibson writes: PAPR defines "most significant" as below When the “ibm,architecture-vec-5” property byte 5 bit 0 has the value of one, the “ibm,associativ- ity

[PATCH v3 2/8] powerpc/pseries: rename distance_ref_points_depth to max_associativity_domain_index

2021-06-17 Thread Aneesh Kumar K.V
No functional change in this patch Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 8365b298ec48..132813dd1a6c 100644 --- a/arch/powerpc/mm

[PATCH v3 8/8] powerpc/papr_scm: Use FORM2 associativity details

2021-06-17 Thread Aneesh Kumar K.V
werpc/pseries: Add support for FORM2 associativity" Cc: nvd...@lists.linux.dev Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c| 28 +++ arch/powerpc/platforms/pseries/papr_scm.c | 26 + arch/powerpc/platforms/pseries/pseri

[PATCH v3 7/8] powerpc/pseries: Add support for FORM2 associativity

2021-06-17 Thread Aneesh Kumar K.V
-off-by: Daniel Henrique Barboza Signed-off-by: Aneesh Kumar K.V --- Documentation/powerpc/associativity.rst | 177 ++ arch/powerpc/include/asm/firmware.h | 3 +- arch/powerpc/include/asm/prom.h | 1 + arch/powerpc/kernel/prom_init.c | 3

[PATCH v3 6/8] powerpc/pseries: Add a helper for form1 cpu distance

2021-06-17 Thread Aneesh Kumar K.V
This helper is only used with the dispatch trace log collection. A later patch will add Form2 affinity support and this change helps in keeping that simpler. Also add a comment explaining we don't expect the code to be called with FORM0 Reviewed-by: David Gibson Signed-off-by: Aneesh Kumar K.V

[PATCH v3 5/8] powerpc/pseries: Consolidate NUMA distance update during boot

2021-06-17 Thread Aneesh Kumar K.V
Instead of updating NUMA distance every time we lookup a node id from the associativity property, add helpers that can be used during boot which does this only once. Also remove the distance update from node id lookup helpers. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c | 135

[PATCH v3 4/8] powerpc/pseries: Consolidate DLPAR NUMA distance update

2021-06-17 Thread Aneesh Kumar K.V
or node id from associativity array. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c| 41 +++ arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 + .../platforms/pseries/hotplug-memory.c| 2 + arch/powerpc/platforms/pseries/pseries.h

[PATCH v3 3/8] powerpc/pseries: Rename TYPE1_AFFINITY to FORM1_AFFINITY

2021-06-17 Thread Aneesh Kumar K.V
Also make related code cleanup that will allow adding FORM2_AFFINITY in later patches. No functional change in this patch. Reviewed-by: David Gibson Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/firmware.h | 4 +-- arch/powerpc/include/asm/prom.h | 2 +- arch

[PATCH v3 1/8] powerpc/pseries: rename min_common_depth to primary_domain_index

2021-06-17 Thread Aneesh Kumar K.V
No functional change in this patch. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index f2bf98bdcea2..8365b298ec48 100644

[PATCH v3 0/8] Add support for FORM2 associativity

2021-06-17 Thread Aneesh Kumar K.V
ealloc=yes,mem-path=$PMEM_DISK,share=yes,size=${PMEM_SIZE} \ -device nvdimm,label-size=128K,memdev=memnvdimm1,id=nvdimm1,slot=4,uuid=72511b67-0b3b-42fd-8d1d-5be3cae8bcaa,node=4,device-node=1 Qemu changes can be found at https://lore.kernel.org/qemu-devel/20210616011944.2996399-1-danielhb...@gmail

[PATCH v2 8/8] powerpc/papr_scm: Use FORM2 associativity details

2021-06-17 Thread Aneesh Kumar K.V
FORM2 introduce a concept of secondary domain which is identical to the conceept of FORM1 primary domain. Use secondary domain as the numa node when using persistent memory device. For DAX kmem use the logical domain id introduced in FORM2. This new numa node Signed-off-by: Aneesh Kumar K.V

[PATCH v2 7/8] powerpc/pseries: Add support for FORM2 associativity

2021-06-17 Thread Aneesh Kumar K.V
-off-by: Daniel Henrique Barboza Signed-off-by: Aneesh Kumar K.V --- Documentation/powerpc/associativity.rst | 177 ++ arch/powerpc/include/asm/firmware.h | 3 +- arch/powerpc/include/asm/prom.h | 1 + arch/powerpc/kernel/prom_init.c | 3

[PATCH v2 6/8] powerpc/pseries: Add a helper for form1 cpu distance

2021-06-17 Thread Aneesh Kumar K.V
This helper is only used with the dispatch trace log collection. A later patch will add Form2 affinity support and this change helps in keeping that simpler. Also add a comment explaining we don't expect the code to be called with FORM0 Reviewed-by: David Gibson Signed-off-by: Aneesh Kumar K.V

[PATCH v2 5/8] powerpc/pseries: Consolidate NUMA distance update during boot

2021-06-17 Thread Aneesh Kumar K.V
Instead of updating NUMA distance every time we lookup a node id from the associativity property, add helpers that can be used during boot which does this only once. Also remove the distance update from node id lookup helpers. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c | 135

[PATCH v2 4/8] powerpc/pseries: Consolidate DLPAR NUMA distance update

2021-06-17 Thread Aneesh Kumar K.V
or node id from associativity array. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c| 41 +++ arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 + .../platforms/pseries/hotplug-memory.c| 2 + arch/powerpc/platforms/pseries/pseries.h

[PATCH v2 3/8] powerpc/pseries: Rename TYPE1_AFFINITY to FORM1_AFFINITY

2021-06-17 Thread Aneesh Kumar K.V
Also make related code cleanup that will allow adding FORM2_AFFINITY in later patches. No functional change in this patch. Reviewed-by: David Gibson Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/firmware.h | 4 +-- arch/powerpc/include/asm/prom.h | 2 +- arch

[PATCH v2 2/8] powerpc/pseries: rename distance_ref_points_depth to max_associativity_domain_index

2021-06-17 Thread Aneesh Kumar K.V
No functional change in this patch Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 8365b298ec48..132813dd1a6c 100644 --- a/arch/powerpc/mm

[PATCH v2 1/8] powerpc/pseries: rename min_common_depth to primary_domain_index

2021-06-17 Thread Aneesh Kumar K.V
No functional change in this patch. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index f2bf98bdcea2..8365b298ec48 100644

[PATCH v2 0/8] Add support for FORM2 associativity

2021-06-17 Thread Aneesh Kumar K.V
ealloc=yes,mem-path=$PMEM_DISK,share=yes,size=${PMEM_SIZE} \ -device nvdimm,label-size=128K,memdev=memnvdimm1,id=nvdimm1,slot=4,uuid=72511b67-0b3b-42fd-8d1d-5be3cae8bcaa,node=4,device-node=1 Qemu changes can be found at https://lore.kernel.org/qemu-devel/20210616011944.2996399-1-danielhb...@gmai

Re: [PATCH v2 1/1] powerpc/papr_scm: Properly handle UUID types and API

2021-06-16 Thread Aneesh Kumar K.V
ewer code. The newer one is better? Reviewed-by: Aneesh Kumar K.V Cc: Oliver O'Halloran Cc: Aneesh Kumar K.V Signed-off-by: Andy Shevchenko --- v2: added missed header (Vaibhav), updated comment (Aneesh), rewrite part of the commit message to avoid mentioning the Sparse arch/power

[PATCH v8 3/3] powerpc/mm: Enable HAVE_MOVE_PMD support

2021-06-15 Thread Aneesh Kumar K.V
-aligned mremap time:63886ns Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/platforms/Kconfig.cputype | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index f998e655b570..be8ceb5bece4 100644 --- a/arch

[PATCH v8 2/3] powerpc/book3s64/mm: Update flush_tlb_range to flush page walk cache

2021-06-15 Thread Aneesh Kumar K.V
memory access didn't show any observable performance impact. Signed-off-by: Aneesh Kumar K.V --- .../include/asm/book3s/64/tlbflush-radix.h| 2 + arch/powerpc/mm/book3s64/radix_hugetlbpage.c | 8 +++- arch/powerpc/mm/book3s64/radix_tlb.c | 44 --- 3 files changed

[PATCH v8 1/3] mm/mremap: Allow arch runtime override

2021-06-15 Thread Aneesh Kumar K.V
Architectures like ppc64 support faster mremap only with radix translation. Hence allow a runtime check w.r.t support for fast mremap. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/tlb.h | 6 ++ mm/mremap.c| 15 ++- 2 files changed, 20

[PATCH v8 0/3] Speedup mremap on ppc64

2021-06-15 Thread Aneesh Kumar K.V
test robot * Address review feedback. Changes from v2: * switch from using mmu_gather to flush_pte_tlb_pwc_range() Changes from v1: * Rebase to recent upstream * Fix build issues with tlb_gather_mmu changes Aneesh Kumar K.V (3): mm/mremap: Allow arch runtime override powerpc/book3s64/mm

[PATCH v2 6/6] mm/mremap: hold the rmap lock in write mode when moving page table entries.

2021-06-15 Thread Aneesh Kumar K.V
p mremap by 20x on large regions") Fixes: c49dd3401802 ("mm: speedup mremap on 1GB or larger regions") Link: https://lore.kernel.org/linux-mm/CAHk-=wgxvr04ebntxqfevontwnp6fdm+oj5vauqxp3s-huw...@mail.gmail.com Acked-by: Hugh Dickins Acked-by: Kirill A. Shutemov Signed-off-by: Aneesh K

[PATCH v2 5/6] mm/mremap: Use pmd/pud_poplulate to update page table entries

2021-06-15 Thread Aneesh Kumar K.V
-by: Aneesh Kumar K.V --- mm/mremap.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mm/mremap.c b/mm/mremap.c index 97313e316a4d..72fa0491681e 100644 --- a/mm/mremap.c +++ b/mm/mremap.c @@ -26,6 +26,7 @@ #include #include +#include #include "internal.h"

[PATCH v2 4/6] mm/mremap: Don't enable optimized PUD move if page table levels is 2

2021-06-15 Thread Aneesh Kumar K.V
With two level page table don't enable move_normal_pud. Signed-off-by: Aneesh Kumar K.V --- mm/mremap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/mremap.c b/mm/mremap.c index 958ecdc6f29d..97313e316a4d 100644 --- a/mm/mremap.c +++ b/mm/mremap.c @@ -276,7 +276,7

[PATCH v2 3/6] mm/mremap: Convert huge PUD move to separate helper

2021-06-15 Thread Aneesh Kumar K.V
with CONFIG_HAVE_MOVE_PUD disabled. Signed-off-by: Aneesh Kumar K.V --- mm/mremap.c | 79 - 1 file changed, 72 insertions(+), 7 deletions(-) diff --git a/mm/mremap.c b/mm/mremap.c index 47c255b60150..958ecdc6f29d 100644 --- a/mm/mremap.c +++ b/mm

[PATCH v2 2/6] selftest/mremap_test: Avoid crash with static build

2021-06-15 Thread Aneesh Kumar K.V
With a large mmap map size, we can overlap with the text area and using MAP_FIXED results in unmapping that area. Switch to MAP_FIXED_NOREPLACE and handle the EEXIST error. Reviewed-by: Kalesh Singh Signed-off-by: Aneesh Kumar K.V --- tools/testing/selftests/vm/mremap_test.c | 5 +++-- 1 file

[PATCH v2 1/6] selftest/mremap_test: Update the test to handle pagesize other than 4K

2021-06-15 Thread Aneesh Kumar K.V
Instead of hardcoding 4K page size fetch it using sysconf(). For the performance measurements test still assume 2M and 1G are hugepage sizes. Reviewed-by: Kalesh Singh Signed-off-by: Aneesh Kumar K.V --- tools/testing/selftests/vm/mremap_test.c | 113 --- 1 file changed, 61

[PATCH v2 0/6] mrermap fixes

2021-06-15 Thread Aneesh Kumar K.V
-aneesh.ku...@linux.ibm.com ppc64 specific changes will be sent as a separate series depending on this patchset. Changes from v1: * cc sta...@kernel.org * USe the correct config for TRANSPARENT_HUGEPAGE_PUD * use pud_pgtable instead of pud_page_vaddr Aneesh Kumar K.V (6): selftest/mremap_test

[PATCH v2 1/2] mm: rename pud_page_vaddr to pud_pgtable and make it return pmd_t *

2021-06-15 Thread Aneesh Kumar K.V
-by: Aneesh Kumar K.V --- arch/alpha/include/asm/pgtable.h | 8 +--- arch/arm/include/asm/pgtable-3level.h| 2 +- arch/arm64/include/asm/pgtable.h | 4 ++-- arch/ia64/include/asm/pgtable.h | 2 +- arch/m68k/include/asm/motorola_pgtable.h | 2 +- arch

[PATCH v2 2/2] mm: rename p4d_page_vaddr to p4d_pgtable and make it return pud_t *

2021-06-15 Thread Aneesh Kumar K.V
-by: Aneesh Kumar K.V --- arch/arm64/include/asm/pgtable.h| 4 ++-- arch/ia64/include/asm/pgtable.h | 2 +- arch/mips/include/asm/pgtable-64.h | 4 ++-- arch/powerpc/include/asm/book3s/64/pgtable.h| 5 - arch/powerpc/include/asm/nohash/64/pgtable-4k.h

Re: [RFC PATCH 4/8] powerpc/pseries: Consolidate DLPAR NUMA distance update

2021-06-15 Thread Aneesh Kumar K.V
On 6/15/21 8:43 AM, David Gibson wrote: On Mon, Jun 14, 2021 at 10:09:59PM +0530, Aneesh Kumar K.V wrote: The associativity details of the newly added resourced are collected from the hypervisor via "ibm,configure-connector" rtas call. Update the numa distance details of the newly

Re: [RFC PATCH 2/8] powerpc/pseries: rename distance_ref_points_depth to max_domain_index

2021-06-15 Thread Aneesh Kumar K.V
On 6/15/21 8:31 AM, David Gibson wrote: On Mon, Jun 14, 2021 at 10:09:57PM +0530, Aneesh Kumar K.V wrote: No functional change in this patch As with 1/8 an explanation of what this actually means and therefore why this is a better name would be very helpful. how about

Re: [RFC PATCH 1/8] powerpc/pseries: rename min_common_depth to primary_domain_index

2021-06-15 Thread Aneesh Kumar K.V
On 6/15/21 8:30 AM, David Gibson wrote: On Mon, Jun 14, 2021 at 10:09:56PM +0530, Aneesh Kumar K.V wrote: No functional change in this patch. I think this needs a rationale as to why 'primary_domain_index' is a better name than 'min_common_depth'. The meaning isn't obvious to me from either

Re: [RFC PATCH 7/8] powerpc/pseries: Add support for FORM2 associativity

2021-06-15 Thread Aneesh Kumar K.V
David Gibson writes: > On Tue, Jun 15, 2021 at 10:58:42AM +0530, Aneesh Kumar K.V wrote: >> David Gibson writes: >> >> > On Mon, Jun 14, 2021 at 10:10:02PM +0530, Aneesh Kumar K.V wrote: >> >> Signed-off-by: Daniel Henrique Barboza &

Re: [RFC PATCH 8/8] powerpc/papr_scm: Use FORM2 associativity details

2021-06-15 Thread Aneesh Kumar K.V
David Gibson writes: > On Tue, Jun 15, 2021 at 11:27:50AM +0530, Aneesh Kumar K.V wrote: >> David Gibson writes: >> >> > On Mon, Jun 14, 2021 at 10:10:03PM +0530, Aneesh Kumar K.V wrote: >> >> FORM2 introduce a concept of secondary domain which is iden

Re: [RFC PATCH 8/8] powerpc/papr_scm: Use FORM2 associativity details

2021-06-14 Thread Aneesh Kumar K.V
David Gibson writes: > On Mon, Jun 14, 2021 at 10:10:03PM +0530, Aneesh Kumar K.V wrote: >> FORM2 introduce a concept of secondary domain which is identical to the >> conceept of FORM1 primary domain. Use secondary domain as the numa node >> when using persistent memory dev

Re: [RFC PATCH 7/8] powerpc/pseries: Add support for FORM2 associativity

2021-06-14 Thread Aneesh Kumar K.V
David Gibson writes: > On Mon, Jun 14, 2021 at 10:10:02PM +0530, Aneesh Kumar K.V wrote: >> Signed-off-by: Daniel Henrique Barboza >> Signed-off-by: Aneesh Kumar K.V >> --- >> Documentation/powerpc/associativity.rst | 139 >> ar

[RFC PATCH 1/8] powerpc/pseries: rename min_common_depth to primary_domain_index

2021-06-14 Thread Aneesh Kumar K.V
No functional change in this patch. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index f2bf98bdcea2..8365b298ec48 100644

[RFC PATCH 3/8] powerpc/pseries: Rename TYPE1_AFFINITY to FORM1_AFFINITY

2021-06-14 Thread Aneesh Kumar K.V
Also make related code cleanup that will allow adding FORM2_AFFINITY in later patches. No functional change in this patch. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/firmware.h | 4 +-- arch/powerpc/include/asm/prom.h | 2 +- arch/powerpc/kernel/prom_init.c

[RFC PATCH 8/8] powerpc/papr_scm: Use FORM2 associativity details

2021-06-14 Thread Aneesh Kumar K.V
FORM2 introduce a concept of secondary domain which is identical to the conceept of FORM1 primary domain. Use secondary domain as the numa node when using persistent memory device. For DAX kmem use the logical domain id introduced in FORM2. This new numa node Signed-off-by: Aneesh Kumar K.V

[RFC PATCH 7/8] powerpc/pseries: Add support for FORM2 associativity

2021-06-14 Thread Aneesh Kumar K.V
Signed-off-by: Daniel Henrique Barboza Signed-off-by: Aneesh Kumar K.V --- Documentation/powerpc/associativity.rst | 139 arch/powerpc/include/asm/firmware.h | 3 +- arch/powerpc/include/asm/prom.h | 1 + arch/powerpc/kernel/prom_init.c | 3

[RFC PATCH 6/8] powerpc/pseries: Add a helper for form1 cpu distance

2021-06-14 Thread Aneesh Kumar K.V
This helper is only used with the dispatch trace log collection. A later patch will add Form2 affinity support and this change helps in keeping that simpler. Also add a comment explaining we don't expect the code to be called with FORM0 Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c

[RFC PATCH 5/8] powerpc/pseries: Consolidate NUMA distance update during boot

2021-06-14 Thread Aneesh Kumar K.V
Instead of updating NUMA distance every time we lookup a node id from the associativity property, add helpers that can be used during boot which does this only once. Also remove the distance update from node id lookup helpers. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c | 133

[RFC PATCH 4/8] powerpc/pseries: Consolidate DLPAR NUMA distance update

2021-06-14 Thread Aneesh Kumar K.V
or node id from associativity array. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c| 41 +++ arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 + .../platforms/pseries/hotplug-memory.c| 2 + arch/powerpc/platforms/pseries/pseries.h

[RFC PATCH 2/8] powerpc/pseries: rename distance_ref_points_depth to max_domain_index

2021-06-14 Thread Aneesh Kumar K.V
No functional change in this patch Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 8365b298ec48..5941da201fa3 100644 --- a/arch/powerpc/mm

[RFC PATCH 0/8] Add support for FORM2 associativity

2021-06-14 Thread Aneesh Kumar K.V
ist,src=3,dst=0,val=101 -numa dist,src=3,dst=1,val=121 -numa dist,src=3,dst=2,val=132 -numa dist,src=3,dst=4,val=255 \ -numa dist,src=4,dst=0,val=255 -numa dist,src=4,dst=1,val=255 -numa dist,src=4,dst=2,val=255 -numa dist,src=4,dst=3,val=255 \ -object memory-backend-file,id=memnvdimm1,preall

Re: [mm/mremap] ecf8443e51: vm-scalability.throughput -29.4% regression

2021-06-14 Thread Aneesh Kumar K.V
On 6/14/21 8:25 PM, kernel test robot wrote: Greeting, FYI, we noticed a -29.4% regression of vm-scalability.throughput due to commit: commit: ecf8443e51a862b261313c2319ab4e4aed9e6b7e ("[PATCH v7 02/11] mm/mremap: Fix race between MOVE_PUD mremap and pageout") url:

Re: [PATCH 5/6] mm/mremap: Use pmd/pud_poplulate to update page table entries

2021-06-13 Thread Aneesh Kumar K.V
On 6/13/21 4:20 PM, Matthew Wilcox wrote: On Sun, Jun 13, 2021 at 02:36:13PM +0530, Aneesh Kumar K.V wrote: IIUC the reason why we do have pmd_pgtable() is that pgtable_t type is arch dependent. On some architecture it is pte_t * and on the other struct page *. The reason being highmem

Re: [PATCH 5/6] mm/mremap: Use pmd/pud_poplulate to update page table entries

2021-06-13 Thread Aneesh Kumar K.V
Linus Torvalds writes: > On Thu, Jun 10, 2021 at 1:36 AM Aneesh Kumar K.V > wrote: >> >> @@ -306,8 +306,7 @@ static bool move_normal_pud(struct vm_area_struct *vma, >> unsigned long old_addr, >> >> VM_BUG_ON(!pud_none(*new_pud

[PATCH] powerpc/mm/book3s64: Fix possible build error

2021-06-10 Thread Aneesh Kumar K.V
in __radix_flush_tlb_range_psize which was added by commit e12d6d7d46a6 ("powerpc/mm/radix: mark __radix__flush_tlb_range_psize() as __always_inline") Reviewed-by: Christophe Leroy Acked-by: Michael Ellerman Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/radix_

[PATCH 6/6] mm/mremap: hold the rmap lock in write mode when moving page table entries.

2021-06-10 Thread Aneesh Kumar K.V
regions") Fixes: c49dd3401802 ("mm: speedup mremap on 1GB or larger regions") Link: https://lore.kernel.org/linux-mm/CAHk-=wgxvr04ebntxqfevontwnp6fdm+oj5vauqxp3s-huw...@mail.gmail.com Acked-by: Hugh Dickins Acked-by: Kirill A. Shutemov Signed-off-by: Aneesh Kumar K.V --- mm/mremap

[PATCH 5/6] mm/mremap: Use pmd/pud_poplulate to update page table entries

2021-06-10 Thread Aneesh Kumar K.V
-by: Aneesh Kumar K.V --- mm/mremap.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mm/mremap.c b/mm/mremap.c index 795a7d628b53..dacfa9111ab1 100644 --- a/mm/mremap.c +++ b/mm/mremap.c @@ -26,6 +26,7 @@ #include #include +#include #include "internal.h"

[PATCH 3/6] mm/mremap: Convert huge PUD move to separate helper

2021-06-10 Thread Aneesh Kumar K.V
with CONFIG_HAVE_MOVE_PUD disabled. Signed-off-by: Aneesh Kumar K.V --- mm/mremap.c | 80 - 1 file changed, 73 insertions(+), 7 deletions(-) diff --git a/mm/mremap.c b/mm/mremap.c index 47c255b60150..92ab7d24a587 100644 --- a/mm/mremap.c +++ b/mm

[PATCH 4/6] mm/mremap: Don't enable optimized PUD move if page table levels is 2

2021-06-10 Thread Aneesh Kumar K.V
With two level page table don't enable move_normal_pud. Signed-off-by: Aneesh Kumar K.V --- mm/mremap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/mremap.c b/mm/mremap.c index 92ab7d24a587..795a7d628b53 100644 --- a/mm/mremap.c +++ b/mm/mremap.c @@ -276,7 +276,7

[PATCH 2/6] selftest/mremap_test: Avoid crash with static build

2021-06-10 Thread Aneesh Kumar K.V
With a large mmap map size, we can overlap with the text area and using MAP_FIXED results in unmapping that area. Switch to MAP_FIXED_NOREPLACE and handle the EEXIST error. Reviewed-by: Kalesh Singh Signed-off-by: Aneesh Kumar K.V --- tools/testing/selftests/vm/mremap_test.c | 5 +++-- 1 file

[PATCH 0/6] mremap fixes

2021-06-10 Thread Aneesh Kumar K.V
flush changes. Aneesh Kumar K.V (6): selftest/mremap_test: Update the test to handle pagesize other than 4K selftest/mremap_test: Avoid crash with static build mm/mremap: Convert huge PUD move to separate helper mm/mremap: Don't enable optimized PUD move if page table levels is 2 mm/mremap

[PATCH 1/6] selftest/mremap_test: Update the test to handle pagesize other than 4K

2021-06-10 Thread Aneesh Kumar K.V
Instead of hardcoding 4K page size fetch it using sysconf(). For the performance measurements test still assume 2M and 1G are hugepage sizes. Reviewed-by: Kalesh Singh Signed-off-by: Aneesh Kumar K.V --- tools/testing/selftests/vm/mremap_test.c | 113 --- 1 file changed, 61

Re: [PATCH v7 01/11] mm/mremap: Fix race between MOVE_PMD mremap and pageout

2021-06-08 Thread Aneesh Kumar K.V
On 6/8/21 3:12 PM, Kirill A. Shutemov wrote: On Tue, Jun 08, 2021 at 01:22:23PM +0530, Aneesh Kumar K.V wrote: Hi Hugh, Hugh Dickins writes: On Mon, 7 Jun 2021, Aneesh Kumar K.V wrote: CPU 1 CPU 2 CPU 3 mremap(old_addr

Re: [PATCH v7 01/11] mm/mremap: Fix race between MOVE_PMD mremap and pageout

2021-06-08 Thread Aneesh Kumar K.V
Hi Hugh, Hugh Dickins writes: > On Mon, 7 Jun 2021, Aneesh Kumar K.V wrote: > >> CPU 1CPU 2 >> CPU 3 >> >> mremap(old_addr, new_addr) page_shrinker/try_to_unmap_one &

Re: [PATCH v7 00/11] Speedup mremap on ppc64

2021-06-07 Thread Aneesh Kumar K.V
On 6/7/21 3:40 PM, Nick Piggin wrote: On Monday, 7 June 2021, Aneesh Kumar K.V wrote: This patchset enables MOVE_PMD/MOVE_PUD support on power. This requires the platform to support updating higher-level page tables without updating page table ZjQcmQRYFpfptBannerStart This Message Is From

[PATCH v7 11/11] powerpc/mm: Enable HAVE_MOVE_PMD support

2021-06-06 Thread Aneesh Kumar K.V
-aligned mremap time:63886ns Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/platforms/Kconfig.cputype | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index f998e655b570..be8ceb5bece4 100644 --- a/arch

[PATCH v7 10/11] powerpc/book3s64/mm: Update flush_tlb_range to flush page walk cache

2021-06-06 Thread Aneesh Kumar K.V
memory access didn't show any observable performance impact. Signed-off-by: Aneesh Kumar K.V --- .../include/asm/book3s/64/tlbflush-radix.h| 2 + arch/powerpc/mm/book3s64/radix_hugetlbpage.c | 8 +++- arch/powerpc/mm/book3s64/radix_tlb.c | 44 --- 3 files changed

[PATCH v7 09/11] mm/mremap: Allow arch runtime override

2021-06-06 Thread Aneesh Kumar K.V
Architectures like ppc64 support faster mremap only with radix translation. Hence allow a runtime check w.r.t support for fast mremap. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/tlb.h | 6 ++ mm/mremap.c| 15 ++- 2 files changed, 20

<    1   2   3   4   5   6   7   8   9   10   >