[PATCH] powerpc/doc: Fix htmldocs errors

2021-08-24 Thread Aneesh Kumar K.V
Fix make htmldocs related errors with the newly added associativity.rst doc file. Reported-by: Stephen Rothwell Signed-off-by: Aneesh Kumar K.V --- Documentation/powerpc/associativity.rst | 29 + Documentation/powerpc/index.rst | 1 + 2 files changed, 16

Re: linux-next: build warning after merge of the powerpc tree

2021-08-23 Thread Aneesh Kumar K.V
Stephen Rothwell writes: > Hi all, > > [cc'ing Jon in case he can fix the sphix hang - or knows anything about it] > > On Mon, 23 Aug 2021 19:55:40 +1000 Stephen Rothwell > wrote: >> >> After merging the powerpc tree, today's linux-next build (htmldocs) >> produced this warning: >> > > I

[PATCH v2 1/2] powerpc/book3s64/radix: make tlb_single_page_flush_ceiling a debugfs entry

2021-08-12 Thread Aneesh Kumar K.V
Similar to x86/s390 add a debugfs file to tune tlb_single_page_flush_ceiling. Also add a debugfs entry for tlb_local_single_page_flush_ceiling. Signed-off-by: Aneesh Kumar K.V --- Changes from v1: * switch to debugfs_create_u32 arch/powerpc/mm/book3s64/radix_tlb.c | 16 ++-- 1 file

[PATCH v2 2/2] powerpc: rename powerpc_debugfs_root to arch_debugfs_dir

2021-08-12 Thread Aneesh Kumar K.V
No functional change in this patch. arch_debugfs_dir is the generic kernel name declared in linux/debugfs.h for arch-specific debugfs directory. Architectures like x86/s390 already use the name. Rename powerpc specific powerpc_debugfs_root to arch_debugfs_dir. Signed-off-by: Aneesh Kumar K.V

[PATCH v8 5/5] powerpc/pseries: Add support for FORM2 associativity

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

[PATCH v8 4/5] powerpc/pseries: Add a helper for form1 cpu distance

2021-08-12 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 v8 3/5] powerpc/pseries: Consolidate different NUMA distance update code paths

2021-08-12 Thread Aneesh Kumar K.V
y provided by these device tree properties are very similar and hence can use a helper to parse the node id and numa distance details. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/topology.h | 2 + arch/powerpc/mm/numa.c| 212 +- arch/powerpc

[PATCH v8 2/5] powerpc/pseries: Rename TYPE1_AFFINITY to FORM1_AFFINITY

2021-08-12 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 v8 1/5] powerpc/pseries: rename min_common_depth to primary_domain_index

2021-08-12 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 v8 0/5] Add support for FORM2 associativity

2021-08-12 Thread Aneesh Kumar K.V
evice tree property for now because both Qemu nor PowerVM will provide the distance details of all possible NUMA nodes 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. Ch

Re: [RFC PATCH] powerpc/book3s64/radix: Upgrade va tlbie to PID tlbie if we cross PMD_SIZE

2021-08-12 Thread Aneesh Kumar K.V
mmu()' into tlb flushing and memory freeing parts") This results in the kernel issuing a high number of TLB flushes even for a large range. This can be improved by making sure the kernel switch to pid based flush if the kernel is unmapping a 2M range. Signed-off-by: Aneesh Kumar K.V --- arch

Re: [PATCH] powerpc/book3s64/radix: make tlb_single_page_flush_ceiling a debugfs entry

2021-08-12 Thread Aneesh Kumar K.V
On 8/12/21 12:58 PM, Michael Ellerman wrote: Christophe Leroy writes: Le 10/08/2021 à 06:53, Aneesh Kumar K.V a écrit : Similar to x86/s390 add a debugfs file to tune tlb_single_page_flush_ceiling. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/radix_tlb.c | 48

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

2021-08-11 Thread Aneesh Kumar K.V
On 8/12/21 7:11 AM, David Gibson wrote: On Wed, Aug 11, 2021 at 09:39:32AM +0530, Aneesh Kumar K.V wrote: David Gibson writes: On Mon, Aug 09, 2021 at 10:54:33AM +0530, Aneesh Kumar K.V wrote: PAPR interface currently supports two different ways of communicating resource grouping details

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

