All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/5] drm/i915: Wrap tasklet_struct for abuse
Date: Wed, 09 May 2018 15:58:58 +0100	[thread overview]
Message-ID: <152587793847.8613.12990317845237551303@mail.alporthouse.com> (raw)
In-Reply-To: <20180509142801.28130-2-chris@chris-wilson.co.uk>

Quoting Chris Wilson (2018-05-09 15:27:58)
> In the next few patches, we want to abuse tasklet to avoid ksoftirqd
> latency along critical paths. To make that abuse easily to swallow,
> first coat the tasklet in a little syntactic sugar.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_gem.c             |  4 +-
>  drivers/gpu/drm/i915/i915_irq.c             |  2 +-
>  drivers/gpu/drm/i915/i915_tasklet.h         | 78 +++++++++++++++++++++
>  drivers/gpu/drm/i915/intel_engine_cs.c      | 11 ++-
>  drivers/gpu/drm/i915/intel_guc_submission.c |  8 +--
>  drivers/gpu/drm/i915/intel_lrc.c            | 18 ++---
>  drivers/gpu/drm/i915/intel_ringbuffer.h     |  3 +-
>  7 files changed, 102 insertions(+), 22 deletions(-)
>  create mode 100644 drivers/gpu/drm/i915/i915_tasklet.h
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 63c96c2b8fcf..59e04387a27c 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3036,7 +3036,7 @@ i915_gem_reset_prepare_engine(struct intel_engine_cs *engine)
>          * Turning off the execlists->tasklet until the reset is over
>          * prevents the race.
>          */
> -       tasklet_disable(&engine->execlists.tasklet);
> +       i915_tasklet_lock(&engine->execlists.tasklet);

Hmm, probably sensible to stick to disable/enable:

 - better match to tasklet_interface (no arbitrary impedance mismatch)

 - they are counting locks rather than mutex which we commonly think of
   for lock/unlock (more like a semaphore).

After dropping the custom flush+disable wrapper, there's no good reason
to have a custom name. Thoughts?
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-05-09 14:59 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09 14:27 [PATCH 1/5] drm/i915: Remove tasklet flush before disable Chris Wilson
2018-05-09 14:27 ` [PATCH 2/5] drm/i915: Wrap tasklet_struct for abuse Chris Wilson
2018-05-09 14:58   ` Chris Wilson [this message]
2018-05-10 15:49   ` Tvrtko Ursulin
2018-05-10 16:03     ` Chris Wilson
2018-05-10 16:15       ` Tvrtko Ursulin
2018-05-10 16:19         ` Chris Wilson
2018-05-10 17:08           ` Tvrtko Ursulin
2018-05-09 14:27 ` [PATCH 3/5] drm/i915/execlists: Direct submit onto idle engines Chris Wilson
2018-05-10 16:09   ` Tvrtko Ursulin
2018-05-10 16:25     ` Chris Wilson
2018-05-10 17:26       ` Tvrtko Ursulin
2018-05-10 17:40         ` Chris Wilson
2018-05-11  8:25           ` Tvrtko Ursulin
2018-05-11  8:31             ` Chris Wilson
2018-05-11  8:48               ` Tvrtko Ursulin
2018-05-09 14:28 ` [PATCH 4/5] drm/i915/execlists: Direct submission from irq handler Chris Wilson
2018-05-10 12:02   ` Chris Wilson
2018-05-09 14:28 ` [PATCH 5/5] drm/i915: Speed up idle detection by kicking the tasklets Chris Wilson
2018-05-09 14:57 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] drm/i915: Remove tasklet flush before disable Patchwork
2018-05-09 14:59 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-05-09 15:14 ` ✓ Fi.CI.BAT: success " Patchwork
2018-05-09 17:50 ` ✓ Fi.CI.IGT: " Patchwork

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=152587793847.8613.12990317845237551303@mail.alporthouse.com \
    --to=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.