From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/i915: Introduce execlist_port_* accessors
Date: Fri, 20 Oct 2017 15:00:09 +0300 [thread overview]
Message-ID: <874lquhvw6.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <150842453413.29194.11236746736532673504@mail.alporthouse.com>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Quoting Mika Kuoppala (2017-10-19 15:39:41)
>> while (test_bit(ENGINE_IRQ_EXECLIST, &engine->irq_posted)) {
>> + struct execlist_port *port;
>> +
>> /* The HWSP contains a (cacheable) mirror of the CSB */
>> const u32 *buf =
>> &engine->status_page.page_addr[I915_HWS_CSB_BUF0_INDEX];
>> @@ -855,7 +865,7 @@ static void intel_lrc_irq_handler(unsigned long data)
>>
>> if (status & GEN8_CTX_STATUS_ACTIVE_IDLE &&
>> buf[2*head + 1] == PREEMPT_ID) {
>> - execlist_cancel_port_requests(execlists);
>> + execlists_cancel_port_requests(execlists);
>>
>> spin_lock_irq(&engine->timeline->lock);
>> unwind_incomplete_requests(engine);
>> @@ -870,6 +880,8 @@ static void intel_lrc_irq_handler(unsigned long data)
>> execlists->preempt)
>> continue;
>>
>> + port = execlists_port_head(execlists);
>> +
>> /* Check the context/desc id for this event matches */
>> GEM_DEBUG_BUG_ON(buf[2 * head + 1] != port->context_id);
>>
>> @@ -890,7 +902,7 @@ static void intel_lrc_irq_handler(unsigned long data)
>> }
>>
>> /* After the final element, the hw should be idle */
>> - GEM_BUG_ON(port_count(port) == 0 &&
>> + GEM_BUG_ON(port_count(execlists_port_head(execlists)) == 0 &&
>> !(status & GEN8_CTX_STATUS_ACTIVE_IDLE));
>> }
>
> Can you try reworking this such that port is kept local without having
> to go back to the struct on every loop? And then compare code
> generation.
New one is with the last_port introduce and set outside loop.
add/remove: 0/0 grow/shrink: 1/1 up/down: 10/-7 (3)
function old new delta
intel_lrc_irq_handler 1847 1857 +10
i915_guc_irq_handler 1327 1320 -7
Without looking at the assembler, I would go with last_port
as a net win.
-Mika
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-10-20 12:00 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-19 14:39 [PATCH 1/2] drm/i915: Introduce execlist_port_* accessors Mika Kuoppala
2017-10-19 14:39 ` [PATCH 2/2] drm/i915: Move execlists port head instead of memmoving array Mika Kuoppala
2017-10-19 15:54 ` Chris Wilson
2017-10-19 14:48 ` [PATCH 1/2] drm/i915: Introduce execlist_port_* accessors Chris Wilson
2017-10-20 12:00 ` Mika Kuoppala [this message]
2017-10-19 14:50 ` Chris Wilson
2017-10-19 14:59 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] " Patchwork
2017-10-20 10:34 ` [PATCH 1/2] " Joonas Lahtinen
2017-10-20 11:12 ` Mika Kuoppala
2017-10-20 11:26 ` Chris Wilson
2017-10-20 12:53 ` Mika Kuoppala
-- strict thread matches above, loose matches on Subject: below --
2017-10-31 15:27 Mika Kuoppala
2017-10-31 15:41 ` Chris Wilson
2017-10-31 15:56 ` Chris Wilson
2017-11-02 10:38 ` Mika Kuoppala
2017-11-02 10:57 ` Chris Wilson
2017-11-02 14:14 ` Mika Kuoppala
2017-11-02 14:15 ` Mika Kuoppala
2017-11-02 14:32 ` Mika Kuoppala
2017-11-02 15:03 ` Chris Wilson
2017-11-30 9:10 [PATCH 0/2] execlist port handling improvements Mika Kuoppala
2017-11-30 9:10 ` [PATCH 1/2] drm/i915: Introduce execlist_port_* accessors Mika Kuoppala
2017-11-30 10:21 ` Chris Wilson
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=874lquhvw6.fsf@gaia.fi.intel.com \
--to=mika.kuoppala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/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