linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Mark Hairgrove <mhairgrove@nvidia.com>, <linuxppc-dev@lists.ozlabs.org>
Cc: Alistair Popple <alistair@popple.id.au>,
	Mark Hairgrove <mhairgrove@nvidia.com>,
	Reza Arbab <arbab@us.ibm.com>
Subject: Re: [v2, 1/3] powerpc/powernv/npu: Reduce eieio usage when issuing ATSD invalidates
Date: Thu, 11 Oct 2018 19:35:43 +1100 (AEDT)	[thread overview]
Message-ID: <42W46m1mKcz9vZs@ozlabs.org> (raw)
In-Reply-To: <1538592694-18739-2-git-send-email-mhairgrove@nvidia.com>

On Wed, 2018-10-03 at 18:51:32 UTC, Mark Hairgrove wrote:
> There are two types of ATSDs issued to the NPU: invalidates targeting a
> specific virtual address and invalidates targeting the whole address
> space. In both cases prior to this change, the sequence was:
> 
>     for each NPU
>         - Write the target address to the XTS_ATSD_AVA register
>         - EIEIO
>         - Write the launch value to issue the ATSD
> 
> First, a target address is not required when invalidating the whole
> address space, so that write and the EIEIO have been removed. The AP
> (size) field in the launch is not needed either.
> 
> Second, for per-address invalidates the above sequence is inefficient in
> the common case of multiple NPUs because an EIEIO is issued per NPU. This
> unnecessarily forces the launches of later ATSDs to be ordered with the
> launches of earlier ones. The new sequence only issues a single EIEIO:
> 
>     for each NPU
>         - Write the target address to the XTS_ATSD_AVA register
>     EIEIO
>     for each NPU
>         - Write the launch value to issue the ATSD
> 
> Performance results were gathered using a microbenchmark which creates a
> 1G allocation then uses mprotect with PROT_NONE to trigger invalidates in
> strides across the allocation.
> 
> With only a single NPU active (one GPU) the difference is in the noise for
> both types of invalidates (+/-1%).
> 
> With two NPUs active (on a 6-GPU system) the effect is more noticeable:
> 
>          mprotect rate (GB/s)
> Stride   Before      After      Speedup
> 64K         5.9        6.5          10%
> 1M         31.2       33.4           7%
> 2M         36.3       38.7           7%
> 4M        322.6      356.7          11%
> 
> Signed-off-by: Mark Hairgrove <mhairgrove@nvidia.com>
> Reviewed-by: Alistair Popple <alistair@popple.id.au>

Series applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/7ead15a1442b25e12a6f0791a7c7a5

cheers

  parent reply	other threads:[~2018-10-11  8:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03 18:51 [PATCH v2 0/3] powerpc/powernv/npu: Improve ATSD invalidation overhead Mark Hairgrove
2018-10-03 18:51 ` [PATCH v2 1/3] powerpc/powernv/npu: Reduce eieio usage when issuing ATSD invalidates Mark Hairgrove
2018-10-04  5:20   ` Alistair Popple
2018-10-11  8:35   ` Michael Ellerman [this message]
2018-10-03 18:51 ` [PATCH v2 2/3] powerpc/powernv/npu: Use size-based " Mark Hairgrove
2018-10-04  5:20   ` Alistair Popple
2018-10-03 18:51 ` [PATCH v2 3/3] powerpc/powernv/npu: Remove atsd_threshold debugfs setting Mark Hairgrove
2018-10-04  5:21   ` Alistair Popple

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42W46m1mKcz9vZs@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=alistair@popple.id.au \
    --cc=arbab@us.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mhairgrove@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).