From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, Intel-gfx@lists.freedesktop.org
Subject: Re: [CI 2/2] drm/i915: Initialize legacy semaphores from engine hw id indexed array
Date: Wed, 17 Aug 2016 16:10:00 +0100 [thread overview]
Message-ID: <57B47E48.6080706@linux.intel.com> (raw)
In-Reply-To: <20160817144424.GN22696@nuc-i3427.alporthouse.com>
On 17/08/16 15:44, Chris Wilson wrote:
> On Wed, Aug 17, 2016 at 03:36:51PM +0100, Tvrtko Ursulin wrote:
>> On 17/08/16 11:05, Chris Wilson wrote:
>>> On Wed, Aug 17, 2016 at 10:57:34AM +0100, Tvrtko Ursulin wrote:
>>>>
>>>> On 17/08/16 10:41, Chris Wilson wrote:
>>>>> On Wed, Aug 17, 2016 at 10:34:18AM +0100, Tvrtko Ursulin wrote:
>>>>>> Or add an initialized engine array to dev_priv, in addition to the
>>>>>> existing map for best of both worlds.
>>>>>
>>>>> We have the ring_mask which already tells us that mapping, so I think
>>>>> the second array is overkill.
>>>>
>>>> Yes, I said "in addition to the existing map". In addition we could
>>>> have an array of only initialized engines to avoid any skipping at
>>>> runtime. Since iterators end with intel_engine_initialized anyway.
>>>
>>> And I'm saying we already have that information in ring_mask.
>>
>> The ffs smarts you've been developing? I am not sure devising very
>> smart macros and expanding all that code to all the call sites is
>> that great. It is effectively just re-implementing arrays at runtime
>> using CPU instructions.
>>
>> What would be the big deal of just building the array when engines
>> are initialized for simplicity? Just the allure of getting away with
>> no iterator variable?
>
> It's just the redundant information. We definitely want the (sparse)
> id->engine lookup table just for convenience in execbuf and friends.
> Given that, having a second array is overkill. A list may be a
> reasonable compromise, and I guess pushing for using an ffs iterator
> where it matters (where we know we have a sparse set).
Don't get what you consider a list vs array? I was talking about an
contiguous array of engine pointers (only initialized ones).
Can't see that it is redundant or overkill since it is not that uncommon
to have two separate data structure/indices pointing the the same thing
for ease of manipulation/use.
As I said, you build the list once at init time, or you build it
effectively at the every iterator site. When you call ffs() you make the
CPU do the skipping just on a lower level than the current C code does.
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-08-17 15:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-16 16:04 [CI 1/2] drm/i915: Add enum for hardware engine identifiers Tvrtko Ursulin
2016-08-16 16:04 ` [CI 2/2] drm/i915: Initialize legacy semaphores from engine hw id indexed array Tvrtko Ursulin
2016-08-16 16:18 ` Chris Wilson
2016-08-17 9:34 ` Tvrtko Ursulin
2016-08-17 9:41 ` Chris Wilson
2016-08-17 9:57 ` Tvrtko Ursulin
2016-08-17 10:05 ` Chris Wilson
2016-08-17 14:36 ` Tvrtko Ursulin
2016-08-17 14:44 ` Chris Wilson
2016-08-17 15:10 ` Tvrtko Ursulin [this message]
2016-08-17 15:23 ` Chris Wilson
2016-08-16 16:35 ` ✗ Ro.CI.BAT: failure for series starting with [CI,1/2] drm/i915: Add enum for hardware engine identifiers Patchwork
2016-08-17 10:31 ` 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=57B47E48.6080706@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=chris@chris-wilson.co.uk \
/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