Re: [RFC PATCH v2 00/19] Try to reduce lock contention on the SMMUv3 command queue

2019-07-18 Thread Ganapatrao Kulkarni
un iperf with more than 64 clients(-P 64). However I have not noticed any measurable performance improvement in iperf results. IMO, this might/should help in performance improvement of IO intensive workloads. FWIW, you can add, Tested-by: Ganapatrao Kulkarni > > Cheers, > > Will > &g

Re: [PATCH] iommu/dma: Use NUMA aware memory allocations in __iommu_dma_alloc_pages()

2018-11-20 Thread Ganapatrao Kulkarni
nder on this patch. > > Thanks > > > Originally-from: Ganapatrao Kulkarni > > Signed-off-by: John Garry > > --- > > > > This patch was originally posted by Ganapatrao in [1] *. > > > > However, after initial review, it was never reposted (due to lack of >

Re: [PATCH v4] iommu/iova: Optimise attempts to allocate iova from 32bit address range

2018-09-18 Thread Ganapatrao Kulkarni
Hi Joerg, can you please pull this patch? On Wed, Sep 5, 2018 at 9:58 AM Ganapatrao Kulkarni wrote: > > As an optimisation for PCI devices, there is always first attempt > been made to allocate iova from SAC address range. This will lead > to unnecessary attempts, when there are no

[PATCH v4] iommu/iova: Optimise attempts to allocate iova from 32bit address range

2018-09-04 Thread Ganapatrao Kulkarni
size is lesser than a failed size. The size is updated when any replenish happens. Reviewed-by: Robin Murphy Signed-off-by: Ganapatrao Kulkarni --- v4: Rebsaed to 4.19-rc2 v3: Update with comments [3] from Robin Murphy [3] https://lkml.org/lkml/2018/8/13/116 v2: update with comments [2

Re: [PATCH 0/4] numa, iommu/smmu: IOMMU/SMMU driver optimization for NUMA systems

2018-08-22 Thread Ganapatrao Kulkarni
On Wed, Aug 22, 2018 at 9:08 AM John Garry wrote: > > On 22/08/2018 15:56, Robin Murphy wrote: > > Hi John, > > > > On 22/08/18 14:44, John Garry wrote: > >> On 21/09/2017 09:59, Ganapatrao Kulkarni wrote: > >>> Adding numa aware memory allocations u

[PATCH v3] iommu/iova: Optimise attempts to allocate iova from 32bit address range

2018-08-13 Thread Ganapatrao Kulkarni
size is lesser than a failed size. The size is updated when any replenish happens. Signed-off-by: Ganapatrao Kulkarni --- v3: Update with comments [3] from Robin Murphy [3] https://lkml.org/lkml/2018/8/13/116 v2: update with comments [2] from Robin Murphy [2] https://lkml.org/lkml/2018/8

[PATCH v2] iommu/iova: Optimise attempts to allocate iova from 32bit address range

2018-08-13 Thread Ganapatrao Kulkarni
size is lesser than a failed size. The size is updated when any replenish happens. Signed-off-by: Ganapatrao Kulkarni --- v2: update with comments [2] from Robin Murphy [2] https://lkml.org/lkml/2018/8/7/166 v1: Based on comments from Robin Murphy for patch [1] [1] https://lkml.org/lkml/2018

Re: [PATCH] iommu/iova: Optimise attempts to allocate iova from 32bit address range

2018-08-10 Thread Ganapatrao Kulkarni
On Fri, Aug 10, 2018 at 3:19 PM, Robin Murphy wrote: > On 10/08/18 10:24, Ganapatrao Kulkarni wrote: >> >> Hi Robin, >> >> On Fri, Aug 10, 2018 at 2:13 AM, Robin Murphy >> wrote: >>> >>> On 2018-08-09 6:49 PM, Ganapatrao Kulkarni wrote: >>

Re: [PATCH] iommu/iova: Optimise attempts to allocate iova from 32bit address range

2018-08-10 Thread Ganapatrao Kulkarni
Hi Robin, On Fri, Aug 10, 2018 at 2:13 AM, Robin Murphy wrote: > On 2018-08-09 6:49 PM, Ganapatrao Kulkarni wrote: >> >> Hi Robin, >> >> On Thu, Aug 9, 2018 at 9:54 PM, Robin Murphy wrote: >>> >>> On 07/08/18 09:54, Ganapatrao Kulkarni wrote: >

Re: [PATCH] iommu/iova: Optimise attempts to allocate iova from 32bit address range

2018-08-09 Thread Ganapatrao Kulkarni
Hi Robin, On Thu, Aug 9, 2018 at 9:54 PM, Robin Murphy wrote: > On 07/08/18 09:54, Ganapatrao Kulkarni wrote: >> >> As an optimisation for PCI devices, there is always first attempt >> been made to allocate iova from SAC address range. This will lead >> to unnecess

[PATCH] iommu/iova: Optimise attempts to allocate iova from 32bit address range

2018-08-07 Thread Ganapatrao Kulkarni
further attempts until replenish happens. Signed-off-by: Ganapatrao Kulkarni --- This patch is based on comments from Robin Murphy for patch [1] [1] https://lkml.org/lkml/2018/4/19/780 drivers/iommu/iova.c | 11 ++- include/linux/iova.h | 1 + 2 files changed, 11 insertions(+), 1

Re: [PATCH] iommu/iova: Update cached node pointer when current node fails to get any free IOVA

2018-07-30 Thread Ganapatrao Kulkarni
Hi Robin, On Mon, Jul 30, 2018 at 12:40 PM, Ganapatrao Kulkarni wrote: > On Fri, Jul 27, 2018 at 9:48 PM, Robin Murphy wrote: >> On 27/07/18 13:56, Ganapatrao Kulkarni wrote: >> [...] >>>>> >>>>> did you get any chance to look in to this issue? >

Re: [PATCH] iommu/iova: Update cached node pointer when current node fails to get any free IOVA

2018-07-30 Thread Ganapatrao Kulkarni
On Fri, Jul 27, 2018 at 9:48 PM, Robin Murphy wrote: > On 27/07/18 13:56, Ganapatrao Kulkarni wrote: > [...] >>>> >>>> did you get any chance to look in to this issue? >>>> i am waiting for your suggestion/patch for this issue! >>> >>&g

Re: [PATCH] iommu/iova: Update cached node pointer when current node fails to get any free IOVA

2018-07-27 Thread Ganapatrao Kulkarni
Hi Robin, On Wed, Jul 25, 2018 at 7:50 PM, Robin Murphy wrote: > On 12/07/18 08:45, Ganapatrao Kulkarni wrote: >> >> Hi Robin, >> >> >> On Mon, Jun 4, 2018 at 9:36 AM, Ganapatrao Kulkarni >> wrote: >>> >>> ping?? >>> &

Re: [PATCH] iommu/iova: Update cached node pointer when current node fails to get any free IOVA

2018-07-12 Thread Ganapatrao Kulkarni
Hi Robin, On Mon, Jun 4, 2018 at 9:36 AM, Ganapatrao Kulkarni wrote: > ping?? > > On Mon, May 21, 2018 at 6:45 AM, Ganapatrao Kulkarni > wrote: >> On Thu, Apr 26, 2018 at 3:15 PM, Ganapatrao Kulkarni >> wrote: >>> Hi Robin, >>> >>> On

Re: [PATCH] iommu/iova: Update cached node pointer when current node fails to get any free IOVA

2018-06-03 Thread Ganapatrao Kulkarni
ping?? On Mon, May 21, 2018 at 6:45 AM, Ganapatrao Kulkarni wrote: > On Thu, Apr 26, 2018 at 3:15 PM, Ganapatrao Kulkarni > wrote: >> Hi Robin, >> >> On Mon, Apr 23, 2018 at 11:11 PM, Ganapatrao Kulkarni >> wrote: >>> On Mon, Apr 23, 2018 at 10:07 PM, R

Re: [PATCH] iommu/iova: Update cached node pointer when current node fails to get any free IOVA

2018-05-20 Thread Ganapatrao Kulkarni
On Thu, Apr 26, 2018 at 3:15 PM, Ganapatrao Kulkarni wrote: > Hi Robin, > > On Mon, Apr 23, 2018 at 11:11 PM, Ganapatrao Kulkarni > wrote: >> On Mon, Apr 23, 2018 at 10:07 PM, Robin Murphy wrote: >>> On 19/04/18 18:12, Ganapatrao Kulkarni wrote: >>>> >

Re: [PATCH] iommu/iova: Update cached node pointer when current node fails to get any free IOVA

2018-04-26 Thread Ganapatrao Kulkarni
Hi Robin, On Mon, Apr 23, 2018 at 11:11 PM, Ganapatrao Kulkarni wrote: > On Mon, Apr 23, 2018 at 10:07 PM, Robin Murphy wrote: >> On 19/04/18 18:12, Ganapatrao Kulkarni wrote: >>> >>> The performance drop is observed with long hours iperf testing using 40G >>&g

Re: [PATCH] iommu/iova: Update cached node pointer when current node fails to get any free IOVA

2018-04-23 Thread Ganapatrao Kulkarni
On Mon, Apr 23, 2018 at 10:07 PM, Robin Murphy wrote: > On 19/04/18 18:12, Ganapatrao Kulkarni wrote: >> >> The performance drop is observed with long hours iperf testing using 40G >> cards. This is mainly due to long iterations in finding the free iova >> range in 32

[PATCH] iommu/iova: Update cached node pointer when current node fails to get any free IOVA

2018-04-19 Thread Ganapatrao Kulkarni
update cached32_node to itself. From now on, walking over 32-bit range is more expensive. This patch adds fix to update cached node to leaf node when there are no iova free range left, which avoids unnecessary long iterations. Signed-off-by: Ganapatrao Kulkarni --- drivers/iommu/iova.c | 6 ++ 1

Re: [PATCH 3/4] iommu/arm-smmu-v3: Use NUMA memory allocations for stream tables and comamnd queues

2017-11-06 Thread Ganapatrao Kulkarni
On Wed, Oct 18, 2017 at 7:06 PM, Robin Murphy wrote: > On 04/10/17 14:53, Ganapatrao Kulkarni wrote: >> Hi Robin, >> >> >> On Thu, Sep 21, 2017 at 5:28 PM, Robin Murphy wrote: >>> [+Christoph and Marek] >>> >>> On 21/09/17 09:59, Ganapatrao

Re: [PATCH 3/4] iommu/arm-smmu-v3: Use NUMA memory allocations for stream tables and comamnd queues

2017-10-04 Thread Ganapatrao Kulkarni
Hi Robin, On Thu, Sep 21, 2017 at 5:28 PM, Robin Murphy wrote: > [+Christoph and Marek] > > On 21/09/17 09:59, Ganapatrao Kulkarni wrote: >> Introduce smmu_alloc_coherent and smmu_free_coherent functions to >> allocate/free dma coherent memory from NUMA node associated with

Re: [PATCH 4/4] iommu/dma, numa: Use NUMA aware memory allocations in __iommu_dma_alloc_pages

2017-09-22 Thread Ganapatrao Kulkarni
Hi Robin, On Thu, Sep 21, 2017 at 5:11 PM, Robin Murphy wrote: > On 21/09/17 09:59, Ganapatrao Kulkarni wrote: >> Change function __iommu_dma_alloc_pages to allocate memory/pages >> for dma from respective device numa node. >> >> Signed-off-by: Ganapatrao Kulkarni &

Re: [PATCH 2/4] numa, iommu/io-pgtable-arm: Use NUMA aware memory allocation for smmu translation tables

2017-09-22 Thread Ganapatrao Kulkarni
On Thu, Sep 21, 2017 at 4:41 PM, Robin Murphy wrote: > On 21/09/17 09:59, Ganapatrao Kulkarni wrote: >> function __arm_lpae_alloc_pages is used to allcoated memory for smmu >> translation tables. updating function to allocate memory/pages >> from the proximity domain of SM

[PATCH 3/4] iommu/arm-smmu-v3: Use NUMA memory allocations for stream tables and comamnd queues

2017-09-21 Thread Ganapatrao Kulkarni
Introduce smmu_alloc_coherent and smmu_free_coherent functions to allocate/free dma coherent memory from NUMA node associated with SMMU. Replace all calls of dmam_alloc_coherent with smmu_alloc_coherent for SMMU stream tables and command queues. Signed-off-by: Ganapatrao Kulkarni --- drivers

[PATCH 4/4] iommu/dma, numa: Use NUMA aware memory allocations in __iommu_dma_alloc_pages

2017-09-21 Thread Ganapatrao Kulkarni
Change function __iommu_dma_alloc_pages to allocate memory/pages for dma from respective device numa node. Signed-off-by: Ganapatrao Kulkarni --- drivers/iommu/dma-iommu.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/iommu/dma-iommu.c b/drivers

[PATCH 0/4] numa, iommu/smmu: IOMMU/SMMU driver optimization for NUMA systems

2017-09-21 Thread Ganapatrao Kulkarni
Adding numa aware memory allocations used for iommu dma allocation and memory allocated for SMMU stream tables, page walk tables and command queues. With this patch, iperf testing on ThunderX2, with 40G NIC card on NODE 1 PCI shown same performance(around 30% improvement) as NODE 0. Ganapatrao

[PATCH 2/4] numa, iommu/io-pgtable-arm: Use NUMA aware memory allocation for smmu translation tables

2017-09-21 Thread Ganapatrao Kulkarni
function __arm_lpae_alloc_pages is used to allcoated memory for smmu translation tables. updating function to allocate memory/pages from the proximity domain of SMMU device. Signed-off-by: Ganapatrao Kulkarni --- drivers/iommu/io-pgtable-arm.c | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH 1/4] mm: move function alloc_pages_exact_nid out of __meminit

