This threshold is no longer used now that all invalidates issue a single
ATSD to each active NPU.
Signed-off-by: Mark Hairgrove
---
arch/powerpc/platforms/powernv/npu-dma.c | 13 -
1 files changed, 0 insertions(+), 13 deletions(-)
diff --git a/arch/powerpc/platforms/powernv/npu
tride Before After Speedup
64K 6.57.4 13%
1M 33.4 67.9 103%
2M 38.7 93.1 141%
4M356.7 354.6 -1%
Anything over 2M is roughly the same as before since both cases issue a
single ATSD.
Signed-off-by:
7%
2M 36.3 38.7 7%
4M322.6 356.7 11%
Signed-off-by: Mark Hairgrove
---
arch/powerpc/platforms/powernv/npu-dma.c | 99 ++---
1 files changed, 48 insertions(+), 51 deletions(-)
diff --git a/arch/powerpc/platforms/powernv/npu
overhead by rearranging how the ATSDs are
issued and by using size-based ATSD invalidates.
Mark Hairgrove (3):
powerpc/powernv/npu: Reduce eieio usage when issuing ATSD invalidates
powerpc/powernv/npu: Use size-based ATSD invalidates
powerpc/powernv/npu: Remove atsd_threshold debugfs setting
Thanks for the review. Comments below.
On Tue, 2 Oct 2018, Alistair Popple wrote:
> Thanks Mark,
>
> Looks like some worthwhile improvments to be had. I've added a couple of
> comments inline below.
>
> > +#define PAGE_64K (64UL * 1024) +#define PAGE_2M (2UL * 1024 * 1024)
> > +#define
> > P
On Wed, 3 Oct 2018, Alistair Popple wrote:
> > >
> > > We also support 4K page sizes on PPC. If I am not mistaken this means
> > > every ATSD
> > > would invalidate the entire GPU TLB for a the given PID on those systems.
> > > Could
> > > we change the above check to `if (size <= PAGE_64K)`
overhead by rearranging how the ATSDs are
issued and by using size-based ATSD invalidates.
Mark Hairgrove (3):
powerpc/powernv/npu: Reduce eieio usage when issuing ATSD invalidates
powerpc/powernv/npu: Use size-based ATSD invalidates
powerpc/powernv/npu: Remove atsd_threshold debugfs setting
354.6 -1%
Anything over 2M is roughly the same as before since both cases issue a
single ATSD.
Signed-off-by: Mark Hairgrove
---
arch/powerpc/platforms/powernv/npu-dma.c | 103 --
1 files changed, 55 insertions(+), 48 deletions(-)
diff --git a/arch/powerpc/plat
7%
2M 36.3 38.7 7%
4M322.6 356.7 11%
Signed-off-by: Mark Hairgrove
---
arch/powerpc/platforms/powernv/npu-dma.c | 99 ++---
1 files changed, 48 insertions(+), 51 deletions(-)
diff --git a/arch/powerpc/platforms/powernv/npu
This threshold is no longer used now that all invalidates issue a single
ATSD to each active NPU.
Signed-off-by: Mark Hairgrove
---
arch/powerpc/platforms/powernv/npu-dma.c | 14 --
1 files changed, 0 insertions(+), 14 deletions(-)
diff --git a/arch/powerpc/platforms/powernv/npu
.
This patch calls opal_npu_destroy_context on the failure paths, and makes
sure not to assign mm->context.npu_context until past the failure points.
Signed-off-by: Mark Hairgrove
---
arch/powerpc/platforms/powernv/npu-dma.c | 32 +++--
1 files changed, 21 insertions(
On Wed, 14 Feb 2018, Alistair Popple wrote:
> > > +struct mmio_atsd_reg {
> > > + struct npu *npu;
> > > + int reg;
> > > +};
> > > +
> >
> > Is it just easier to move reg to inside of struct npu?
>
> I don't think so, struct npu is global to all npu contexts where as this is
> specific to the
On Mon, 19 Feb 2018, Balbir Singh wrote:
> Good point, although I think the acquire_* function itself may be called
> from a higher layer with the mmap_sem always held. I wonder if we need
> barriers around get and put mmio_atsd_reg.
I agree with the need for memory barriers. FWIW, page tables
ref_put(&npu_context->kref, pnv_npu2_release_context);
> + spin_unlock(&npu_context_lock);
> +
> + /*
> + * We need to do this outside of pnv_npu2_release_context so that it is
> + * outside the spinlock as mmu_notifier_destroy uses SRCU.
> + */
> + if (removed) {
> + mmu_notifier_unregister(&npu_context->mn,
> + npu_context->mm);
> +
> + kfree(npu_context);
> + }
> +
> }
> EXPORT_SYMBOL(pnv_npu2_destroy_context);
>
> --
> 2.11.0
>
>
Reviewed-by: Mark Hairgrove
Tested-by: Mark Hairgrove
,
> + gpdev->devfn));
> + return ERR_PTR(-EINVAL);
> + }
> +
> WARN_ON(!kref_get_unless_zero(&npu_context->kref));
> + }
> spin_unlock(&npu_context_lock);
>
> if (!npu_context) {
> --
> 2.11.0
>
>
Reviewed-by: Mark Hairgrove
Tested-by: Mark Hairgrove
15 matches
Mail list logo