Re: [Intel-gfx] [PATCH 3/3] Introduce & use new lightweight SGL iterators

From: Dave Gordon
Date: Thu May 19 2016 - 20:13:41 EST


On 19/05/2016 18:27, Chris Wilson wrote:
On Tue, May 17, 2016 at 01:05:48PM +0100, Dave Gordon wrote:
On 17/05/16 11:34, Tvrtko Ursulin wrote:
On 16/05/16 16:19, Dave Gordon wrote:
The existing for_each_sg_page() iterator is somewhat heavyweight, and is
limiting i915 driver performance in a few benchmarks. So here we
introduce somewhat lighter weight iterators, primarily for use with GEM
objects or other case where we need only deal with whole aligned pages.
Interesting idea, if for nothing then for eliminating the dreaded
st->nents of for_each_sg_page. :)

Which benchmarks it improves and how much do you know?
I know nothing :)

But last time I posted some easy-to-use iterators, Chris Wilson said
they didn't address his complaint, which was that the existing ones
were too slow.
These aren't very good either... Compared to the sg iters I have:

gem:exec:fault:1MiB: -4.32%
gem:exec:fault:1MiB:forked: -5.66%
gem:exec:fault:16MiB: -13.33%
gem:exec:fault:16MiB:forked: -12.03%
gem:exec:fault:256MiB: -15.28%
gem:exec:fault:256MiB:forked: -16.98%

(I was really hoping to be able to drop a patch!)

I think you've inlined sg_next() as well? That was the next thing I was going to try with these ...
I'll post the version with inline sg_next, but I'm on holiday now so won't be around until the end of the month.

.Dave.