Re: [PATCH 2/3] powerpc/powernv/npu: Use size-based ATSD invalidates

2018-10-03 Thread Mark Hairgrove
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)`

Re: [PATCH 2/3] powerpc/powernv/npu: Use size-based ATSD invalidates

2018-10-02 Thread Alistair Popple
> > > > 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)` to avoid this? > > PPC supports 4K pages but the GPU ATS

Re: [PATCH 2/3] powerpc/powernv/npu: Use size-based ATSD invalidates

2018-10-02 Thread Mark Hairgrove
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

Re: [PATCH 2/3] powerpc/powernv/npu: Use size-based ATSD invalidates

2018-10-02 Thread Alistair Popple
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 > PAGE_1G (1UL * 1024 * 1024 * 1024) include/linux/sizes.h includes definitions for SZ_64K, SZ_2M, SZ_1G, e

[PATCH 2/3] powerpc/powernv/npu: Use size-based ATSD invalidates

2018-09-27 Thread Mark Hairgrove
Prior to this change only two types of ATSDs were issued to the NPU: invalidates targeting a single page and invalidates targeting the whole address space. The crossover point happened at the configurable atsd_threshold which defaulted to 2M. Invalidates that size or smaller would issue per-page in