Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Cc: robert.krzemien@intel.com, ogabbay@habana.ai,
	gzadicario@habana.ai, Harish Chegondi <harish.chegondi@intel.com>,
	bdotan@habana.ai, talbo@habana.ai,
	intel-xe@lists.freedesktop.org
Subject: Re: [Intel-xe] [PATCH 1/2] drm/xe/uapi: "Perf" layer to support multiple perf counter stream types
Date: Fri, 27 Oct 2023 20:44:10 -0700	[thread overview]
Message-ID: <87il6rcsxh.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <ZSil5GiJqEvijXNZ@unerlige-ril>

On Thu, 12 Oct 2023 19:05:24 -0700, Umesh Nerlige Ramappa wrote:
>

Hi Umesh,

> >> I would just squash the 2 patches here since this is a new interface and we
> >> don't care much about what existed earlier.
> >
> > OK, I'll squash the two patches.

Done: https://patchwork.freedesktop.org/series/125724/

> >> > +/**
> >> > + * struct drm_xe_perf_param - XE perf layer param
> >> > + *
> >> > + * The perf layer enables multiplexing perf counter streams of multiple
> >> > + * types. The actual params for a particular stream operation are supplied
> >> > + * via the @param pointer (use __copy_from_user to get these params).
> >> > + */
> >> > +struct drm_xe_perf_param {
> >> > +	/** @extensions: Pointer to the first extension struct, if any */
> >> > +	__u64 extensions;
> >> > +	/** @perf_type: Perf stream type, of enum @drm_xe_perf_type */
> >> > +	__u64 perf_type;
> >> > +	/** @param_size: size of data struct pointed to by @param */
> >> > +	__u64 param_size;
> >>
> >> Since this structure is expandable using extensions, maybe we don't need to
> >> worry about the param_size. We can drop it. The size would matter if the
> >> only way to extend a structure was to add members to the end.
> >
> > Hmm, note param_size is not the size of this struct, it is the "size of
> > data struct pointed to by @param". Even the struct pointed to by @param
> > probably will also have an extensions member.
> >
> > Even then I am thinking no harm in having the param_size member since it
> > helps in cases where UMD and KMD versions are different and the struct size
> > has changed, so each has a different notion of what the struct size
> > is. Having param_size available enables the kernel to resolve such cases if
> > the need arises in the future (as is done in drm_ioctl). UMD just needs to
> > fill in param_size as sizeof(struct) it is passing in via @param, so
> > doesn't look too horrible. So I'm thinking of leaving it in just in case.
> >
> > What do you think?
>
> IMO, if extensions are members of all structs in our uApi, then we should
> just use that for extending the structs. I think the size is added burden
> on UMDs to populate. In case of drm_ioctl, the UMD does not see this, so
> it's probably okay.

I have dropped param_size for now in the above series to allow for the
basic patch to get merged first. I might submit a separate patch for
param_size later with additional justification and then we can debate that.

Thanks.
--
Ashutosh

  reply	other threads:[~2023-10-28  3:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-11 17:26 [Intel-xe] [PATCH v2 0/2] Xe PERF layer Ashutosh Dixit
2023-10-11 17:26 ` [Intel-xe] [PATCH 1/2] drm/xe/uapi: "Perf" layer to support multiple perf counter stream types Ashutosh Dixit
2023-10-12 16:51   ` Umesh Nerlige Ramappa
2023-10-12 18:04     ` Dixit, Ashutosh
2023-10-13  2:05       ` Umesh Nerlige Ramappa
2023-10-28  3:44         ` Dixit, Ashutosh [this message]
2023-10-11 17:26 ` [Intel-xe] [PATCH 2/2] drm/xe/uapi: Multiplex PERF ops through a single PERF ioctl Ashutosh Dixit
2023-10-11 23:01 ` [Intel-xe] ✓ CI.Patch_applied: success for Xe PERF layer Patchwork
2023-10-11 23:01 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-10-11 23:03 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-10-11 23:10 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-10-11 23:10 ` [Intel-xe] ✗ CI.Hooks: failure " Patchwork
2023-10-11 23:11 ` [Intel-xe] ✓ CI.checksparse: success " Patchwork
2023-10-11 23:33 ` [Intel-xe] ✓ CI.BAT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2023-10-09 22:24 [Intel-xe] [PATCH 0/2] " Ashutosh Dixit
2023-10-09 22:24 ` [Intel-xe] [PATCH 1/2] drm/xe/uapi: "Perf" layer to support multiple perf counter stream types 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=87il6rcsxh.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=bdotan@habana.ai \
    --cc=gzadicario@habana.ai \
    --cc=harish.chegondi@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=ogabbay@habana.ai \
    --cc=robert.krzemien@intel.com \
    --cc=talbo@habana.ai \
    --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