2021-08-10 Thread Aneesh Kumar K.V
David Gibson writes: > On Mon, Aug 09, 2021 at 10:54:33AM +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

[PATCH] powerpc: rename powerpc_debugfs_root to arch_debugfs_dir

2021-08-09 Thread Aneesh Kumar K.V
No functional change in this patch. arch_debugfs_dir is the generic kernel name declared in linux/debugfs.h for arch-specific debugfs directory. Architectures like x86/s390 already use the name. Rename powerpc specific powerpc_debugfs_root to arch_debugfs_dir. Signed-off-by: Aneesh Kumar K.V

[PATCH] powerpc/book3s64/radix: make tlb_single_page_flush_ceiling a debugfs entry

2021-08-09 Thread Aneesh Kumar K.V
Similar to x86/s390 add a debugfs file to tune tlb_single_page_flush_ceiling. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/radix_tlb.c | 48 1 file changed, 48 insertions(+) diff --git a/arch/powerpc/mm/book3s64/radix_tlb.c b/arch/powerpc/mm

[PATCH v7 6/6] powerpc/pseries: Consolidate form1 distance initialization into a helper

2021-08-08 Thread Aneesh Kumar K.V
Currently, we duplicate parsing code for ibm,associativity and ibm,associativity-lookup-arrays in the kernel. The associativity array provided by these device tree properties are very similar and hence can use a helper to parse the node id and numa distance details. Signed-off-by: Aneesh Kumar

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

2021-08-08 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 v7 4/6] powerpc/pseries: Add a helper for form1 cpu distance

2021-08-08 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 v7 3/6] powerpc/pseries: Consolidate different NUMA distance update code paths

2021-08-08 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/include/asm/topology.h | 2 + arch/powerpc/mm/numa.c

[PATCH v7 2/6] powerpc/pseries: Rename TYPE1_AFFINITY to FORM1_AFFINITY

2021-08-08 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 v7 1/6] powerpc/pseries: rename min_common_depth to primary_domain_index

2021-08-08 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 v7 0/6] Add support for FORM2 associativity

2021-08-08 Thread Aneesh Kumar K.V
istance details of all possible NUMA nodes 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

Re: [PATCH v6 6/6] powerpc/pseries: Consolidate form1 distance initialization into a helper

2021-08-06 Thread Aneesh Kumar K.V
On 8/6/21 12:17 PM, David Gibson wrote: On Tue, Jul 27, 2021 at 03:33:11PM +0530, Aneesh Kumar K.V wrote: Currently, we duplicate parsing code for ibm,associativity and ibm,associativity-lookup-arrays in the kernel. The associativity array provided by these device tree properties are very

[RFC PATCH] powerpc/book3s64/radix: Upgrade va tlbie to PID tlbie if we cross PMD_SIZE

2021-08-03 Thread Aneesh Kumar K.V
igh number of TLB flushes even for a large range. This can be improved by making sure the kernel switch to pid based flush if the kernel is unmapping a 2M range. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/radix_tlb.c | 8 1 file changed, 4 insertions(+), 4 deletions(-)

[PATCH v6 4/6] powerpc/pseries: Add a helper for form1 cpu distance

2021-07-27 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 v6 5/6] powerpc/pseries: Add support for FORM2 associativity

2021-07-27 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 v6 2/6] powerpc/pseries: Rename TYPE1_AFFINITY to FORM1_AFFINITY

2021-07-27 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 v6 6/6] powerpc/pseries: Consolidate form1 distance initialization into a helper

2021-07-27 Thread Aneesh Kumar K.V
Currently, we duplicate parsing code for ibm,associativity and ibm,associativity-lookup-arrays in the kernel. The associativity array provided by these device tree properties are very similar and hence can use a helper to parse the node id and numa distance details. Signed-off-by: Aneesh Kumar

[PATCH v6 3/6] powerpc/pseries: Consolidate different NUMA distance update code paths

2021-07-27 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/include/asm/topology.h | 2 + arch/powerpc/mm/numa.c

[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

  1   2   3   4   5   6   7   8   9   10   >