Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Souza, Jose" <jose.souza@intel.com>
To: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
Cc: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	"Krzemien, Robert" <robert.krzemien@intel.com>,
	"Nerlige Ramappa, Umesh" <umesh.nerlige.ramappa@intel.com>,
	"Landwerlin, Lionel G" <lionel.g.landwerlin@intel.com>
Subject: Re: [PATCH 00/17] Add OA functionality to Xe
Date: Tue, 21 May 2024 14:47:58 +0000	[thread overview]
Message-ID: <595ea35d63cd92777b36f6ab87cd1f6483a4b38f.camel@intel.com> (raw)
In-Reply-To: <96d03111d07e8182e7ecb3c0ca1942c7fef22e6f.camel@intel.com>

On Tue, 2024-05-21 at 07:43 -0700, José Roberto de Souza wrote:
> On Fri, 2024-05-17 at 18:42 -0700, Dixit, Ashutosh wrote:
> > On Fri, 17 May 2024 11:42:39 -0700, Souza, Jose wrote:
> > > 
> > 
> > Hi Jose,
> > 
> > > Hi
> > > 
> > > I hope I'm replying to the latest version...
> > > 
> > > Just a few comments I have in the uAPI:
> > > 
> > > - Rename DRM_XE_OA_PROPERTY_OA_EXPONENT to DRM_XE_OA_PROPERTY_OA_PERIOD_EXPONENT, for better clarity.
> > 
> > Sure, will do.
> > 
> > > - Some Perf uAPIs added here don't have usage in Mesa, see those below. Not sure if MDAPI or gviz will make use of it, if not the approach is to
> > > remove uAPIs until there is UMD using it:
> > > 	- DRM_XE_PERF_IOCTL_INFO + drm_xe_oa_stream_info
> > 
> > MDAPI uses this to implement mmap + mmio trigger.
> > 
> > > 	- DRM_XE_DEVICE_QUERY_OA_UNITS + drm_xe_query_oa_units + drm_xe_oa_unit
> > 
> > Yes Gpuvis as well as I believe MDAPI use this. Actually I am surprised
> > Mesa is not using this. Basically the query provides the following
> > information:
> > 
> > * Which engines are attached to which OA units. This maybe Mesa can skip
> >   since render engine is almost certainly attached to OA unit 0
> >   (DRM_XE_OA_PROPERTY_OA_UNIT_ID to be provided when opening OA stream).
> > 
> > * But the query also provides oa_timestamp_freq which needs to be used in
> >   interpreting OA timestamps. oa_timestamp_freq can differ from
> >   reference_clock included in 'struct drm_xe_gt' for certain platforms
> >   (currently DG2/PVC/MTL). So if Mesa needs to work for these platforms,
> >   you need to use drm_xe_query_oa_units.
> > 
> > > - DRM_XE_OASTATUS_* values are based on HW definition, I think it should
> > > not follow HW at least for DRM_XE_OASTATUS_MMIO_TRG_Q_FULL and avoid have
> > > a blank space of bits not used in the uAPI
> > 
> > Sure, will change this too. Umesh also mentioned this.
> > 
> > > - Perf stream read() should give us a hint that drm_xe_oa_stream_status
> > > - needs to be read, that discussion is already in progress thank you for
> > > - that
> > 
> > Yes, we are going ahead with that, read() will return EIO errno when KMD
> > encounters errors (or oastatus) signalled by HW, and when UMD sees that,
> > UMD can call the stream status ioctl to get the status.
> > 
> > > 
> > > Other than that the uAPI LGTM.
> > > 
> > > There is the hold_preemption feature that is missing but I think that can
> > > be added later...
> > 
> > Yes, the plan is to implement it soon. Also another feature to synchronize
> > OA unit programming with workload submission is missing, and the plan is to
> > implement that soon too. Hopefully, we can get what we currently have
> > merged first, based on Mesa and GpuVis pull requests and do these missing
> > pieces as follow on's.
> > 
> > > 
> > > thank you
> 
> Other ask, can you remove this 'Failed to remove unknown OA config' debug message from xe_oa_remove_config_ioctl()?

Missed 'Insufficient privileges to remove xe OA config', that need to be removed too from xe_oa_remove_config_ioctl().

