All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roland Scheidegger <rscheidegger_lists@hispeed.ch>
To: Ilija Hadzic <ihadzic@research.bell-labs.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: drm/radeon/kms: improve performance of blit-copy
Date: Thu, 13 Oct 2011 21:00:02 +0200	[thread overview]
Message-ID: <4E973532.9040503@hispeed.ch> (raw)
In-Reply-To: <1318476582-8365-1-git-send-email-ihadzic@research.bell-labs.com>

Am 13.10.2011 05:29, schrieb Ilija Hadzic:
> 
> The following set of patches will improve the performance of
> blit-copy functions for Radeon GPUs based on R600, R700, Evergreen
> and NI ASICs.
> 
> The foundation for improvement is the use of tiled mode access (which
> for copying bo's can be used regardless of whether the content is
> tiled or not), and segmenting the memory block being copied into
> rectangles whose edge ratio is between 1:1 and 1:2. This maximizes
> the number of PCIe transactions that use maximum payload size
> (typically 128 bytes) and also creates a memory access pattern that
> is more favorable for both VRAM and host DRAM than what's currently
> in the kernel.
> 
> To come up with the new blit-copy code, I did a lot of PCIe traffic
> analysis with the bus analyzer and also had many discussions with
> Alex, trying to explain what's going on (thanks to Alex for his
> time).
> 
> Below (at the end of this note) are the results of some benchmarks 
> that I did with various GPUs (all in the same host: Intel i7 CPU, X58
> chipset, three DRAM channels). To run the tests on your machine load
> the radeon module with 'benchmark=1 pcie_gen2=1' parameters. Most
> significant improvement is in the upstream (VRAM to GART) direction
> because that's where the PCIe transactions were fragmented and also
> where memory access pattern was such that it created a lot of 
> backpressure from the host.
> 
> It is also interesting that high-end devices (e.g. Cayman) exhibit 
> the least improvement and were the worst to begin with. This is 
> because high-end devices copy more tiles in parallel which in turn
> can create bank conflicts on host memory and cause the host to do
> lots of bank-close/precharge/bank-open cycles.
Interesting stuff! Nice results showing the low-end devices completely
blowing away the high-end ones for VRAM->GTT blits :-).
I guess it isn't possible to temporarily disable some RBEs or otherwise
reconfigure the chip that you could get the same performance for the
high-end chips? Granted the high-end chips are only much slower for
VRAM->GTT according to these results but even the other way it's still
~20% or so.
Anyway, can't comment much on the patches, though the idea certainly
seems to make sense.

Roland



> As an added "bonus", I also did some code cleanup and consolidated 
> the repeated code into common function, so r600 and evergreen/NI 
> parts now share the blit-copy code. I also expanded on the benchmark
> coverage, so the module now takes benckmark parameter value between 1
> and 8 and each results in running a different benchmark.
> 
> For details, see the commit log messages and the code. I have been
> running with these patches for a few months (and I kept rebasing them
> to drm-core-next as the public git progressed) and I used them in a
> system setup that does *many* copying of this kind (and does them
> frequently); I have not seen instabilities introduced by these
> patches. I also verified the correctness of the copy using test=1
> parameter for each GPU that I had and the test passed.
> 
> I would welcome some feedback and if you run the benchmarks with the
> new blit code, I would very much like to hear what kind of
> improvement you are seeing.
> 

  parent reply	other threads:[~2011-10-13 19:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-13  3:29 drm/radeon/kms: improve performance of blit-copy Ilija Hadzic
2011-10-13  3:29 ` [PATCH 1/9] drm/radeon/kms: improve evergreen blit code Ilija Hadzic
2011-10-13  3:29 ` [PATCH 2/9] drm/radeon/kms: improve r6xx " Ilija Hadzic
2011-10-13  3:29 ` [PATCH 3/9] drm/radeon/kms: demystify evergreen " Ilija Hadzic
2011-10-13  3:29 ` [PATCH 4/9] drm/radeon/kms: demystify r600 " Ilija Hadzic
2011-10-13  3:29 ` [PATCH 5/9] drm/radeon/kms: cleanup benchmark code Ilija Hadzic
2011-10-13  3:29 ` [PATCH 6/9] drm/radeon/kms: add more elaborate benchmarks Ilija Hadzic
2011-10-13  3:29 ` [PATCH 7/9] drm/radeon/kms: cleanup r600 blit code Ilija Hadzic
2011-10-13  3:29 ` [PATCH 8/9] drm/radeon/kms: blit code commoning Ilija Hadzic
2011-10-13  3:29 ` [PATCH 9/9] drm/radeon/kms: rename a variable for consistency Ilija Hadzic
2011-10-13 18:21 ` drm/radeon/kms: improve performance of blit-copy Ilija Hadzic
2011-10-13 19:00 ` Roland Scheidegger [this message]
2011-10-13 19:18   ` Ilija Hadzic

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=4E973532.9040503@hispeed.ch \
    --to=rscheidegger_lists@hispeed.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ihadzic@research.bell-labs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.