[Intel-gfx] [PATCH 2/5] drm/i915/perf: avoid poll, read, EAGAIN busy loops

Matthew Auld matthew.william.auld at gmail.com
Wed Jan 25 15:49:05 UTC 2017


On 24 January 2017 at 01:25, Robert Bragg <robert at sixbynine.org> wrote:
> If the function for checking whether there is OA buffer data available
> (during a poll or blocking read) has false positives then we want to
> avoid a situation where the subsequent read() returns EAGAIN (after
> a more accurate check) followed by a poll() immediately reporting
> the same false positive POLLIN event and effectively maintaining a
> busy loop until there really is data.
>
> This makes sure that we clear the .pollin event status whenever we
> return EAGAIN to userspace which will throttle subsequent POLLIN events
> and repeated attempts to read to the 5ms intervals of the hrtimer
> callback we have.
>
> Signed-off-by: Robert Bragg <robert at sixbynine.org>
Reviewed-by: Matthew Auld <matthew.auld at intel.com>


More information about the Intel-gfx mailing list