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>
Subject: Re: [PATCH v4 2/5] drm/xe/eustall: Introduce API for EU stall sampling
Date: Mon, 14 Oct 2024 15:21:12 -0700 [thread overview]
Message-ID: <85h69e2unb.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <a4ca443e9dc0e25ff4d77908f785cdfdf6c80f7f.1728884074.git.harish.chegondi@intel.com>
On Sun, 13 Oct 2024 23:00:33 -0700, Harish Chegondi wrote:
>
Hi Harish,
Once again only reviewing the uapi (changes to xe_drm.h) for now.
> diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
> index c4182e95a619..50ad6b2e1450 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,
> };
>
> /**
> @@ -1696,6 +1698,46 @@ 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 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.
We need to add a comment here saying that EU stall stream has to be enabled
using @DRM_XE_OBSERVATION_IOCTL_ENABLE before reading data. Also, another
comment that EIO return from read() indicates buffer overflow.
We are not using DRM_XE_OBSERVATION_IOCTL_STATUS here the way OA does to
return the reason for EIO return. I think that is OK for now. If later it
turns out we have other reasons (apart from overflow) for returning EIO, we
can handle it via capabilities.
> + */
> +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,
> +
> + /**
> + * @DRM_XE_EU_STALL_PROP_POLL_PERIOD: EU stall data
> + * poll period in nanoseconds at which the driver polls
> + * for EU stall data in the buffer. Should be at least 100000 ns.
> + */
> + DRM_XE_EU_STALL_PROP_POLL_PERIOD,
> +
> + /**
> + * @DRM_XE_EU_STALL_PROP_EVENT_REPORT_COUNT: Minimum number of
> + * EU stall data rows to be present in the kernel buffer for
> + * poll() to set POLLIN (data present).
> + */
> + DRM_XE_EU_STALL_PROP_EVENT_REPORT_COUNT,
> +
> + /**
> + * @DRM_XE_EU_STALL_PROP_GT_ID: GT ID of the GT on which
> + * EU stall data will be captured.
> + */
> + DRM_XE_EU_STALL_PROP_GT_ID,
Note that we need to show UMD usage of /each/ of these properties in order
to merge them. So are we sure at least one UMD is using each of these
properties? If not we need to drop them from xe_drm.h.
I don't like DRM_XE_EU_STALL_PROP_POLL_PERIOD in particular because it is
exposing a parameter related to internal implemenation in the kernel. OA
had a similar property but turned out it was never used. Not sure what the
situation here is.
> +};
> +
> #if defined(__cplusplus)
> }
> #endif
> --
> 2.45.1
>
Thanks.
--
Ashutosh
next prev parent reply other threads:[~2024-10-14 22:21 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-14 6:00 [PATCH v4 0/5] Add support for EU stall sampling Harish Chegondi
2024-10-14 6:00 ` [PATCH v4 1/5] drm/xe/topology: Add a function to find the index of the last DSS in a mask Harish Chegondi
2024-10-14 21:26 ` Dixit, Ashutosh
2024-10-16 3:44 ` Harish Chegondi
2024-10-18 21:26 ` Matt Roper
2024-10-14 6:00 ` [PATCH v4 2/5] drm/xe/eustall: Introduce API for EU stall sampling Harish Chegondi
2024-10-14 22:21 ` Dixit, Ashutosh [this message]
2024-10-18 22:03 ` Matt Roper
2024-11-14 16:23 ` Umesh Nerlige Ramappa
2024-11-19 23:59 ` Harish Chegondi
2024-11-20 19:04 ` Dixit, Ashutosh
2024-11-21 1:05 ` Umesh Nerlige Ramappa
2024-11-21 3:18 ` Dixit, Ashutosh
2024-11-22 18:18 ` Dixit, Ashutosh
2024-11-27 18:47 ` Harish Chegondi
2024-11-29 4:31 ` Kumar, Shubham
2024-11-29 4:35 ` Kumar, Shubham
2024-10-14 6:00 ` [PATCH v4 3/5] drm/xe/eustall: Implement EU stall sampling APIs Harish Chegondi
2024-10-18 23:31 ` Matt Roper
2024-10-14 6:00 ` [PATCH v4 4/5] drm/xe/query: Add a device query to get EU stall data information Harish Chegondi
2024-10-14 21:39 ` Dixit, Ashutosh
2024-10-14 6:00 ` [PATCH v4 5/5] drm/xe/eustall: Add workaround 22016596838 which applies to PVC Harish Chegondi
2024-10-14 6:05 ` ✓ CI.Patch_applied: success for Add support for EU stall sampling Patchwork
2024-10-14 6:05 ` ✗ CI.checkpatch: warning " Patchwork
2024-10-14 6:06 ` ✓ CI.KUnit: success " Patchwork
2024-10-14 6:18 ` ✓ CI.Build: " Patchwork
2024-10-14 6:20 ` ✗ CI.Hooks: failure " Patchwork
2024-10-14 6:22 ` ✓ CI.checksparse: success " Patchwork
2024-10-14 6:47 ` ✓ CI.BAT: " Patchwork
2024-10-14 7:54 ` ✗ 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=85h69e2unb.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=shubham.kumar@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.