2017-09-21 Thread Ganapatrao Kulkarni
This function can be used on NUMA systems in place of alloc_pages_exact Adding code to export and to remove __meminit section tagging. Signed-off-by: Ganapatrao Kulkarni --- include/linux/gfp.h | 2 +- mm/page_alloc.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a

Re: [PATCH v2 0/4] Optimise 64-bit IOVA allocations

2017-08-08 Thread Ganapatrao Kulkarni
On Wed, Aug 9, 2017 at 7:12 AM, Leizhen (ThunderTown) wrote: > > > On 2017/8/8 20:03, Ganapatrao Kulkarni wrote: >> On Wed, Jul 26, 2017 at 4:47 PM, Leizhen (ThunderTown) >> wrote: >>> >>> >>> On 2017/7/26 19:08, Joerg Roedel wrote: >>>

Re: [PATCH v2 0/4] Optimise 64-bit IOVA allocations

2017-08-08 Thread Ganapatrao Kulkarni
On Wed, Jul 26, 2017 at 4:47 PM, Leizhen (ThunderTown) wrote: > > > On 2017/7/26 19:08, Joerg Roedel wrote: >> Hi Robin. >> >> On Fri, Jul 21, 2017 at 12:41:57PM +0100, Robin Murphy wrote: >>> Hi all, >>> >>> In the wake of the ARM SMMU optimisation efforts, it seems that certain >>> workloads (e.

[PATCH v4] acpi/iort: numa: Add numa node mapping for smmuv3 devices

2017-07-24 Thread Ganapatrao Kulkarni
. Signed-off-by: Ganapatrao Kulkarni --- This patch has dependency on header file patch [1], which is already merged to linux-pm. [1] https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&id=c944230064eb65e4fa018d86779b4fd200b1d7e7 v4: - Fix compilation issu

Re: [PATCH v3 2/2] acpi/iort: numa: Add numa node mapping for smmuv3 devices

2017-07-22 Thread Ganapatrao Kulkarni
On Sat, Jul 22, 2017 at 8:53 AM, Hanjun Guo wrote: > Hi Ganapat, > > On 2017/6/8 12:44, Ganapatrao Kulkarni wrote: >> Add code to parse proximity domain in SMMUv3 IORT table to >> set numa node mapping for smmuv3 devices. >> >> Signed-off-by: Ganapatrao Kulkar

Re: [PATCH v3 1/2] acpica: iort: Update SMMUv3 header for proximity domain mapping

2017-06-19 Thread Ganapatrao Kulkarni
On Mon, Jun 19, 2017 at 11:24 PM, Robin Murphy wrote: > On 08/06/17 05:44, Ganapatrao Kulkarni wrote: >> ARM IORT specification (rev. C) has added two new fields to define >> proximity domain for the SMMUv3 node in the IORT table. >> >> Proximity Domain Valid: >

[PATCH v3 0/2] acpi/iort, numa: Add numa node mapping for smmuv3 devices

2017-06-07 Thread Ganapatrao Kulkarni
suggestions. v1: - Initial patch Ganapatrao Kulkarni (2): acpica: iort: Update SMMUv3 header for proximity domain mapping acpi/iort: numa: Add numa node mapping for smmuv3 devices drivers/acpi/arm64/iort.c | 28 ++-- include/acpi/actbl2.h | 4 2 files

[PATCH v3 2/2] acpi/iort: numa: Add numa node mapping for smmuv3 devices

2017-06-07 Thread Ganapatrao Kulkarni
Add code to parse proximity domain in SMMUv3 IORT table to set numa node mapping for smmuv3 devices. Signed-off-by: Ganapatrao Kulkarni --- drivers/acpi/arm64/iort.c | 28 ++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/arm64/iort.c b

[PATCH v3 1/2] acpica: iort: Update SMMUv3 header for proximity domain mapping

2017-06-07 Thread Ganapatrao Kulkarni
Domain Valid flag is set to 1, this entry provides the proximity domain to which this SMMU instance belongs. Update header file to reflect this. Signed-off-by: Ganapatrao Kulkarni --- include/acpi/actbl2.h | 4 1 file changed, 4 insertions(+) diff --git a/include/acpi

Re: [PATCH v2 2/2] acpi/iort: numa: Add numa node mapping for smmuv3 devices

2017-06-07 Thread Ganapatrao Kulkarni
On Wed, Jun 7, 2017 at 10:08 PM, Lorenzo Pieralisi wrote: > On Tue, Jun 06, 2017 at 04:17:45PM +0530, Ganapatrao Kulkarni wrote: >> Add code to parse proximity domain in SMMUv3 IORT table to >> set numa node mapping for smmuv3 devices. >> >> Signed-off-by: Ganapatrao K

[PATCH v2 2/2] acpi/iort: numa: Add numa node mapping for smmuv3 devices

2017-06-06 Thread Ganapatrao Kulkarni
Add code to parse proximity domain in SMMUv3 IORT table to set numa node mapping for smmuv3 devices. Signed-off-by: Ganapatrao Kulkarni --- drivers/acpi/arm64/iort.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c

[PATCH v2 0/2] acpi/iort, numa: Add numa node mapping for smmuv3 devices

2017-06-06 Thread Ganapatrao Kulkarni
ARM IORT specification(rev. C) has added provision to define proximity domain in SMMUv3 IORT table. Adding required code to parse Proximity domain and set numa_node of smmv3 platform devices. Signed-off-by: Ganapatrao Kulkarni v2: - Changed as per Lorenzo Pieralisi and Hanjun Guo suggestions

[PATCH v2 1/2] acpica: iort: Update SMMUv3 header for proximity domain mapping

2017-06-06 Thread Ganapatrao Kulkarni
Domain Valid flag is set to 1, this entry provides the proximity domain to which this SMMU instance belongs. Update header file to reflect this. Signed-off-by: Ganapatrao Kulkarni --- include/acpi/actbl2.h | 4 1 file changed, 4 insertions(+) diff --git a/include/acpi

Re: [PATCH] acpi/iort, numa: Add numa node mapping for smmuv3 devices

2017-06-03 Thread Ganapatrao Kulkarni
On Fri, Jun 2, 2017 at 9:20 AM, Hanjun Guo wrote: > [+Cc Lv Zheng] > > On 2017/6/2 0:21, Lorenzo Pieralisi wrote: >> On Thu, Jun 01, 2017 at 07:35:37PM +0530, Ganapatrao Kulkarni wrote: >>> ARM IORT specification has provision to define Proximity domain >>> in S

[PATCH] acpi/iort, numa: Add numa node mapping for smmuv3 devices

2017-06-01 Thread Ganapatrao Kulkarni
ARM IORT specification has provision to define Proximity domain in SMMUv3 IORT table. Adding required code to parse Proximity domain of SMMUv3 IORT table. Parsed Proximity domain is used to set numa_node of SMMUv3 platform devices. Signed-off-by: Ganapatrao Kulkarni --- drivers/iommu/arm-smmu

Re: [RFC v3 00/10] KVM PCIe/MSI passthrough on ARM/ARM64 and IOVA reserved regions

2016-11-30 Thread Ganapatrao Kulkarni
On Wed, Nov 30, 2016 at 3:44 PM, Auger Eric wrote: > Hi Ganapat, > > On 30/11/2016 11:04, Ganapatrao Kulkarni wrote: >> Hi Eric, >> >> in you repo "https://github.com/eauger/linux/tree/v4.9-rc5-reserved-rfc-v3"; >> there is 11th patch "pci: Enab

Re: [RFC v3 00/10] KVM PCIe/MSI passthrough on ARM/ARM64 and IOVA reserved regions

2016-11-30 Thread Ganapatrao Kulkarni
Hi Eric, in you repo "https://github.com/eauger/linux/tree/v4.9-rc5-reserved-rfc-v3"; there is 11th patch "pci: Enable overrides for missing ACS capabilities" is this patch part of some other series? thanks Ganapat On Wed, Nov 30, 2016 at 3:19 PM, Auger Eric wrote: > Hi, > > On 15/11/2016 14:09