[Intel-xe] [PATCH 17/17] drm/xe/oa: Remove filtering reports on context id

Dixit, Ashutosh ashutosh.dixit at intel.com
Mon Nov 13 20:22:32 UTC 2023


On Fri, 08 Sep 2023 18:24:37 -0700, Dixit, Ashutosh wrote:
>
> On Thu, 07 Sep 2023 21:23:48 -0700, Ashutosh Dixit wrote:
> >
>
> Hi Umesh,
>
> > At present XE OA code does not obtain context id's from GuC. Even if these
> > context id's were available it is not clear if included reports for
> > userspace should be filtered on context id's. Till these issues are
> > resolved remove filtering reports based on context id's.
>
> Need more clarity on what we are doing here and why.
>
> > @@ -419,21 +409,10 @@ static int xe_oa_append_reports(struct xe_oa_stream *stream, char __user *buf,
> >		 * since it's not-uncommon for periodic samples to identify a switch
> >		 * before any 'context switch' report.
> >		 */
> > -		if (!stream->exec_q || stream->specific_ctx_id == ctx_id ||
> > -		    stream->oa_buffer.last_ctx_id == stream->specific_ctx_id ||
> > -		    reason & OAREPORT_REASON_CTX_SWITCH) {
> > -			/*
> > -			 * While filtering for a single context we avoid
> > -			 * leaking the IDs of other contexts.
> > -			 */
> > -			if (stream->exec_q && stream->specific_ctx_id != ctx_id)
> > -				oa_context_id_squash(stream, report32);
> > -
> > +		if (!stream->exec_q || reason & OAREPORT_REASON_CTX_SWITCH) {
>
> Also, could you take a look at this? I wasn't sure, should we do this, or
> should we call xe_oa_append_sample() below unconditionally if we are
> removing context filtering.

I have dropped the above if () statement, it's obviously incorrect.

>
> >			ret = xe_oa_append_sample(stream, buf, count, offset, report);
> >			if (ret)
> >				break;
> > -
> > -			stream->oa_buffer.last_ctx_id = ctx_id;
> >		}
>
> Thanks.
> --
> Ashutosh


More information about the Intel-xe mailing list