All of lore.kernel.org
 help / color / mirror / Atom feed
From: Raag Jadav <raag.jadav@intel.com>
To: Sk Anirban <sk.anirban@intel.com>
Cc: igt-dev@lists.freedesktop.org, anshuman.gupta@intel.com,
	badal.nilawar@intel.com, riana.tauro@intel.com,
	karthik.poosa@intel.com, soham.purkait@intel.com,
	mallesh.koujalagi@intel.com, vinay.belgaumkar@intel.com
Subject: Re: [PATCH v2 1/2] tests/intel/xe_gt_freq: Modify test to support new throttle reasons sysfs
Date: Mon, 8 Dec 2025 16:11:07 +0100	[thread overview]
Message-ID: <aTbqi7ZQO0IZjXdE@black.igk.intel.com> (raw)
In-Reply-To: <20251204062428.401397-5-sk.anirban@intel.com>

On Thu, Dec 04, 2025 at 11:54:30AM +0530, Sk Anirban wrote:
> Change throttle_basic_api to read the new atomic reasons attribute
> instead of checking status and individual reason files separately.
> This validates the kernel's TOCTOU-free throttling interface.

...

> +	char *throttle_reasons;
> +	int sysfs_fd;
> +
> +	sysfs_fd = xe_sysfs_gt_open(fd, gt_id);

This is actually gt_open so let's use gt_fd for consistency.

> +	igt_assert_lte(0, sysfs_fd);
> +
> +	throttle_reasons = igt_sysfs_get(sysfs_fd, "freq0/throttle/reasons");
> +	igt_assert(throttle_reasons);
> +
> +	igt_debug("gt%d/freq0/throttle/reasons: %s\n", gt_id, throttle_reasons);
> +
> +	if (strcmp(throttle_reasons, "none"))
> +		igt_info("GT %d is being throttled due to reasons: %s\n", gt_id, throttle_reasons);

I'm wondering if we should print the results explicitly and drop the
duplicate igt_debug() above? I'll let you decide which message to use :)

Raag

> +	free(throttle_reasons);
> +	close(sysfs_fd);
>  }
>  
>  /**
> -- 
> 2.43.0
> 

  reply	other threads:[~2025-12-08 15:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-04  6:24 [PATCH v2 0/2] tests/intel/xe_gt_freq: Modify test to support new throttle reasons sysfs Sk Anirban
2025-12-04  6:24 ` [PATCH v2 1/2] " Sk Anirban
2025-12-08 15:11   ` Raag Jadav [this message]
2025-12-04  6:24 ` [PATCH v2 2/2] HAX: Add throttle_basic_api test to fast feedback list Sk Anirban
2025-12-04  7:28 ` ✓ i915.CI.BAT: success for tests/intel/xe_gt_freq: Modify test to support new throttle reasons sysfs (rev2) Patchwork
2025-12-04  7:37 ` ✓ Xe.CI.BAT: " Patchwork
2025-12-04  9:19 ` ✗ Xe.CI.Full: failure " Patchwork
2025-12-05 15:03 ` ✗ i915.CI.Full: " 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=aTbqi7ZQO0IZjXdE@black.igk.intel.com \
    --to=raag.jadav@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=karthik.poosa@intel.com \
    --cc=mallesh.koujalagi@intel.com \
    --cc=riana.tauro@intel.com \
    --cc=sk.anirban@intel.com \
    --cc=soham.purkait@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 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.