intel-xe.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Harish Chegondi <harish.chegondi@intel.com>
Cc: intel-xe@lists.freedesktop.org, james.ausmus@intel.com,
	felix.j.degrood@intel.com, jose.souza@intel.com,
	matias.a.cabral@intel.com, joshua.santosh.ranjan@intel.com,
	shubham.kumar@intel.com, matthew.d.roper@intel.com,
	matthew.olson@intel.com,
	Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Subject: Re: [PATCH v5 2/7] drm/xe/eustall: Introduce API for EU stall sampling
Date: Wed, 20 Nov 2024 10:40:37 -0800	[thread overview]
Message-ID: <8534jllpei.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <Zz1szeXBrZfqzQKg@intel.com>

On Tue, 19 Nov 2024 20:59:57 -0800, Harish Chegondi wrote:
>
> > > diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
> > > index 4a8a4a63e99c..80aaa5b50c8a 100644
> > > --- a/include/uapi/drm/xe_drm.h
> > > +++ b/include/uapi/drm/xe_drm.h
> > > @@ -1397,6 +1397,8 @@ struct drm_xe_wait_user_fence {
> > >  enum drm_xe_observation_type {
> > >	/** @DRM_XE_OBSERVATION_TYPE_OA: OA observation stream type */
> > >	DRM_XE_OBSERVATION_TYPE_OA,
> > > +	/** @DRM_XE_OBSERVATION_TYPE_EU_STALL: EU stall sampling observation stream type */
> > > +	DRM_XE_OBSERVATION_TYPE_EU_STALL,
> > >  };
> > >
> > >  /**
> > > @@ -1713,6 +1715,43 @@ struct drm_xe_oa_stream_info {
> > >	__u64 reserved[3];
> > >  };
> > >
> > > +/**
> > > + * enum drm_xe_eu_stall_property_id - EU stall sampling input property ids.
> > > + *
> > > + * These properties are passed to the driver at open as a chain of
> > > + * @drm_xe_ext_set_property structures with @property set to these
> > > + * properties' enums and @value set to the corresponding values of these
> > > + * properties. @drm_xe_user_extension base.name should be set to
> > > + * @DRM_XE_EU_STALL_EXTENSION_SET_PROPERTY.
> > > + *
> > > + * With the file descriptor obtained from open, user space must enable
> > > + * the EU stall stream fd with @DRM_XE_OBSERVATION_IOCTL_ENABLE before
> > > + * calling read.
> >
> > Good to add this. Maybe also add "EIO return from read() indicates buffer
> > overflow" since EIO return is part of uapi.
> Can I add a comment block on EU stall sampling above the comment block
> for this structure? While it is important to document read() returning
> -EIO for buffer overflow, I am wondering if this is the correct place to
> add the comment since it is unrelated to the below structure?

There don't seem to be any such comment blocks in this file. So no need to
overthink this, just add a line about EIO right here and be done with it.

> > > + */
> > > +enum drm_xe_eu_stall_property_id {
> > > +#define DRM_XE_EU_STALL_EXTENSION_SET_PROPERTY		0
> > > +	/**
> > > +	 * @DRM_XE_EU_STALL_PROP_SAMPLE_RATE: Sampling rate
> > > +	 * in multiples of 251 cycles. Valid values are 1 to 7.
> > > +	 * If the value is 1, sampling interval is 251 cycles.
> > > +	 * If the value is 7, sampling interval is 7 x 251 cycles.
> > > +	 */
> > > +	DRM_XE_EU_STALL_PROP_SAMPLE_RATE = 1,
> >
> > There is an unaddressed comment from Umesh about this (on the previous
> > version), we need to address it.
> I am still working on the comment from Umesh and seeking feedback from
> others including the user space folks. I think having this input as it
> is in terms of cycles is more generic and more future proof as the clock
> frequency can vary from GPU to GPU and even for a GPU it can vary from
> time to time due to performance and power reasons?

Will respond to this in the thread where Umesh's original comment is.

Ashutosh

  reply	other threads:[~2024-11-20 18:40 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-18  9:07 [PATCH v5 0/7] Add support for EU stall sampling Harish Chegondi
2024-11-18  9:07 ` [PATCH v5 1/7] drm/xe/topology: Add a function to find the index of the last enabled DSS in a mask Harish Chegondi
2024-11-18  9:07 ` [PATCH v5 2/7] drm/xe/eustall: Introduce API for EU stall sampling Harish Chegondi
2024-11-18 18:58   ` Dixit, Ashutosh
2024-11-20  4:59     ` Harish Chegondi
2024-11-20 18:40       ` Dixit, Ashutosh [this message]
2024-11-18  9:07 ` [PATCH v5 3/7] drm/xe/eustall: Implement EU stall sampling APIs for Xe_HPC Harish Chegondi
2024-11-21 15:10   ` Olson, Matthew
2024-12-10  7:09     ` Harish Chegondi
2024-11-18  9:07 ` [PATCH v5 4/7] drm/xe/eustall: Return -EIO error from read() if HW drops data Harish Chegondi
2024-11-18  9:07 ` [PATCH v5 5/7] drm/xe/eustall: Add EU stall sampling support for Xe2 Harish Chegondi
2024-11-18  9:07 ` [PATCH v5 6/7] drm/xe/query: Add a device query to get EU stall data information Harish Chegondi
2024-11-18  9:07 ` [PATCH v5 7/7] drm/xe/eustall: Add workaround 22016596838 which applies to PVC Harish Chegondi
2024-11-18 13:22 ` ✓ CI.Patch_applied: success for Add support for EU stall sampling Patchwork
2024-11-18 13:22 ` ✗ CI.checkpatch: warning " Patchwork
2024-11-18 13:24 ` ✓ CI.KUnit: success " Patchwork
2024-11-18 13:42 ` ✓ CI.Build: " Patchwork
2024-11-18 13:42 ` ✗ CI.Hooks: failure " Patchwork
2024-11-18 13:45 ` ✓ CI.checksparse: success " Patchwork
2024-11-18 14:04 ` ✓ CI.BAT: " Patchwork
2024-11-18 17:29 ` ✗ CI.FULL: failure " Patchwork

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=8534jllpei.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=felix.j.degrood@intel.com \
    --cc=harish.chegondi@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=james.ausmus@intel.com \
    --cc=jose.souza@intel.com \
    --cc=joshua.santosh.ranjan@intel.com \
    --cc=matias.a.cabral@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=matthew.olson@intel.com \
    --cc=shubham.kumar@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;
as well as URLs for NNTP newsgroup(s).