From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [Intel-xe] [PATCH 01/10] drm/xe/oa: Introduce OA uapi
Date: Wed, 16 Aug 2023 13:58:05 -0700 [thread overview]
Message-ID: <87sf8iso0y.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <87ttsysoxq.wl-ashutosh.dixit@intel.com>
On Wed, 16 Aug 2023 13:38:25 -0700, Dixit, Ashutosh wrote:
>
> On Wed, 16 Aug 2023 12:58:52 -0700, Umesh Nerlige Ramappa wrote:
> >
>
> Hi Umesh,
>
> > On Tue, Aug 15, 2023 at 08:43:55PM -0700, Dixit, Ashutosh wrote:
> > > On Tue, 15 Aug 2023 19:21:23 -0700, Umesh Nerlige Ramappa wrote:
> > >>
> > >> On Tue, Aug 15, 2023 at 06:30:12PM -0700, Dixit, Ashutosh wrote:
> > >> > On Tue, 15 Aug 2023 18:11:55 -0700, Umesh Nerlige Ramappa wrote:
> > >> >>
> > >> >> >> + /**
> > >> >> >> + * Multiple engines may be mapped to the same OA unit. The OA unit is
> > >> >> >> + * identified by class:instance of any engine mapped to it.
> > >> >> >> + *
> > >> >> >> + * This parameter specifies the engine class and must be passed along
> > >> >> >> + * with DRM_XE_OA_PROP_OA_ENGINE_INSTANCE.
> > >> >> >> + */
> > >> >> >> + DRM_XE_OA_PROP_OA_ENGINE_CLASS,
> > >> >> >> +
> > >> >> >> + /**
> > >> >> >> + * This parameter specifies the engine instance and must be passed along
> > >> >> >> + * with DRM_XE_OA_PROP_OA_ENGINE_CLASS.
> > >> >> >> + */
> > >> >> >> + DRM_XE_OA_PROP_OA_ENGINE_INSTANCE,
> > >> >> >
> > >> >> > Because oa_unit_id has been introduced above in
> > >> >> > drm_xe_engine_class_instance, should we remove these engine class/instance
> > >> >> > properties? Since it seems OA streams can be opened directly against the oa
> > >> >> > unit identified by oa_unit_id. And the driver can itself figure out the
> > >> >> > engine class/instance from the oa_unit_id?
> > >> >>
> > >> >> Agree for the OA buffer use case.
> > >> >>
> > >> >> For query, we have used the class:instance to enable query support for
> > >> >> specific engine instance. If we can work around that somehow, then we can
> > >> >> do away with these 2 params. More like enable query for all engines that
> > >> >> belong to the OAG unit. For render, it is straight forward since we have
> > >> >> one render per OAG unit. For compute, multiple compute instances can map to
> > >> >> one OAG unit and only one instance can support the query. So user may want
> > >> >> to choose which instance that is. Although, I would just simplify it and
> > >> >> support only instance 0 of compute. If UMD is okay with it, then we should
> > >> >> be good.
> > >> >
> > >> > Can we enable the query (I guess "query" is MI_RPC) on all attached compute
> > >> > engines and have the UMD execute the query on any of the attached engines?
> > >> > Or is this mode of operation never been tried out before so risky?
> > >>
> > >> We cannot, since that is gated by a global configuration in HW that selects
> > >> a specific instance to enable the query for compute (ccs_select to be
> > >> specific). I think the limitation is that HW has only one OAC unit and only
> > >> one ccs can use it.
> > >
> > > OK. But iiuc there is also a context (or, in Xe, an exec_queue). So we
> > > should be able to turn on the query on the context/exec_queue hw_engine, no?
> > > Assuming more than one hw_engine in the context/exec_queue is an error?
> >
> > The global config (ccs_select) needs to be applied at the context switch
> > granularity which the KMD is unaware of. If the ccs_select configuration
> > were a part of the context image, it would have been simpler. If we were to
> > do this, it would have to be in the WA batch buffer in the context. The WA
> > batch would run every context switch and would do an LRI on the global
> > register. Possible, but hacky and architecturally incorrect since we would
> > be modifying a global state from the context.
>
> I think you misunderstood. I was only saying (e.g. with the current uapi)
> that 'drm_xe_oa_property_id' has a 'DRM_XE_OA_PROP_EXEC_QUEUE_ID' field in
> it. So we know which exec_queue (XE exec_queue is equivalent to i915
> gem_context) the query needs to run on. And we know the exec_queue engine
> class as well as which hardware engines are backing that exec_queue. So now
> say instead of having engine ci in 'drm_xe_oa_property_id' we can say get
> the engine ci from exec_queue. This is just exec_q->hwe[0].
>
> So if we have multiple hwe's backing backing the exec_q (say a compute
> virtual engine) we can restrict that the query runs only on the 0'th
> hwe. If we include engine ci in 'drm_xe_oa_property_id', the query can run
> on any hwe backing the exec_queue. In this case we need engine ci in
> 'drm_xe_oa_property_id', if we can impose the restriction that the query
> only run on exec_q->hwe[0], then we don't.
>
> (The correction I have from my previous mail that having only a single hwe
> in an exec_queue will probably be unacceptable).
>
> Though I am now thinking just leaving engine ci in 'drm_xe_oa_property_id'
> since there is a valid use case for it.
Sorry for that rambling mail. But I think, to be fully accurate, we only
need the hw engine instance in 'drm_xe_oa_property_id'. We can get the
class from exec_q->class.
Ashutosh
> > >> >>
> > >> >> Media engines do not support query, so we should be good for OAM.
> > >> >>
> > >> >> >
> > >> >> > Separately, there is also the question of whether we want to share the Xe
> > >> >> > OA IGT code with i915 as was done for this series. Since duplicating the
> > >> >> > IGT code as well as all the perf tools seems a bit much.
> > >> >> >
> > >> >> > Thanks.
> > >> >> > --
> > >> >> > Ashutosh
next prev parent reply other threads:[~2023-08-16 20:58 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-08 1:31 [Intel-xe] [PATCH 00/10] Add OA functionality to Xe Ashutosh Dixit
2023-08-08 1:31 ` [Intel-xe] [PATCH 01/10] drm/xe/oa: Introduce OA uapi Ashutosh Dixit
2023-08-08 22:59 ` Umesh Nerlige Ramappa
2023-08-15 19:29 ` Dixit, Ashutosh
2023-08-16 2:14 ` Umesh Nerlige Ramappa
2023-08-21 16:48 ` Dixit, Ashutosh
2023-09-01 1:07 ` Dixit, Ashutosh
2023-08-15 22:03 ` Dixit, Ashutosh
2023-08-16 1:11 ` Umesh Nerlige Ramappa
2023-08-16 1:30 ` Dixit, Ashutosh
2023-08-16 2:21 ` Umesh Nerlige Ramappa
2023-08-16 3:43 ` Dixit, Ashutosh
2023-08-16 19:58 ` Umesh Nerlige Ramappa
2023-08-16 20:38 ` Dixit, Ashutosh
2023-08-16 20:58 ` Dixit, Ashutosh [this message]
2023-08-21 4:48 ` Dixit, Ashutosh
2023-08-22 8:31 ` Francois Dugast
2023-08-31 19:55 ` Rodrigo Vivi
2023-08-31 20:12 ` Dixit, Ashutosh
2023-08-31 20:32 ` Rodrigo Vivi
2023-09-08 4:30 ` Dixit, Ashutosh
2023-08-08 1:31 ` [Intel-xe] [PATCH 02/10] drm/xe/oa: Add OA types Ashutosh Dixit
2023-08-08 1:31 ` [Intel-xe] [PATCH 03/10] drm/xe/oa: Add registers and GPU commands used by OA Ashutosh Dixit
2023-08-22 15:44 ` Umesh Nerlige Ramappa
2023-09-08 4:30 ` Dixit, Ashutosh
2023-08-08 1:31 ` [Intel-xe] [PATCH 04/10] drm/xe/oa: Module init/exit and probe/remove Ashutosh Dixit
2023-08-22 15:52 ` Umesh Nerlige Ramappa
2023-08-23 19:41 ` Umesh Nerlige Ramappa
2023-08-25 4:15 ` Dixit, Ashutosh
2023-08-08 1:31 ` [Intel-xe] [PATCH 05/10] drm/xe/oa: Add/remove config ioctl's Ashutosh Dixit
2023-08-08 1:31 ` [Intel-xe] [PATCH 06/10] drm/xe/oa: Start implementing OA stream open ioctl Ashutosh Dixit
2023-08-23 19:55 ` Umesh Nerlige Ramappa
2023-09-08 4:38 ` Dixit, Ashutosh
2023-08-08 1:31 ` [Intel-xe] [PATCH 07/10] drm/xe/oa: OA stream initialization Ashutosh Dixit
2023-08-08 1:31 ` [Intel-xe] [PATCH 08/10] drm/xe/oa: Expose OA stream fd Ashutosh Dixit
2023-08-08 1:31 ` [Intel-xe] [PATCH 09/10] drm/xe/oa: Read file_operation Ashutosh Dixit
2023-08-23 19:46 ` Umesh Nerlige Ramappa
2023-09-08 4:40 ` Dixit, Ashutosh
2023-08-08 1:31 ` [Intel-xe] [PATCH 10/10] drm/xe/oa: Implement queries Ashutosh Dixit
2023-08-22 15:55 ` Umesh Nerlige Ramappa
2023-08-08 2:04 ` [Intel-xe] ✓ CI.Patch_applied: success for Add OA functionality to Xe (rev3) Patchwork
2023-08-08 2:04 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-08-08 2:05 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-08-08 2:09 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-08-08 2:10 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-08-08 2:10 ` [Intel-xe] ✗ CI.checksparse: warning " Patchwork
2023-08-08 2:41 ` [Intel-xe] [PATCH 00/10] Add OA functionality to Xe Dixit, Ashutosh
2023-09-01 7:55 ` Lionel Landwerlin
2023-09-08 4:35 ` Dixit, Ashutosh
2023-08-08 2:45 ` [Intel-xe] ✗ CI.BAT: failure for Add OA functionality to Xe (rev3) Patchwork
2023-08-08 5:30 ` [Intel-xe] ✓ CI.Patch_applied: success for Add OA functionality to Xe (rev4) Patchwork
2023-08-08 5:30 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-08-08 5:31 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-08-08 5:35 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-08-08 5:35 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-08-08 5:36 ` [Intel-xe] ✗ CI.checksparse: warning " Patchwork
2023-08-08 6:10 ` [Intel-xe] ✗ CI.BAT: failure " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2023-07-21 2:28 [Intel-xe] [PATCH v2 00/10] Add OA functionality to Xe Ashutosh Dixit
2023-07-21 2:28 ` [Intel-xe] [PATCH 01/10] drm/xe/oa: Introduce OA uapi Ashutosh Dixit
2023-07-21 0:29 [Intel-xe] [PATCH 00/10] Add OA functionality to Xe Ashutosh Dixit
2023-07-21 0:29 ` [Intel-xe] [PATCH 01/10] drm/xe/oa: Introduce OA uapi Ashutosh Dixit
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=87sf8iso0y.wl-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=umesh.nerlige.ramappa@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox