From: Matthew Brost <matthew.brost@intel.com>
To: Tejas Upadhyay <tejas.upadhyay@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [Intel-xe] [PATCH V9 4/6] drm/xe: Add timeslice duration engine property to sysfs
Date: Thu, 27 Jul 2023 14:52:04 +0000 [thread overview]
Message-ID: <ZMKElDAM3326/Njm@DUT025-TGLU.fm.intel.com> (raw)
In-Reply-To: <20230727082235.905240-5-tejas.upadhyay@intel.com>
On Thu, Jul 27, 2023 at 01:52:33PM +0530, Tejas Upadhyay wrote:
> Timeslices between multiple context is supported via
> guc scheduling. Add sysfs entry to provide user defined
> timeslice duration to guc scheduling.
>
> The timeslice duration can be adjusted per-engine class using,
>
> /sys/class/drm/cardX/device/tileN/gtN/engines/ccs/timeslice_duration_us
>
> V7:
> - Rebase to use s/xe_engine/xe_hw_engine/ - Matt
> V6:
> - Remove duration validation, not relevant - Niranjana
> V5:
> - Rebase to replace hw engine with eclass interface
> V4:
> - Rebase to per class engine props interface
> V3:
> - Rebase
> - Update commit messge to add tile
> V2:
> - Rebase
>
> Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
> ---
> drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 30 +++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c b/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c
> index 5e2dba0be8eb..b1c13d27bcf4 100644
> --- a/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c
> +++ b/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c
> @@ -78,6 +78,35 @@ static ssize_t job_timeout_default(struct kobject *kobj,
> static struct kobj_attribute job_timeout_def =
> __ATTR(job_timeout_ms, 0444, job_timeout_default, NULL);
>
> +static ssize_t timeslice_duration_store(struct kobject *kobj,
> + struct kobj_attribute *attr,
> + const char *buf, size_t count)
> +{
> + struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj);
> + u32 duration;
> + int err;
> +
> + err = kstrtou32(buf, 0, &duration);
> + if (err)
> + return err;
> +
> + WRITE_ONCE(eclass->sched_props.timeslice_us, duration);
> +
> + return count;
> +}
> +
> +static ssize_t timeslice_duration_show(struct kobject *kobj,
> + struct kobj_attribute *attr, char *buf)
> +{
> + struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj);
> +
> + return sprintf(buf, "%u\n", eclass->sched_props.timeslice_us);
> +}
> +
> +static struct kobj_attribute timeslice_duration_attr =
> + __ATTR(timeslice_duration_us, 0644, timeslice_duration_show,
> + timeslice_duration_store);
> +
> static ssize_t timeslice_default(struct kobject *kobj,
> struct kobj_attribute *attr, char *buf)
> {
> @@ -110,6 +139,7 @@ static const struct attribute *defaults[] = {
>
> static const struct attribute *files[] = {
> &job_timeout_attr.attr,
> + ×lice_duration_attr.attr,
> NULL
> };
>
> --
> 2.25.1
>
next prev parent reply other threads:[~2023-07-27 14:52 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 8:22 [Intel-xe] [PATCH V9 0/6] drm/xe: Add engine scheduler control interface Tejas Upadhyay
2023-07-27 8:22 ` [Intel-xe] [PATCH V9 1/6] drm/xe: Add sysfs entries for engines under its GT Tejas Upadhyay
2023-07-27 14:41 ` Matthew Brost
2023-07-28 13:22 ` Upadhyay, Tejas
2023-07-27 8:22 ` [Intel-xe] [PATCH V9 2/6] drm/xe: Add sysfs for default engine scheduler properties Tejas Upadhyay
2023-07-27 14:47 ` Matthew Brost
2023-07-27 8:22 ` [Intel-xe] [PATCH V9 3/6] drm/xe: Add job timeout engine property to sysfs Tejas Upadhyay
2023-07-27 14:51 ` Matthew Brost
2023-07-27 8:22 ` [Intel-xe] [PATCH V9 4/6] drm/xe: Add timeslice duration " Tejas Upadhyay
2023-07-27 14:52 ` Matthew Brost [this message]
2023-07-27 8:22 ` [Intel-xe] [PATCH V9 5/6] drm/xe: Add sysfs for preempt reset timeout Tejas Upadhyay
2023-07-27 14:54 ` Matthew Brost
2023-07-27 8:22 ` [Intel-xe] [PATCH V9 6/6] drm/xe: Add min/max cap for engine scheduler properties Tejas Upadhyay
2023-07-27 15:26 ` Matthew Brost
2023-07-28 4:44 ` Niranjana Vishwanathapura
2023-07-28 5:04 ` Matthew Brost
2023-07-28 5:54 ` Upadhyay, Tejas
2023-07-28 6:25 ` Niranjana Vishwanathapura
2023-07-28 7:36 ` Upadhyay, Tejas
2023-07-28 14:24 ` Matthew Brost
2023-07-28 14:27 ` Upadhyay, Tejas
2023-07-28 14:53 ` Niranjana Vishwanathapura
2023-07-28 14:20 ` Matthew Brost
2023-07-27 8:59 ` [Intel-xe] ✓ CI.Patch_applied: success for drm/xe: Add engine scheduler control interface (rev9) Patchwork
2023-07-27 9:00 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-07-27 9:01 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-07-27 9:05 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-07-27 9:05 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-07-27 9:06 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-07-27 9:40 ` [Intel-xe] ○ CI.BAT: info " 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=ZMKElDAM3326/Njm@DUT025-TGLU.fm.intel.com \
--to=matthew.brost@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=tejas.upadhyay@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