From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Tvrtko Ursulin <tursulin@ursulin.net>,
Intel-gfx@lists.freedesktop.org,
Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Subject: Re: [PATCH v2] drm/i915: Optimise VMA lookup slightly
Date: Thu, 15 Dec 2016 16:49:49 +0000 [thread overview]
Message-ID: <141991e2-baf8-83ad-45ab-0eb8a4e2aa8b@linux.intel.com> (raw)
In-Reply-To: <20161213144738.GR20316@nuc-i3427.alporthouse.com>
On 13/12/2016 14:47, Chris Wilson wrote:
> On Tue, Dec 13, 2016 at 02:37:27PM +0000, Tvrtko Ursulin wrote:
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> Cast VM pointers before substraction to save the compiler
>> doing a smart one which includes multiplication.
>>
>> v2: Only keep the first optimisation and prettify it. (Chris Wilson)
>>
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>
> Step 1, ok.
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
>
> (I wasn't against the others, just curious as to what gcc was doing for
> #2 and #3 I'd like just to pursue a different path altogether :)
Thanks.
Yes I know. Longer VMA lists is not something I've tested yet. I've just
noticed that even where lookups are predominantly on short lists it can
still be up to 1% of CPU time spent in the lookup. It averages around
0.7% AFAIR.
More precisely in that test (which is simply running a vsync limited
neverball intro screen :)), 65% of all lookups are on single VMA object!
29% on objects with two VMAs and 29% on on objects with three VMAs.
That's it, no longer lists at all.
How much benefit for this case smarter lookup would make I was not sure.
So simply wanted to tighten up the existing search as much as possible.
Even for that I am not sure that it makes a difference but at least if
we can pointless instructions why not.
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-12-15 16:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-13 12:22 [PATCH] drm/i915: Optimise VMA lookup slightly Tvrtko Ursulin
2016-12-13 12:41 ` Chris Wilson
2016-12-13 13:30 ` Tvrtko Ursulin
2016-12-13 13:41 ` Chris Wilson
2016-12-13 14:37 ` [PATCH v2] " Tvrtko Ursulin
2016-12-13 14:47 ` Chris Wilson
2016-12-15 16:49 ` Tvrtko Ursulin [this message]
2016-12-15 17:08 ` Chris Wilson
2016-12-13 14:40 ` [PATCH] " Tvrtko Ursulin
2016-12-13 12:45 ` ✓ Fi.CI.BAT: success for " Patchwork
2016-12-13 17:23 ` ✗ Fi.CI.BAT: warning for drm/i915: Optimise VMA lookup slightly (rev2) Patchwork
2016-12-15 13:33 ` Tvrtko Ursulin
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=141991e2-baf8-83ad-45ab-0eb8a4e2aa8b@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=chris@chris-wilson.co.uk \
--cc=tursulin@ursulin.net \
--cc=tvrtko.ursulin@intel.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