All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: matthew.auld@intel.com
Subject: Re: [PATCH 5/7] drm/i915: handle interrupts from the OA unit
Date: Wed, 16 Jan 2019 15:58:00 +0000	[thread overview]
Message-ID: <f8609923-1a4c-e60f-c91c-8a2d0e3640b9@intel.com> (raw)
In-Reply-To: <154765393891.22625.16969256973274963127@skylake-alporthouse-com>

On 16/01/2019 15:52, Chris Wilson wrote:
> Quoting Lionel Landwerlin (2019-01-16 15:36:20)
>> @@ -1877,6 +1883,21 @@ struct drm_i915_private {
>>                          wait_queue_head_t poll_wq;
>>                          bool pollin;
>>   
>> +                       /**
>> +                        * Atomic counter incremented by the interrupt
>> +                        * handling code for each OA half full interrupt
>> +                        * received.
>> +                        */
>> +                       atomic64_t half_full_count;
>> +
>> +                       /**
>> +                        * Copy of the atomic half_full_count that was last
>> +                        * processed in the i915-perf driver. If both counters
>> +                        * differ, there is data available to read in the OA
>> +                        * buffer.
>> +                        */
>> +                       u64 half_full_count_last;
> Eh? But why a relatively expensive atomic64. You only need one bit, and
> reading the tail pointer from WB memory should just be cheap. You should
> be able to sample the perf ringbuffer pointers very cheaply... What am I
> missing?
> -Chris
>
Fair comment.

The thing is with this series there are 2 mechanism that notify the poll_wq.

One is the hrtimer that kicks in at regular interval and polls the 
register with the workaround.

The other is the interrupt which doesn't read the registers and workaround.


Maybe a better way to do it would be to have 2 wait queues, one triggers 
a workqueue for the oa_buffer_check after the interrupt, the other 
notifies the existing poll_wq.


-

Lionel

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-01-16 15:58 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-16 15:36 [PATCH 0/7] drm/i915/perf: add OA interrupt support Lionel Landwerlin
2019-01-16 15:36 ` [PATCH 1/7] drm/i915/perf: rework aging tail workaround Lionel Landwerlin
2019-01-16 15:36 ` [PATCH 2/7] drm/i915/perf: reset pollin when perf stream is enabled Lionel Landwerlin
2019-01-16 17:13   ` Matthew Auld
2019-01-16 18:14     ` Lionel Landwerlin
2019-01-16 15:36 ` [PATCH 3/7] drm/i915/perf: only append status when data is available Lionel Landwerlin
2019-01-16 22:40   ` kbuild test robot
2019-01-16 15:36 ` [PATCH 4/7] drm/i915/perf: add new open param to configure polling of OA buffer Lionel Landwerlin
2019-01-16 15:36 ` [PATCH 5/7] drm/i915: handle interrupts from the OA unit Lionel Landwerlin
2019-01-16 15:52   ` Chris Wilson
2019-01-16 15:58     ` Lionel Landwerlin [this message]
2019-01-16 16:02       ` Lionel Landwerlin
2019-01-16 16:09         ` Chris Wilson
2019-01-16 16:05       ` Chris Wilson
2019-01-16 16:25         ` Lionel Landwerlin
2019-01-16 16:31           ` Chris Wilson
2019-01-16 18:04             ` Lionel Landwerlin
2019-01-17 11:43               ` Lionel Landwerlin
2019-01-16 15:36 ` [PATCH 6/7] drm/i915/perf: add interrupt enabling parameter Lionel Landwerlin
2019-01-16 15:36 ` [PATCH 7/7] drm/i915/perf: add flushing ioctl Lionel Landwerlin
2019-01-22 16:25   ` Joonas Lahtinen
2019-01-22 17:48     ` Lionel Landwerlin
2019-02-04 15:30     ` Lionel Landwerlin
2019-02-25 17:16       ` Joonas Lahtinen
2019-01-17  8:09 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/perf: add OA interrupt support (rev2) Patchwork
2019-01-17  8:12 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-01-17  8:31 ` ✓ Fi.CI.BAT: success " Patchwork
2019-01-17 11:42 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-01-22 10:53 ` [PATCH 0/7] drm/i915/perf: add OA interrupt support Lionel Landwerlin

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=f8609923-1a4c-e60f-c91c-8a2d0e3640b9@intel.com \
    --to=lionel.g.landwerlin@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    /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.