Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
To: Riana Tauro <riana.tauro@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <anshuman.gupta@intel.com>,
	<lucas.demarchi@intel.com>, <michal.wajdeczko@intel.com>,
	<vinay.belgaumkar@intel.com>
Subject: Re: [PATCH 3/3] drm/xe/pf: Enable per-function engine activity stats
Date: Thu, 6 Mar 2025 16:08:56 -0800	[thread overview]
Message-ID: <Z8o5GHw6PCsGic5b@orsosgc001> (raw)
In-Reply-To: <20250304095743.3274062-4-riana.tauro@intel.com>

On Tue, Mar 04, 2025 at 03:27:43PM +0530, Riana Tauro wrote:
>Enable per-function engine activity stats when VF's are enabled
>and disable when VF's are disabled
>
>v2: fix commit message
>    remove reset stats from pf config (Michal)
>
>Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
>Signed-off-by: Riana Tauro <riana.tauro@intel.com>

lgtm,

Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>

Thanks,
Umesh
>---
> drivers/gpu/drm/xe/xe_pci_sriov.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
>diff --git a/drivers/gpu/drm/xe/xe_pci_sriov.c b/drivers/gpu/drm/xe/xe_pci_sriov.c
>index b9ac3b4e0497..d78e57070931 100644
>--- a/drivers/gpu/drm/xe/xe_pci_sriov.c
>+++ b/drivers/gpu/drm/xe/xe_pci_sriov.c
>@@ -7,6 +7,7 @@
> #include "xe_device.h"
> #include "xe_gt_sriov_pf_config.h"
> #include "xe_gt_sriov_pf_control.h"
>+#include "xe_guc_engine_activity.h"
> #include "xe_pci_sriov.h"
> #include "xe_pm.h"
> #include "xe_sriov.h"
>@@ -120,6 +121,20 @@ static void pf_link_vfs(struct xe_device *xe, int num_vfs)
> 	}
> }
>
>+static void pf_engine_activity_stats(struct xe_device *xe, unsigned int num_vfs, bool enable)
>+{
>+	struct xe_gt *gt;
>+	unsigned int id;
>+	int ret = 0;
>+
>+	for_each_gt(gt, xe, id) {
>+		ret = xe_guc_engine_activity_function_stats(&gt->uc.guc, num_vfs, enable);
>+		if (ret)
>+			xe_sriov_info(xe, "Failed to %s engine activity function stats (%pe)\n",
>+				      str_enable_disable(enable), ERR_PTR(ret));
>+	}
>+}
>+
> static int pf_enable_vfs(struct xe_device *xe, int num_vfs)
> {
> 	struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
>@@ -154,6 +169,9 @@ static int pf_enable_vfs(struct xe_device *xe, int num_vfs)
>
> 	xe_sriov_info(xe, "Enabled %u of %u VF%s\n",
> 		      num_vfs, total_vfs, str_plural(total_vfs));
>+
>+	pf_engine_activity_stats(xe, num_vfs, true);
>+
> 	return num_vfs;
>
> failed:
>@@ -177,6 +195,8 @@ static int pf_disable_vfs(struct xe_device *xe)
> 	if (!num_vfs)
> 		return 0;
>
>+	pf_engine_activity_stats(xe, num_vfs, false);
>+
> 	pci_disable_sriov(pdev);
>
> 	pf_reset_vfs(xe, num_vfs);
>-- 
>2.47.1
>

  reply	other threads:[~2025-03-07  0:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-04  9:57 [PATCH 0/3] PMU support for function engine activity Riana Tauro
2025-03-04  9:57 ` [PATCH 1/3] drm/xe: Add support for per-function " Riana Tauro
2025-03-06 23:59   ` Umesh Nerlige Ramappa
2025-03-10  5:46     ` Riana Tauro
2025-03-04  9:57 ` [PATCH 2/3] drm/xe/xe_pmu: Add PMU support for per-function engine activity stats Riana Tauro
2025-03-07  0:07   ` Umesh Nerlige Ramappa
2025-03-10  5:47     ` Riana Tauro
2025-03-04  9:57 ` [PATCH 3/3] drm/xe/pf: Enable " Riana Tauro
2025-03-07  0:08   ` Umesh Nerlige Ramappa [this message]
2025-03-04 10:24 ` ✓ CI.Patch_applied: success for PMU support for function engine activity Patchwork
2025-03-04 10:25 ` ✓ CI.checkpatch: " Patchwork
2025-03-04 10:26 ` ✓ CI.KUnit: " Patchwork
2025-03-04 10:43 ` ✓ CI.Build: " Patchwork
2025-03-04 10:45 ` ✓ CI.Hooks: " Patchwork
2025-03-04 10:46 ` ✓ CI.checksparse: " Patchwork
2025-03-04 11:06 ` ✓ Xe.CI.BAT: " Patchwork
2025-03-04 12:12 ` ✗ Xe.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=Z8o5GHw6PCsGic5b@orsosgc001 \
    --to=umesh.nerlige.ramappa@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=michal.wajdeczko@intel.com \
    --cc=riana.tauro@intel.com \
    --cc=vinay.belgaumkar@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