> Mesa will be using DRM_XE_PERF_OP_REMOVE_CONFIG with config id set to UINT64_MAX to detect if Xe KMD supports OA counters and if application has
> enough permissions to use it.
> So it causes dmesg to be flooded with 'xe 0000:00:02.0: [drm:xe_oa_remove_config_ioctl [xe]] Failed to remove unknown OA config' messages when running
> tests suites.
> 
> Or do you have other suggestion of uAPI that I can use.
> 
> > 
> > Thanks for the review and feedback :)
> > --
> > Ashutosh
> 


  reply	other threads:[~2024-05-21 14:48 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-15  1:35 [PATCH 00/17] Add OA functionality to Xe Ashutosh Dixit
2024-03-15  1:35 ` [PATCH 01/17] drm/xe/perf/uapi: "Perf" layer to support multiple perf counter stream types Ashutosh Dixit
2024-03-15  1:35 ` [PATCH 02/17] drm/xe/perf/uapi: Add perf_stream_paranoid sysctl Ashutosh Dixit
2024-03-15  1:35 ` [PATCH 03/17] drm/xe/oa/uapi: Add OA data formats Ashutosh Dixit
2024-03-15  1:35 ` [PATCH 04/17] drm/xe/oa/uapi: Initialize OA units Ashutosh Dixit
2024-03-15  1:35 ` [PATCH 05/17] drm/xe/oa/uapi: Add/remove OA config perf ops Ashutosh Dixit
2024-03-15  1:35 ` [PATCH 06/17] drm/xe/oa/uapi: Define and parse OA stream properties Ashutosh Dixit
2024-03-15  1:35 ` [PATCH 07/17] drm/xe/oa: OA stream initialization (OAG) Ashutosh Dixit
2024-03-15  1:35 ` [PATCH 08/17] drm/xe/oa/uapi: Expose OA stream fd Ashutosh Dixit
2024-03-15  1:35 ` [PATCH 09/17] drm/xe/oa/uapi: Read file_operation Ashutosh Dixit
2024-03-15  1:35 ` [PATCH 10/17] drm/xe/oa: Add OAR support Ashutosh Dixit
2024-03-15  1:35 ` [PATCH 11/17] drm/xe/oa: Add OAC support Ashutosh Dixit
2024-03-15  1:35 ` [PATCH 12/17] drm/xe/oa/uapi: Query OA unit properties Ashutosh Dixit
2024-04-24 23:26   ` Dixit, Ashutosh
2024-04-25 13:10     ` Lucas De Marchi
2024-03-15  1:35 ` [PATCH 13/17] drm/xe/oa/uapi: OA buffer mmap Ashutosh Dixit
2024-03-15  1:35 ` [PATCH 14/17] drm/xe/oa: Add MMIO trigger support Ashutosh Dixit
2024-03-15  1:35 ` [PATCH 15/17] drm/xe/oa: Override GuC RC with OA on PVC Ashutosh Dixit
2024-03-15  1:35 ` [PATCH 16/17] drm/xe/oa: Changes to OA_TAKEN Ashutosh Dixit
2024-03-15  1:35 ` [PATCH 17/17] drm/xe/oa: Enable Xe2+ overrun mode Ashutosh Dixit
2024-03-15  1:53 ` ✓ CI.Patch_applied: success for Add OA functionality to Xe (rev13) Patchwork
2024-03-15  1:53 ` ✗ CI.checkpatch: warning " Patchwork
2024-03-15  1:54 ` ✓ CI.KUnit: success " Patchwork
2024-03-15  2:05 ` ✓ CI.Build: " Patchwork
2024-03-15  2:07 ` ✗ CI.Hooks: failure " Patchwork
2024-03-15  2:08 ` ✓ CI.checksparse: success " Patchwork
2024-03-15  2:34 ` ✓ CI.BAT: " Patchwork
2024-05-17 18:42 ` [PATCH 00/17] Add OA functionality to Xe Souza, Jose
2024-05-18  1:42   ` Dixit, Ashutosh
2024-05-21 14:43     ` Souza, Jose
2024-05-21 14:47       ` Souza, Jose [this message]
2024-05-21 16:10         ` Dixit, Ashutosh
2024-05-21 16:29           ` Souza, Jose
2024-05-21 16:43             ` Dixit, Ashutosh
2024-05-21 17:39               ` Souza, Jose
2024-05-21 18:02                 ` Dixit, Ashutosh
2024-05-21 18:11                   ` Dixit, Ashutosh
2024-05-21 19:01                     ` Souza, Jose
2024-05-21 18:48                   ` Souza, Jose
2024-05-21 20:24                     ` Dixit, Ashutosh
2024-05-21 21:00                       ` Souza, Jose
2024-05-22  2:28                         ` Dixit, Ashutosh
2024-05-22 16:08                           ` Souza, Jose
2024-05-22  4:42             ` Dixit, Ashutosh
2024-05-22 16:13               ` Souza, Jose
2024-05-22 18:50                 ` Dixit, Ashutosh
2024-05-22 19:30                   ` Souza, Jose
2024-05-25  1:16                     ` Dixit, Ashutosh
2024-05-27 17:02                       ` Souza, Jose
2024-05-21 19:58 ` Souza, Jose

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=595ea35d63cd92777b36f6ab87cd1f6483a4b38f.camel@intel.com \
    --to=jose.souza@intel.com \
    --cc=ashutosh.dixit@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lionel.g.landwerlin@intel.com \
    --cc=robert.krzemien@intel.com \
    --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