From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 03/14] drm/i915/execlists: Flush the tasklet on parking
Date: Thu, 2 May 2019 15:24:16 +0100 [thread overview]
Message-ID: <b15679f8-dc34-93d0-fe59-7690acc24a20@linux.intel.com> (raw)
In-Reply-To: <155680686989.9023.6629699137280028848@skylake-alporthouse-com>
On 02/05/2019 15:21, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2019-05-02 15:14:08)
>>
>> On 02/05/2019 14:53, Chris Wilson wrote:
>>> Quoting Tvrtko Ursulin (2019-05-02 14:48:18)
>>>>
>>>> On 01/05/2019 12:45, Chris Wilson wrote:
>>>>> Tidy up the cleanup sequence by always ensure that the tasklet is
>>>>> flushed on parking (before we cleanup). The parking provides a
>>>>> convenient point to ensure that the backend is truly idle.
>>>>>
>>>>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>>>>> ---
>>>>> drivers/gpu/drm/i915/gt/intel_lrc.c | 7 ++++++-
>>>>> drivers/gpu/drm/i915/intel_guc_submission.c | 1 +
>>>>> 2 files changed, 7 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
>>>>> index 851e62ddcb87..7be54b868d8e 100644
>>>>> --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
>>>>> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
>>>>> @@ -2331,6 +2331,11 @@ static int gen8_init_rcs_context(struct i915_request *rq)
>>>>> return i915_gem_render_state_emit(rq);
>>>>> }
>>>>>
>>>>> +static void execlists_park(struct intel_engine_cs *engine)
>>>>> +{
>>>>> + tasklet_kill(&engine->execlists.tasklet);
>>>>
>>>> Isn't it actually a problem if tasklet is scheduled and unstarted, or
>>>> even in progress at the point of engine getting parked?
>>>
>>> That would be a broken driver. :|
>>>
>>> We must be quite sure that engine isn't going to send an interrupt as we
>>> are just about to drop the wakeref we need to service that interrupt.
>>>
>>> tasklet_kill()
>>> GEM_BUG_ON(engine->execlists.active);
>>
>> Or instead of both:
>>
>> /* Tasklet must not be running or scheduled at this point. */
>> GEM_BUG_ON(engine->execlists.tasklet.state);
>
> There's the dilemma that we start parking based on retirement not
> final CS event.
But engine->park() is called once the last engine pm reference is
dropped. Are we dropping the last reference with a CS event pending?
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:[~2019-05-02 14:24 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-01 11:45 [PATCH 01/14] drm/i915/hangcheck: Track context changes Chris Wilson
2019-05-01 11:45 ` [PATCH 02/14] drm/i915: Include fence signaled bit in print_request() Chris Wilson
2019-05-02 13:43 ` Tvrtko Ursulin
2019-05-01 11:45 ` [PATCH 03/14] drm/i915/execlists: Flush the tasklet on parking Chris Wilson
2019-05-02 13:48 ` Tvrtko Ursulin
2019-05-02 13:53 ` Chris Wilson
2019-05-02 14:14 ` Tvrtko Ursulin
2019-05-02 14:21 ` Chris Wilson
2019-05-02 14:24 ` Tvrtko Ursulin [this message]
2019-05-02 14:33 ` Chris Wilson
2019-05-01 11:45 ` [PATCH 04/14] drm/i915: Leave engine parking to the engines Chris Wilson
2019-05-02 14:18 ` Tvrtko Ursulin
2019-05-01 11:45 ` [PATCH 05/14] drm/i915: Remove delay for idle_work Chris Wilson
2019-05-02 13:19 ` Tvrtko Ursulin
2019-05-02 13:22 ` Chris Wilson
2019-05-02 13:51 ` Tvrtko Ursulin
2019-05-02 14:23 ` Chris Wilson
2019-05-01 11:45 ` [PATCH 06/14] drm/i915: Cancel retire_worker on parking Chris Wilson
2019-05-02 13:29 ` Tvrtko Ursulin
2019-05-02 13:33 ` Chris Wilson
2019-05-02 14:20 ` Tvrtko Ursulin
2019-05-02 14:26 ` Chris Wilson
2019-05-02 14:29 ` [PATCH v2] " Chris Wilson
2019-05-01 11:45 ` [PATCH 07/14] drm/i915: Stop spinning for DROP_IDLE (debugfs/i915_drop_caches) Chris Wilson
2019-05-02 13:34 ` Tvrtko Ursulin
2019-05-02 14:00 ` Chris Wilson
2019-05-02 14:16 ` Tvrtko Ursulin
2019-05-01 11:45 ` [PATCH 08/14] drm/i915: Only reschedule the submission tasklet if preemption is possible Chris Wilson
2019-05-03 10:53 ` Tvrtko Ursulin
2019-05-03 10:58 ` Chris Wilson
2019-05-01 11:45 ` [PATCH 09/14] drm/i915: Delay semaphore submission until the start of the signaler Chris Wilson
2019-05-03 11:03 ` Tvrtko Ursulin
2019-05-01 11:45 ` [PATCH 10/14] drm/i915/execlists: Don't apply priority boost for resets Chris Wilson
2019-05-01 11:45 ` [PATCH 11/14] drm/i915: Rearrange i915_scheduler.c Chris Wilson
2019-05-01 11:45 ` [PATCH 12/14] drm/i915: Pass i915_sched_node around internally Chris Wilson
2019-05-01 11:45 ` [PATCH 13/14] drm/i915: Bump signaler priority on adding a waiter Chris Wilson
2019-05-01 14:59 ` [PATCH] " Chris Wilson
2019-05-01 16:29 ` [PATCH v2] " Chris Wilson
2019-05-01 16:32 ` Chris Wilson
2019-05-01 11:45 ` [PATCH 14/14] drm/i915: Convert inconsistent static engine tables into an init error Chris Wilson
2019-05-01 12:29 ` ✗ Fi.CI.SPARSE: warning for series starting with [01/14] drm/i915/hangcheck: Track context changes Patchwork
2019-05-01 12:47 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-05-01 15:22 ` ✗ Fi.CI.SPARSE: warning for series starting with [01/14] drm/i915/hangcheck: Track context changes (rev2) Patchwork
2019-05-01 15:35 ` ✓ Fi.CI.BAT: success " Patchwork
2019-05-01 16:42 ` ✗ Fi.CI.SPARSE: warning for series starting with [01/14] drm/i915/hangcheck: Track context changes (rev3) Patchwork
2019-05-01 16:52 ` ✓ Fi.CI.BAT: success " Patchwork
2019-05-01 17:01 ` ✗ Fi.CI.SPARSE: warning for series starting with [01/14] drm/i915/hangcheck: Track context changes (rev4) Patchwork
2019-05-01 17:37 ` ✓ Fi.CI.BAT: success " Patchwork
2019-05-02 9:35 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-05-02 16:45 ` ✗ Fi.CI.BAT: failure for series starting with [01/14] drm/i915/hangcheck: Track context changes (rev5) Patchwork
2019-05-03 10:36 ` [PATCH 01/14] drm/i915/hangcheck: Track context changes Tvrtko Ursulin
2019-05-03 10:43 ` 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=b15679f8-dc34-93d0-fe59-7690acc24a20@linux.intel.com \
--to=tvrtko.ursulin@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