[Intel-gfx] [PATCH] drm/i915/perf: Do not clear pollin for small user read buffers

Dixit, Ashutosh ashutosh.dixit at intel.com
Wed Mar 25 20:44:50 UTC 2020


On Wed, 25 Mar 2020 12:25:59 -0700, Lionel Landwerlin wrote:
>
> On 25/03/2020 20:20, Ashutosh Dixit wrote:
> > It is wrong to block the user thread in the next poll when OA data is
> > already available which could not fit in the user buffer provided in
> > the previous read. In several cases the exact user buffer size is not
> > known. Blocking user space in poll can lead to data loss when the
> > buffer size used is smaller than the available data.
> >
> > This change fixes this issue and allows user space to read all OA data
> > even when using a buffer size smaller than the available data using
> > multiple non-blocking reads rather than staying blocked in poll till
> > the next timer interrupt.
>
> Looks like you found a pretty important issue.
>
> Can you write an IGT test case so that we don't run into it again?

OK I'll see if I can come up with an IGT.

Thanks!
--
Ashutosh


More information about the Intel-gfx mailing list