]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/powernv/npu: Do a PID GPU TLB flush when invalidating a large address range
authorAlistair Popple <alistair@popple.id.au>
Tue, 17 Apr 2018 09:11:28 +0000 (19:11 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 23 Apr 2018 23:46:57 +0000 (09:46 +1000)
commit7e834dd1c612d9e397096a51a0822c9f0750bed5
tree4b991ef6e71000ab4f70fe6cce1096f6e32a3b90
parent73dcc2a41b7cac67e9a989ab052264590a19f7e6
powerpc/powernv/npu: Do a PID GPU TLB flush when invalidating a large address range

The NPU has a limited number of address translation shootdown (ATSD)
registers and the GPU has limited bandwidth to process ATSDs. This can
result in contention of ATSD registers leading to soft lockups on some
threads, particularly when invalidating a large address range in
pnv_npu2_mn_invalidate_range().

At some threshold it becomes more efficient to flush the entire GPU
TLB for the given MM context (PID) than individually flushing each
address in the range. This patch will result in ranges greater than
2MB being converted from 32+ ATSDs into a single ATSD which will flush
the TLB for the given PID on each GPU.

Fixes: 3c06842eef12 ("powerpc/powernv: Introduce address translation services for Nvlink2")
Cc: stable@vger.kernel.org # v4.12+
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Acked-by: Balbir Singh <bsingharora@gmail.com>
Tested-by: Balbir Singh <bsingharora@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/npu-dma.c