All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Always kick the execlists tasklet after reset
Date: Fri, 15 Mar 2019 12:39:25 +0200	[thread overview]
Message-ID: <87r2b8s9pe.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <155264488237.4168.17692574674151408393@skylake-alporthouse-com>

Chris Wilson <chris@chris-wilson.co.uk> writes:

> Quoting Mika Kuoppala (2019-03-15 10:10:20)
>> Chris Wilson <chris@chris-wilson.co.uk> writes:
>> > +static inline bool __tasklet_enable(struct tasklet_struct *t)
>> > +{
>> > +     return atomic_dec_and_test(&t->count);
>> > +}
>> > +
>> >  #endif /* __I915_GEM_H__ */
>> > diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
>> > index dc3de09c7586..b2d0e16645c7 100644
>> > --- a/drivers/gpu/drm/i915/intel_lrc.c
>> > +++ b/drivers/gpu/drm/i915/intel_lrc.c
>> > @@ -2030,7 +2030,8 @@ static void execlists_reset_finish(struct intel_engine_cs *engine)
>> >       if (!RB_EMPTY_ROOT(&execlists->queue.rb_root))
>> >               execlists->tasklet.func(execlists->tasklet.data);
>> >  
>> > -     tasklet_enable(&execlists->tasklet);
>> > +     if (__tasklet_enable(&execlists->tasklet))
>> > +             tasklet_hi_schedule(&execlists->tasklet);
>> 
>> Why not just go fully unconditional, enable and schedule?
>
> If we schedule before we finish the reset, the tasklet busyspins, get's
> kicked to ksoftirqd, which then busyspins for its timeslice and gets
> bumped around by the scheduler until finally ready.

Hmm stealing the whole timeslice is rude. Just wanted
to weight in the extra trickery. Random thought was
to advocate for execlists_tasklet_enable|disable,
but perhaps we are not there yet.

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-03-15 10:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-13 16:28 [PATCH] drm/i915: Always kick the execlists tasklet after reset Chris Wilson
2019-03-14  1:38 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2019-03-14  1:58 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-03-15 10:10 ` [PATCH] " Mika Kuoppala
2019-03-15 10:14   ` Chris Wilson
2019-03-15 10:39     ` Mika Kuoppala [this message]
2019-03-15 10:51       ` 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=87r2b8s9pe.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.