Skip to contentSkip to conversation

drm/xe: Add engine scheduler control interface

PATCH Superseded Tejas Upadhyay 4 participants 30 messages Jul 27, 2023 – Jul 28, 2023

Subsystems (2)

v9 of 13 Superseded Latest is v13 →

lore
Share & tools
lore
#0 lore raw

v9 cover drm/xe: Add engine scheduler control interface

Patch series introduces this in several patches,
1. Add basic directory engine class under its GT, as below DUT# cat /sys/class/drm/cardX/device/tileN/gtN/engines/ ccs/ bcs/
2. Add default entries with its value for user to go back to default
3,4,5 : Add individual engine properties sysfs entry 6: Introduce min/max to control in what range these properties
can be set for elevated and non-elevated users.

VLK-46764, VLK-46767

V9 :
- Rebase to use s/xe_engine/xe_hw_engine/ - Matt
- Remove init_done from class_intf instead check member
is initialized - Matt
V8 :
- Modify enforce_sched_limit logic - Niranjana
- make sure min < max - Niranjana
- Push all errors to common err path - Niranjana
V7 :
- access engine class interface inplace of hw engine - Niranjana
- Use some API to lower down duplication of code
- Return EINVAL in place of EPERM
V6 :
- Scheduling props should apply per class engine not per hardware engine - Matt
- Do not record value of job_timeout_ms if changed based on dma_fence - Matt
- Removed timeout validation check as range validation covers it
- Rebase all the patches based on above changes
V5 :
- Rebase to resolve conflicts - CI
V4 :
- Rebase the series
- Add CONFIG option to enable/disable min/max limitation on elevated user - Matt/Joonas
- Movement of engine related code to its own file
V3 :
- Improve class_mask logic
V2 :
- Rebase to solve conflicts
- Use sysfs_create_files in this patch - Niranjana
- Handle prototype error for xe_add_engine_defaults - CI hooks
- Remove unused member sysfs_hwe - Niranjana
- Restric min/max setting to #define default min/max for
elevated user - Himal
- Remove some unrelated changes from patch - Niranjana

Testcase: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/commit/94ccbe7cdf8651d5b76588102eca545cb74caad8
Testcase: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/commit/0753ddf646df691cd1d2219192ce3a629f3e7e3f
Updated Testcase: https://patchwork.freedesktop.org/series/121046/

Tejas Upadhyay (6):
drm/xe: Add sysfs entries for engines under its GT drm/xe: Add sysfs for default engine scheduler properties drm/xe: Add job timeout engine property to sysfs drm/xe: Add timeslice duration engine property to sysfs drm/xe: Add sysfs for preempt reset timeout drm/xe: Add min/max cap for engine scheduler properties

 drivers/gpu/drm/xe/Kconfig                    |   6 +
 drivers/gpu/drm/xe/Kconfig.profile            |  46 ++
 drivers/gpu/drm/xe/Makefile                   |   1 +
 drivers/gpu/drm/xe/xe_engine.c                |  31 +-
 drivers/gpu/drm/xe/xe_gt.c                    |   7 +
 drivers/gpu/drm/xe/xe_gt_types.h              |   3 +
 drivers/gpu/drm/xe/xe_guc_submit.c            |   3 +-
 drivers/gpu/drm/xe/xe_hw_engine.c             |  17 +
 drivers/gpu/drm/xe/xe_hw_engine.h             |  31 +
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 640 ++++++++++++++++++
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h |  35 +
 drivers/gpu/drm/xe/xe_hw_engine_types.h       |  37 +
 12 files changed, 847 insertions(+), 10 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/Kconfig.profile
 create mode 100644 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c
 create mode 100644 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h
Signature · 1 line
2.25.1
#1 lore raw

PATCH v9 1/6 drm/xe: Add sysfs entries for engines under its GT

Add engines sysfs directory under its GT and
create sub directory for all engine class
(note its not per instance) present on GT.

For example,
DUT# cat /sys/class/drm/cardX/device/tileN/gtN/engines/ bcs/ ccs/

V5 :
- replace xe_engine with xe_hw_engine - Matt
V4 :
- Rebase to resolve conflicts - CI
V3 :
- Move code in its own file
- Rename API name
V2 :
- Correct class mask logic - Himal
- Remove extra parenthesis

---
 drivers/gpu/drm/xe/Makefile                   |   1 +
 drivers/gpu/drm/xe/xe_gt.c                    |   7 ++
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 111 ++++++++++++++++++
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h |  13 ++
 4 files changed, 132 insertions(+)
 create mode 100644 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c
 create mode 100644 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h
drivers/gpu/drm/xe/Makefile +1 -0
index 4ea9e3150c20..a3099a4fd56b 100644
@@ -52,6 +52,7 @@ xe-y += xe_bb.o \
 	xe_device_sysfs.o \
 	xe_dma_buf.o \
 	xe_engine.o \
+	xe_hw_engine_class_sysfs.o \
 	xe_exec.o \
 	xe_execlist.o \
 	xe_force_wake.o \
drivers/gpu/drm/xe/xe_gt.c +7 -0
index 3e32d38aeeea..d52eb45896a7 100644
@@ -27,6 +27,7 @@
 #include "xe_gt_topology.h"
 #include "xe_guc_engine_types.h"
 #include "xe_hw_fence.h"
+#include "xe_hw_engine_class_sysfs.h"
 #include "xe_irq.h"
 #include "xe_lrc.h"
 #include "xe_map.h"
@@ -322,6 +323,12 @@ static int gt_fw_domain_init(struct xe_gt *gt)
 	if (err)
 		goto err_force_wake;
 
+	err = xe_hw_engine_class_sysfs_init(gt);
+	if (err)
+		drm_warn(&gt_to_xe(gt)->drm,
+			 "failed to register engines sysfs directory, err: %d\n",
+			 err);
+
 	err = xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
 	XE_WARN_ON(err);
 	xe_device_mem_access_put(gt_to_xe(gt));
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c new file +111 -0

111 lines not on this page · raw message

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h new file +13 -0
new file mode 100644
index 000000000000..c461fac717c2
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2023 Intel Corporation
+ */
+
+#ifndef _XE_ENGINE_CLASS_SYSFS_H_
+#define _XE_ENGINE_CLASS_SYSFS_H__
+
+#include "xe_gt.h"
+
+#define MAX_ENGINE_CLASS_NAME_LEN    16
+int xe_hw_engine_class_sysfs_init(struct xe_gt *gt);
+#endif
Signature · 1 line
2.25.1
maintainer
#2 lore raw

Re: [Intel-xe] [PATCH V9 1/6] drm/xe: Add sysfs entries for engines under its GT

Quoted 8 lines · Tejas Upadhyay

Add engines sysfs directory under its GT and
create sub directory for all engine class
(note its not per instance) present on GT.

For example,
DUT# cat /sys/class/drm/cardX/device/tileN/gtN/engines/ bcs/ ccs/

Quoted 11 lines

V5 :
- replace xe_engine with xe_hw_engine - Matt
V4 :
- Rebase to resolve conflicts - CI
V3 :
- Move code in its own file
- Rename API name
V2 :
- Correct class mask logic - Himal
- Remove extra parenthesis

A couple nits, otherwise LGTM.

Quoted 15 lines
---
 drivers/gpu/drm/xe/Makefile                   |   1 +
 drivers/gpu/drm/xe/xe_gt.c                    |   7 ++
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 111 ++++++++++++++++++
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h |  13 ++
 4 files changed, 132 insertions(+)
 create mode 100644 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c
 create mode 100644 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h
drivers/gpu/drm/xe/Makefile +0 -0
index 4ea9e3150c20..a3099a4fd56b 100644

drivers/gpu/drm/xe/Makefile xe-y += xe_bb.o \ · line 55

Quoted 4 lines
drivers/gpu/drm/xe/Makefile +1 -0
@@ -52,6 +52,7 @@ xe-y += xe_bb.o \
 	xe_device_sysfs.o \
 	xe_dma_buf.o \
 	xe_engine.o \
+	xe_hw_engine_class_sysfs.o \

This is out of place alphabetically.

Quoted 73 lines
drivers/gpu/drm/xe/Makefile +0 -0
 	xe_exec.o \
 	xe_execlist.o \
 	xe_force_wake.o \
drivers/gpu/drm/xe/xe_gt.c +7 -0
index 3e32d38aeeea..d52eb45896a7 100644
@@ -27,6 +27,7 @@
 #include "xe_gt_topology.h"
 #include "xe_guc_engine_types.h"
 #include "xe_hw_fence.h"
+#include "xe_hw_engine_class_sysfs.h"
 #include "xe_irq.h"
 #include "xe_lrc.h"
 #include "xe_map.h"
@@ -322,6 +323,12 @@ static int gt_fw_domain_init(struct xe_gt *gt)
 	if (err)
 		goto err_force_wake;
 
+	err = xe_hw_engine_class_sysfs_init(gt);
+	if (err)
+		drm_warn(&gt_to_xe(gt)->drm,
+			 "failed to register engines sysfs directory, err: %d\n",
+			 err);
+
 	err = xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
 	XE_WARN_ON(err);
 	xe_device_mem_access_put(gt_to_xe(gt));
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c new file +39 -0
new file mode 100644
index 000000000000..c2f092b54af1
@@ -0,0 +1,111 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2023 Intel Corporation
+ */
+
+#include <drm/drm_managed.h>
+#include <linux/kobject.h>
+#include <linux/sysfs.h>
+
+#include "xe_hw_engine_class_sysfs.h"
+
+static void kobj_xe_hw_engine_release(struct kobject *kobj)
+{
+	kfree(kobj);
+}
+
+static const struct kobj_type kobj_xe_hw_engine_type = {
+	.release = kobj_xe_hw_engine_release,
+	.sysfs_ops = &kobj_sysfs_ops
+};
+
+static struct kobject *
+kobj_xe_hw_engine(struct kobject *parent, char *name)
+{
+	struct kobject *kobj;
+
+	kobj = kzalloc(sizeof(*kobj), GFP_KERNEL);
+	if (!kobj)
+		return NULL;
+
+	kobject_init(kobj, &kobj_xe_hw_engine_type);
+	if (kobject_add(kobj, parent, "%s", name)) {
+		kobject_put(kobj);
+		return NULL;
+	}
+
+	return kobj;
+}
+

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c line 49

Quoted 10 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c new file +10 -0
+static void xe_hw_engine_sysfs_kobj_release(struct kobject *kobj)
+{
+	kfree(kobj);
+}
+
+static const struct kobj_type xe_hw_engine_sysfs_kobj_type = {
+	.release = xe_hw_engine_sysfs_kobj_release,
+	.sysfs_ops = &kobj_sysfs_ops,
+};
+

We should have kernel doc for all non-static functions, this a WIP across the driver but since this is new code I think we should include kernel doc for this function.

Quoted 68 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c new file +62 -0
+int xe_hw_engine_class_sysfs_init(struct xe_gt *gt)
+{
+	struct xe_hw_engine *hwe;
+	enum xe_hw_engine_id id;
+	struct kobject *kobj;
+	u16 class_mask = 0;
+	int err = 0;
+
+	kobj = kzalloc(sizeof(*kobj), GFP_KERNEL);
+	if (!kobj)
+		return -ENOMEM;
+
+	kobject_init(kobj, &xe_hw_engine_sysfs_kobj_type);
+
+	err = kobject_add(kobj, gt->sysfs, "engines");
+	if (err) {
+		kobject_put(kobj);
+		return err;
+	}
+
+	for_each_hw_engine(hwe, gt, id) {
+		char name[MAX_ENGINE_CLASS_NAME_LEN];
+		struct kobject *khwe;
+
+		if (hwe->class == XE_ENGINE_CLASS_OTHER ||
+		    hwe->class == XE_ENGINE_CLASS_MAX)
+			continue;
+
+		if ((class_mask >> hwe->class) & 1)
+			continue;
+
+		class_mask |= 1 << hwe->class;
+
+		switch (hwe->class) {
+		case XE_ENGINE_CLASS_RENDER:
+			strcpy(name, "rcs");
+			break;
+		case XE_ENGINE_CLASS_VIDEO_DECODE:
+			strcpy(name, "vcs");
+			break;
+		case XE_ENGINE_CLASS_VIDEO_ENHANCE:
+			strcpy(name, "vecs");
+			break;
+		case XE_ENGINE_CLASS_COPY:
+			strcpy(name, "bcs");
+			break;
+		case XE_ENGINE_CLASS_COMPUTE:
+			strcpy(name, "ccs");
+			break;
+		default:
+			kobject_put(kobj);
+			return -EINVAL;
+		}
+
+		khwe = kobj_xe_hw_engine(kobj, name);
+		if (!khwe) {
+			kobject_put(kobj);
+			return -EINVAL;
+		}
+	}
+	return err;
+}
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h new file +0 -0
new file mode 100644
index 000000000000..c461fac717c2

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h line 9

Quoted 9 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h new file +9 -0
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2023 Intel Corporation
+ */
+
+#ifndef _XE_ENGINE_CLASS_SYSFS_H_
+#define _XE_ENGINE_CLASS_SYSFS_H__
+
+#include "xe_gt.h"

No need to include this, just forward declare struct xe_gt.

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h line 11

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h new file +2 -0
+
+#define MAX_ENGINE_CLASS_NAME_LEN    16

This doesn't need to be in the header, just define in the .c file.

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h line 12

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h new file +1 -0
+int xe_hw_engine_class_sysfs_init(struct xe_gt *gt);

Add a newline here.

Matt

Quoted 4 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h new file +1 -0
+#endif
Signature · 1 line
2.25.1
#3 lore raw

Re: [Intel-xe] [PATCH V9 1/6] drm/xe: Add sysfs entries for engines under its GT

Quoted 211 lines

-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: Thursday, July 27, 2023 8:12 PM
To: Upadhyay, Tejas <[email protected]>
Cc: [email protected]; Vishwanathapura, Niranjana <[email protected]>
Subject: Re: [PATCH V9 1/6] drm/xe: Add sysfs entries for engines under its GT

Quoted 7 lines · Tejas Upadhyay

Add engines sysfs directory under its GT and create sub directory for all engine class (note its not per instance) present on GT.

For example,
DUT# cat /sys/class/drm/cardX/device/tileN/gtN/engines/ bcs/ ccs/

Quoted 11 lines

V5 :
- replace xe_engine with xe_hw_engine - Matt
V4 :
- Rebase to resolve conflicts - CI
V3 :
- Move code in its own file
- Rename API name
V2 :
- Correct class mask logic - Himal
- Remove extra parenthesis

A couple nits, otherwise LGTM.

Quoted 16 lines
---
 drivers/gpu/drm/xe/Makefile                   |   1 +
 drivers/gpu/drm/xe/xe_gt.c                    |   7 ++
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 111
++++++++++++++++++  drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h |
13 ++
 4 files changed, 132 insertions(+)
 create mode 100644 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c
 create mode 100644 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h
drivers/gpu/drm/xe/Makefile +0 -0
index 4ea9e3150c20..a3099a4fd56b 100644

drivers/gpu/drm/xe/Makefile xe-y += xe_bb.o \ · line 55

Quoted 4 lines
drivers/gpu/drm/xe/Makefile +1 -0
@@ -52,6 +52,7 @@ xe-y += xe_bb.o \
 	xe_device_sysfs.o \
 	xe_dma_buf.o \
 	xe_engine.o \
+	xe_hw_engine_class_sysfs.o \

This is out of place alphabetically.

Quoted 70 lines
drivers/gpu/drm/xe/Makefile +0 -0
 	xe_exec.o \
 	xe_execlist.o \
 	xe_force_wake.o \
drivers/gpu/drm/xe/xe_gt.c +7 -0
index 3e32d38aeeea..d52eb45896a7 100644
@@ -27,6 +27,7 @@
 #include "xe_gt_topology.h"
 #include "xe_guc_engine_types.h"
 #include "xe_hw_fence.h"
+#include "xe_hw_engine_class_sysfs.h"
 #include "xe_irq.h"
 #include "xe_lrc.h"
 #include "xe_map.h"
@@ -322,6 +323,12 @@ static int gt_fw_domain_init(struct xe_gt *gt)
 	if (err)
 		goto err_force_wake;
 
+	err = xe_hw_engine_class_sysfs_init(gt);
+	if (err)
+		drm_warn(&gt_to_xe(gt)->drm,
+			 "failed to register engines sysfs directory, err: %d\n",
+			 err);
+
 	err = xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
 	XE_WARN_ON(err);
 	xe_device_mem_access_put(gt_to_xe(gt));
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c new file +35 -0
new file mode 100644
index 000000000000..c2f092b54af1
@@ -0,0 +1,111 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright (c) 2023 Intel Corporation  */
+
+#include <drm/drm_managed.h>
+#include <linux/kobject.h>
+#include <linux/sysfs.h>
+
+#include "xe_hw_engine_class_sysfs.h"
+
+static void kobj_xe_hw_engine_release(struct kobject *kobj) {
+	kfree(kobj);
+}
+
+static const struct kobj_type kobj_xe_hw_engine_type = {
+	.release = kobj_xe_hw_engine_release,
+	.sysfs_ops = &kobj_sysfs_ops
+};
+
+static struct kobject *
+kobj_xe_hw_engine(struct kobject *parent, char *name) {
+	struct kobject *kobj;
+
+	kobj = kzalloc(sizeof(*kobj), GFP_KERNEL);
+	if (!kobj)
+		return NULL;
+
+	kobject_init(kobj, &kobj_xe_hw_engine_type);
+	if (kobject_add(kobj, parent, "%s", name)) {
+		kobject_put(kobj);
+		return NULL;
+	}
+
+	return kobj;
+}

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c line 45

Quoted 10 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c new file +10 -0
+
+static void xe_hw_engine_sysfs_kobj_release(struct kobject *kobj) {
+	kfree(kobj);
+}
+
+static const struct kobj_type xe_hw_engine_sysfs_kobj_type = {
+	.release = xe_hw_engine_sysfs_kobj_release,
+	.sysfs_ops = &kobj_sysfs_ops,
+};
+

We should have kernel doc for all non-static functions, this a WIP across the driver but since this is new code I think we should include kernel doc for this function.

Quoted 70 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c new file +61 -0
+int xe_hw_engine_class_sysfs_init(struct xe_gt *gt) {
+	struct xe_hw_engine *hwe;
+	enum xe_hw_engine_id id;
+	struct kobject *kobj;
+	u16 class_mask = 0;
+	int err = 0;
+
+	kobj = kzalloc(sizeof(*kobj), GFP_KERNEL);
+	if (!kobj)
+		return -ENOMEM;
+
+	kobject_init(kobj, &xe_hw_engine_sysfs_kobj_type);
+
+	err = kobject_add(kobj, gt->sysfs, "engines");
+	if (err) {
+		kobject_put(kobj);
+		return err;
+	}
+
+	for_each_hw_engine(hwe, gt, id) {
+		char name[MAX_ENGINE_CLASS_NAME_LEN];
+		struct kobject *khwe;
+
+		if (hwe->class == XE_ENGINE_CLASS_OTHER ||
+		    hwe->class == XE_ENGINE_CLASS_MAX)
+			continue;
+
+		if ((class_mask >> hwe->class) & 1)
+			continue;
+
+		class_mask |= 1 << hwe->class;
+
+		switch (hwe->class) {
+		case XE_ENGINE_CLASS_RENDER:
+			strcpy(name, "rcs");
+			break;
+		case XE_ENGINE_CLASS_VIDEO_DECODE:
+			strcpy(name, "vcs");
+			break;
+		case XE_ENGINE_CLASS_VIDEO_ENHANCE:
+			strcpy(name, "vecs");
+			break;
+		case XE_ENGINE_CLASS_COPY:
+			strcpy(name, "bcs");
+			break;
+		case XE_ENGINE_CLASS_COMPUTE:
+			strcpy(name, "ccs");
+			break;
+		default:
+			kobject_put(kobj);
+			return -EINVAL;
+		}
+
+		khwe = kobj_xe_hw_engine(kobj, name);
+		if (!khwe) {
+			kobject_put(kobj);
+			return -EINVAL;
+		}
+	}
+	return err;
+}
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h new file +2 -0
new file mode 100644
index 000000000000..c461fac717c2
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: MIT */
+/*
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h line 9

Quoted 6 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h new file +6 -0
+ * Copyright (c) 2023 Intel Corporation  */
+
+#ifndef _XE_ENGINE_CLASS_SYSFS_H_
+#define _XE_ENGINE_CLASS_SYSFS_H__
+
+#include "xe_gt.h"

No need to include this, just forward declare struct xe_gt.

Not only xe_gt, for_each_hw_engine and few others are also coming from same header.

Thanks,
Tejas

Quoted 16 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h line 10

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h new file +2 -0
+
+#define MAX_ENGINE_CLASS_NAME_LEN    16

This doesn't need to be in the header, just define in the .c file.

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h line 12

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h new file +1 -0
+int xe_hw_engine_class_sysfs_init(struct xe_gt *gt);

Add a newline here.

Matt

Quoted 4 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h new file +1 -1
+#endif
--

2.25.1

#4 lore raw

PATCH v9 2/6 drm/xe: Add sysfs for default engine scheduler properties

In reply to Tejas Upadhyay

For each HW engine under GT we are adding defaults sysfs entry to list all engine scheduler properties and its default values. So that it will be easier for user to fetch default values of these properties anytime to go back to default.

For example,
DUT# cat /sys/class/drm/card1/device/tileN/gtN/engines/bcs/.defaults/
job_timeout_ms preempt_timeout_us timeslice_duration_us

where,
@job_timeout_ms: The time after which a job is removed from the scheduler. @preempt_timeout_us: How long to wait (in microseconds) for a preemption
event to occur when submitting a new context.
@timeslice_duration_us: Each context is scheduled for execution for the
timeslice duration, before switching to the next context.

V8 :
- replace xe_engine with xe_hw_engine - Matt
V7 :
- Push all errors to one error path at every places - Niranjana
- Describe struct member to resolve kernel doc err - CI hooks
V6 :
- Use engine class interface instead of hw engine
in sysfs for better interfacing readability - Niranjana
V5 :
- Scheduling props should apply per class engine not per hardware engine - Matt
- Do not record value of job_timeout_ms if changed based on dma_fence - Matt
V4 :
- Resolve merge conflicts - CI
V3 :
- Rearrange code in its own file
- Rebase
- Update commit message to reflect tile addition
V2 :
- Use sysfs_create_files in this patch - Niranjana
- Handle prototype error for xe_add_engine_defaults - CI hooks
- Remove unused member sysfs_hwe - Niranjana

---
 drivers/gpu/drm/xe/xe_engine.c                |   6 +-
 drivers/gpu/drm/xe/xe_gt_types.h              |   3 +
 drivers/gpu/drm/xe/xe_guc_submit.c            |   3 +-
 drivers/gpu/drm/xe/xe_hw_engine.c             |   9 ++
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 118 +++++++++++++++---
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h |  20 +++
 drivers/gpu/drm/xe/xe_hw_engine_types.h       |  37 ++++++
 7 files changed, 173 insertions(+), 23 deletions(-)
drivers/gpu/drm/xe/xe_engine.c +3 -3
index 0102dad16e29..9e167b113963 100644
@@ -53,9 +53,9 @@ static struct xe_engine *__xe_engine_create(struct xe_device *xe,
 	INIT_LIST_HEAD(&e->compute.link);
 	INIT_LIST_HEAD(&e->multi_gt_link);
 
-	/* FIXME: Wire up to configurable default value */
-	e->sched_props.timeslice_us = 1 * 1000;
-	e->sched_props.preempt_timeout_us = 640 * 1000;
+	e->sched_props.timeslice_us = hwe->eclass->sched_props.timeslice_us;
+	e->sched_props.preempt_timeout_us =
+				hwe->eclass->sched_props.preempt_timeout_us;
 
 	if (xe_engine_is_parallel(e)) {
 		e->parallel.composite_fence_ctx = dma_fence_context_alloc(1);
drivers/gpu/drm/xe/xe_gt_types.h +3 -0
index 78a9fe9f0bd3..d70460feeb96 100644
@@ -286,6 +286,9 @@ struct xe_gt {
 	/** @hw_engines: hardware engines on the GT */
 	struct xe_hw_engine hw_engines[XE_NUM_HW_ENGINES];
 
+	/** @eclass: per hardware engine class interface on the GT */
+	struct xe_hw_engine_class_intf  eclass[XE_ENGINE_CLASS_MAX];
+
 	/** @pcode: GT's PCODE */
 	struct {
 		/** @lock: protecting GT's PCODE mailbox data */
drivers/gpu/drm/xe/xe_guc_submit.c +2 -1
index 911d4965c27c..7978f7efd702 100644
@@ -1128,7 +1128,8 @@ static int guc_engine_init(struct xe_engine *e)
 	ge->engine = e;
 	init_waitqueue_head(&ge->suspend_wait);
 
-	timeout = xe_vm_no_dma_fences(e->vm) ? MAX_SCHEDULE_TIMEOUT : HZ * 5;
+	timeout = xe_vm_no_dma_fences(e->vm) ? MAX_SCHEDULE_TIMEOUT :
+		  e->hwe->eclass->sched_props.job_timeout_ms;
 	err = drm_sched_init(&ge->sched, &drm_sched_ops, NULL,
 			     e->lrc[0].ring.size / MAX_JOB_SIZE_BYTES,
 			     64, timeout, guc_to_gt(guc)->ordered_wq, NULL,
drivers/gpu/drm/xe/xe_hw_engine.c +9 -0
index 1af5cccd1142..afa7d25c3852 100644
@@ -362,6 +362,15 @@ static void hw_engine_init_early(struct xe_gt *gt, struct xe_hw_engine *hwe,
 	hwe->fence_irq = &gt->fence_irq[info->class];
 	hwe->engine_id = id;
 
+	if (!gt->eclass[hwe->class].sched_props.job_timeout_ms) {
+		gt->eclass[hwe->class].sched_props.job_timeout_ms = HZ * 5;
+		gt->eclass[hwe->class].sched_props.timeslice_us = 1 * 1000;
+		gt->eclass[hwe->class].sched_props.preempt_timeout_us = 640 * 1000;
+		/* Record default props */
+		gt->eclass[hwe->class].defaults = gt->eclass[hwe->class].sched_props;
+	}
+	hwe->eclass = &gt->eclass[hwe->class];
+
 	xe_reg_sr_init(&hwe->reg_sr, hwe->name, gt_to_xe(gt));
 	xe_wa_process_engine(hwe);
 	hw_engine_setup_default_state(hwe);
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +99 -19

156 lines not on this page · raw message

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h +20 -0
index c461fac717c2..757136614672 100644
@@ -10,4 +10,24 @@
 
 #define MAX_ENGINE_CLASS_NAME_LEN    16
 int xe_hw_engine_class_sysfs_init(struct xe_gt *gt);
+
+/**
+ * struct kobj_eclass - A eclass's kobject struct that connects the kobject and the
+ * eclass.
+ *
+ * When dealing with multiple eclass, this struct helps to understand which eclass
+ * needs to be addressed on a given sysfs call.
+ */
+struct kobj_eclass {
+	/** @base: The actual kobject */
+	struct kobject base;
+	/** @eclass: A pointer to the hw engine class interface */
+	struct xe_hw_engine_class_intf *eclass;
+};
+
+static inline struct xe_hw_engine_class_intf *kobj_to_eclass(struct kobject *kobj)
+{
+	return container_of(kobj, struct kobj_eclass, base)->eclass;
+}
+
 #endif
drivers/gpu/drm/xe/xe_hw_engine_types.h +37 -0
index 803d557cf5aa..97d9ba31b5fc 100644
@@ -63,6 +63,41 @@ struct xe_bo;
 struct xe_execlist_port;
 struct xe_gt;
 
+/**
+ * struct xe_hw_engine_class_intf - per hw engine class struct interface
+ *
+ * Contains all the hw engine properties per engine class.
+ *
+ * @sched_props: scheduling properties
+ * @defaults: default scheduling properties
+ */
+struct xe_hw_engine_class_intf {
+	/**
+	 * @sched_props: scheduling properties
+	 * @defaults: default scheduling properties
+	 */
+	struct {
+		/** @set_job_timeout: Set job timeout in ms for engine */
+		u32 job_timeout_ms;
+		/** @job_timeout_min: Min job timeout in ms for engine */
+		u32 job_timeout_min;
+		/** @job_timeout_max: Max job timeout in ms for engine */
+		u32 job_timeout_max;
+		/** @timeslice_us: timeslice period in micro-seconds */
+		u32 timeslice_us;
+		/** @timeslice_min: min timeslice period in micro-seconds */
+		u32 timeslice_min;
+		/** @timeslice_max: max timeslice period in micro-seconds */
+		u32 timeslice_max;
+		/** @preempt_timeout_us: preemption timeout in micro-seconds */
+		u32 preempt_timeout_us;
+		/** @preempt_timeout_min: min preemption timeout in micro-seconds */
+		u32 preempt_timeout_min;
+		/** @preempt_timeout_max: max preemption timeout in micro-seconds */
+		u32 preempt_timeout_max;
+	} sched_props, defaults;
+};
+
 /**
  * struct xe_hw_engine - Hardware engine
  *
@@ -107,6 +142,8 @@ struct xe_hw_engine {
 	void (*irq_handler)(struct xe_hw_engine *hwe, u16 intr_vec);
 	/** @engine_id: id  for this hw engine */
 	enum xe_hw_engine_id engine_id;
+	/** @eclass: pointer to per hw engine class interface */
+	struct xe_hw_engine_class_intf *eclass;
 };
 
 /**
Signature · 1 line
2.25.1
maintainer Reviewed-by on v9 2/6
#5 lore raw

Re: [Intel-xe] [PATCH V9 2/6] drm/xe: Add sysfs for default engine scheduler properties

Quoted 31 lines · Tejas Upadhyay

For each HW engine under GT we are adding defaults sysfs entry to list all engine scheduler properties and its default values. So that it will be easier for user to fetch default values of these properties anytime to go back to default.

For example,
DUT# cat /sys/class/drm/card1/device/tileN/gtN/engines/bcs/.defaults/
job_timeout_ms preempt_timeout_us timeslice_duration_us

where,
@job_timeout_ms: The time after which a job is removed from the scheduler. @preempt_timeout_us: How long to wait (in microseconds) for a preemption
event to occur when submitting a new context.
@timeslice_duration_us: Each context is scheduled for execution for the
timeslice duration, before switching to the next context.

V8 :
- replace xe_engine with xe_hw_engine - Matt
V7 :
- Push all errors to one error path at every places - Niranjana
- Describe struct member to resolve kernel doc err - CI hooks
V6 :
- Use engine class interface instead of hw engine
in sysfs for better interfacing readability - Niranjana
V5 :
- Scheduling props should apply per class engine not per hardware engine - Matt
- Do not record value of job_timeout_ms if changed based on dma_fence - Matt
V4 :
- Resolve merge conflicts - CI

Quoted 9 lines

V3 :
- Rearrange code in its own file
- Rebase
- Update commit message to reflect tile addition
V2 :
- Use sysfs_create_files in this patch - Niranjana
- Handle prototype error for xe_add_engine_defaults - CI hooks
- Remove unused member sysfs_hwe - Niranjana

One NIT below, with that fixed:

Quoted 61 lines
---
 drivers/gpu/drm/xe/xe_engine.c                |   6 +-
 drivers/gpu/drm/xe/xe_gt_types.h              |   3 +
 drivers/gpu/drm/xe/xe_guc_submit.c            |   3 +-
 drivers/gpu/drm/xe/xe_hw_engine.c             |   9 ++
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 118 +++++++++++++++---
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h |  20 +++
 drivers/gpu/drm/xe/xe_hw_engine_types.h       |  37 ++++++
 7 files changed, 173 insertions(+), 23 deletions(-)
drivers/gpu/drm/xe/xe_engine.c +3 -3
index 0102dad16e29..9e167b113963 100644
@@ -53,9 +53,9 @@ static struct xe_engine *__xe_engine_create(struct xe_device *xe,
 	INIT_LIST_HEAD(&e->compute.link);
 	INIT_LIST_HEAD(&e->multi_gt_link);
 
-	/* FIXME: Wire up to configurable default value */
-	e->sched_props.timeslice_us = 1 * 1000;
-	e->sched_props.preempt_timeout_us = 640 * 1000;
+	e->sched_props.timeslice_us = hwe->eclass->sched_props.timeslice_us;
+	e->sched_props.preempt_timeout_us =
+				hwe->eclass->sched_props.preempt_timeout_us;
 
 	if (xe_engine_is_parallel(e)) {
 		e->parallel.composite_fence_ctx = dma_fence_context_alloc(1);
drivers/gpu/drm/xe/xe_gt_types.h +3 -0
index 78a9fe9f0bd3..d70460feeb96 100644
@@ -286,6 +286,9 @@ struct xe_gt {
 	/** @hw_engines: hardware engines on the GT */
 	struct xe_hw_engine hw_engines[XE_NUM_HW_ENGINES];
 
+	/** @eclass: per hardware engine class interface on the GT */
+	struct xe_hw_engine_class_intf  eclass[XE_ENGINE_CLASS_MAX];
+
 	/** @pcode: GT's PCODE */
 	struct {
 		/** @lock: protecting GT's PCODE mailbox data */
drivers/gpu/drm/xe/xe_guc_submit.c +2 -1
index 911d4965c27c..7978f7efd702 100644
@@ -1128,7 +1128,8 @@ static int guc_engine_init(struct xe_engine *e)
 	ge->engine = e;
 	init_waitqueue_head(&ge->suspend_wait);
 
-	timeout = xe_vm_no_dma_fences(e->vm) ? MAX_SCHEDULE_TIMEOUT : HZ * 5;
+	timeout = xe_vm_no_dma_fences(e->vm) ? MAX_SCHEDULE_TIMEOUT :
+		  e->hwe->eclass->sched_props.job_timeout_ms;
 	err = drm_sched_init(&ge->sched, &drm_sched_ops, NULL,
 			     e->lrc[0].ring.size / MAX_JOB_SIZE_BYTES,
 			     64, timeout, guc_to_gt(guc)->ordered_wq, NULL,
drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
index 1af5cccd1142..afa7d25c3852 100644

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct xe_gt *gt, struct xe_hw_engine *hwe, · line 366

Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine.c +2 -0
@@ -362,6 +362,15 @@ static void hw_engine_init_early(struct xe_gt *gt, struct xe_hw_engine *hwe,
 	hwe->fence_irq = &gt->fence_irq[info->class];
 	hwe->engine_id = id;
 
+	if (!gt->eclass[hwe->class].sched_props.job_timeout_ms) {
+		gt->eclass[hwe->class].sched_props.job_timeout_ms = HZ * 5;

This is ms value, HZ is jiffies. 5 * 1000 makes more sense then.

Quoted 261 lines
drivers/gpu/drm/xe/xe_hw_engine.c +7 -0
+		gt->eclass[hwe->class].sched_props.timeslice_us = 1 * 1000;
+		gt->eclass[hwe->class].sched_props.preempt_timeout_us = 640 * 1000;
+		/* Record default props */
+		gt->eclass[hwe->class].defaults = gt->eclass[hwe->class].sched_props;
+	}
+	hwe->eclass = &gt->eclass[hwe->class];
+
 	xe_reg_sr_init(&hwe->reg_sr, hwe->name, gt_to_xe(gt));
 	xe_wa_process_engine(hwe);
 	hw_engine_setup_default_state(hwe);
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +99 -19
index c2f092b54af1..15c2b0b9f1fd 100644
@@ -9,6 +9,8 @@
 
 #include "xe_hw_engine_class_sysfs.h"
 
+static int xe_add_hw_engine_class_defaults(struct kobject *parent);
+
 static void kobj_xe_hw_engine_release(struct kobject *kobj)
 {
 	kfree(kobj);
@@ -19,22 +21,88 @@ static const struct kobj_type kobj_xe_hw_engine_type = {
 	.sysfs_ops = &kobj_sysfs_ops
 };
 
-static struct kobject *
-kobj_xe_hw_engine(struct kobject *parent, char *name)
+static struct kobj_eclass *
+kobj_xe_hw_engine_class(struct kobject *parent, char *name)
+{
+	struct kobj_eclass *keclass;
+
+	keclass = kzalloc(sizeof(*keclass), GFP_KERNEL);
+	if (!keclass)
+		return NULL;
+
+	kobject_init(&keclass->base, &kobj_xe_hw_engine_type);
+	if (kobject_add(&keclass->base, parent, "%s", name)) {
+		kobject_put(&keclass->base);
+		return NULL;
+	}
+
+	return keclass;
+}
+
+static ssize_t job_timeout_default(struct kobject *kobj,
+				   struct kobj_attribute *attr, char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.job_timeout_ms);
+}
+
+static struct kobj_attribute job_timeout_def =
+__ATTR(job_timeout_ms, 0444, job_timeout_default, NULL);
+
+static ssize_t timeslice_default(struct kobject *kobj,
+				 struct kobj_attribute *attr, char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.timeslice_us);
+}
+
+static struct kobj_attribute timeslice_duration_def =
+__ATTR(timeslice_duration_us, 0444, timeslice_default, NULL);
+
+static ssize_t preempt_timeout_default(struct kobject *kobj,
+				       struct kobj_attribute *attr,
+				       char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.preempt_timeout_us);
+}
+
+static struct kobj_attribute preempt_timeout_def =
+__ATTR(preempt_timeout_us, 0444, preempt_timeout_default, NULL);
+
+static const struct attribute *defaults[] = {
+	&job_timeout_def.attr,
+	&timeslice_duration_def.attr,
+	&preempt_timeout_def.attr,
+	NULL
+};
+
+static int xe_add_hw_engine_class_defaults(struct kobject *parent)
 {
 	struct kobject *kobj;
+	int err = 0;
 
 	kobj = kzalloc(sizeof(*kobj), GFP_KERNEL);
 	if (!kobj)
-		return NULL;
+		return -ENOMEM;
 
 	kobject_init(kobj, &kobj_xe_hw_engine_type);
-	if (kobject_add(kobj, parent, "%s", name)) {
-		kobject_put(kobj);
-		return NULL;
-	}
 
-	return kobj;
+	err = kobject_add(kobj, parent, "%s", ".defaults");
+	if (err)
+		goto err_object;
+
+	err = sysfs_create_files(kobj, defaults);
+	if (err)
+		goto err_object;
+
+	return err;
+err_object:
+	kobject_put(kobj);
+	return err;
 }
 
 static void xe_hw_engine_sysfs_kobj_release(struct kobject *kobj)
@@ -62,14 +130,12 @@ int xe_hw_engine_class_sysfs_init(struct xe_gt *gt)
 	kobject_init(kobj, &xe_hw_engine_sysfs_kobj_type);
 
 	err = kobject_add(kobj, gt->sysfs, "engines");
-	if (err) {
-		kobject_put(kobj);
-		return err;
-	}
+	if (err)
+		goto err_object;
 
 	for_each_hw_engine(hwe, gt, id) {
 		char name[MAX_ENGINE_CLASS_NAME_LEN];
-		struct kobject *khwe;
+		struct kobj_eclass *keclass;
 
 		if (hwe->class == XE_ENGINE_CLASS_OTHER ||
 		    hwe->class == XE_ENGINE_CLASS_MAX)
@@ -97,15 +163,29 @@ int xe_hw_engine_class_sysfs_init(struct xe_gt *gt)
 			strcpy(name, "ccs");
 			break;
 		default:
-			kobject_put(kobj);
-			return -EINVAL;
+			err = -EINVAL;
+			goto err_object;
 		}
 
-		khwe = kobj_xe_hw_engine(kobj, name);
-		if (!khwe) {
-			kobject_put(kobj);
-			return -EINVAL;
+		keclass = kobj_xe_hw_engine_class(kobj, name);
+		if (!keclass) {
+			err = -EINVAL;
+			goto err_object;
 		}
+
+		keclass->eclass = hwe->eclass;
+		err = xe_add_hw_engine_class_defaults(&keclass->base);
+		if (err) {
+			drm_warn(&gt_to_xe(gt)->drm,
+				 "Warning: adding .defaults to engines failed!, err: %d\n",
+				 err);
+			goto err_object;
+		}
+
 	}
+
+	return err;
+err_object:
+	kobject_put(kobj);
 	return err;
 }
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h +20 -0
index c461fac717c2..757136614672 100644
@@ -10,4 +10,24 @@
 
 #define MAX_ENGINE_CLASS_NAME_LEN    16
 int xe_hw_engine_class_sysfs_init(struct xe_gt *gt);
+
+/**
+ * struct kobj_eclass - A eclass's kobject struct that connects the kobject and the
+ * eclass.
+ *
+ * When dealing with multiple eclass, this struct helps to understand which eclass
+ * needs to be addressed on a given sysfs call.
+ */
+struct kobj_eclass {
+	/** @base: The actual kobject */
+	struct kobject base;
+	/** @eclass: A pointer to the hw engine class interface */
+	struct xe_hw_engine_class_intf *eclass;
+};
+
+static inline struct xe_hw_engine_class_intf *kobj_to_eclass(struct kobject *kobj)
+{
+	return container_of(kobj, struct kobj_eclass, base)->eclass;
+}
+
 #endif
drivers/gpu/drm/xe/xe_hw_engine_types.h +37 -0
index 803d557cf5aa..97d9ba31b5fc 100644
@@ -63,6 +63,41 @@ struct xe_bo;
 struct xe_execlist_port;
 struct xe_gt;
 
+/**
+ * struct xe_hw_engine_class_intf - per hw engine class struct interface
+ *
+ * Contains all the hw engine properties per engine class.
+ *
+ * @sched_props: scheduling properties
+ * @defaults: default scheduling properties
+ */
+struct xe_hw_engine_class_intf {
+	/**
+	 * @sched_props: scheduling properties
+	 * @defaults: default scheduling properties
+	 */
+	struct {
+		/** @set_job_timeout: Set job timeout in ms for engine */
+		u32 job_timeout_ms;
+		/** @job_timeout_min: Min job timeout in ms for engine */
+		u32 job_timeout_min;
+		/** @job_timeout_max: Max job timeout in ms for engine */
+		u32 job_timeout_max;
+		/** @timeslice_us: timeslice period in micro-seconds */
+		u32 timeslice_us;
+		/** @timeslice_min: min timeslice period in micro-seconds */
+		u32 timeslice_min;
+		/** @timeslice_max: max timeslice period in micro-seconds */
+		u32 timeslice_max;
+		/** @preempt_timeout_us: preemption timeout in micro-seconds */
+		u32 preempt_timeout_us;
+		/** @preempt_timeout_min: min preemption timeout in micro-seconds */
+		u32 preempt_timeout_min;
+		/** @preempt_timeout_max: max preemption timeout in micro-seconds */
+		u32 preempt_timeout_max;
+	} sched_props, defaults;
+};
+
 /**
  * struct xe_hw_engine - Hardware engine
  *
@@ -107,6 +142,8 @@ struct xe_hw_engine {
 	void (*irq_handler)(struct xe_hw_engine *hwe, u16 intr_vec);
 	/** @engine_id: id  for this hw engine */
 	enum xe_hw_engine_id engine_id;
+	/** @eclass: pointer to per hw engine class interface */
+	struct xe_hw_engine_class_intf *eclass;
 };
 
 /**
Signature · 1 line
2.25.1
#6 lore raw

PATCH v9 3/6 drm/xe: Add job timeout engine property to sysfs

In reply to Tejas Upadhyay

The time after which a job is removed from the scheduler. Add sysfs entry to provide user defined job timeout to scheduler.

The job timeout can be adjusted per-engine class using,

/sys/class/drm/cardX/device/tileN/gtN/engines/ccs/job_timeout_ms

V7:
- Rebase to use s/xe_engine/xe_hw_engine/ - Matt
V6:
- Remove timeout validation, not relevant - Niranjana
- Rebase to use common error path
V5:
- Rebase to use engine class interface instead of hw engine
V4:
- Rebase to per class engine props interface
V3:
- Rebase
- Update commit message to reflect tile update
V2:
- Use sysfs_create_files as part of this patch

---
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +36 -0
index 15c2b0b9f1fd..5e2dba0be8eb 100644
@@ -39,6 +39,34 @@ kobj_xe_hw_engine_class(struct kobject *parent, char *name)
 	return keclass;
 }
 
+static ssize_t job_timeout_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
+		return err;
+
+	WRITE_ONCE(eclass->sched_props.job_timeout_ms, timeout);
+
+	return count;
+}
+
+static ssize_t job_timeout_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.job_timeout_ms);
+}
+
+static struct kobj_attribute job_timeout_attr =
+__ATTR(job_timeout_ms, 0644, job_timeout_show, job_timeout_store);
+
 static ssize_t job_timeout_default(struct kobject *kobj,
 				   struct kobj_attribute *attr, char *buf)
 {
@@ -80,6 +108,11 @@ static const struct attribute *defaults[] = {
 	NULL
 };
 
+static const struct attribute *files[] = {
+	&job_timeout_attr.attr,
+	NULL
+};
+
 static int xe_add_hw_engine_class_defaults(struct kobject *parent)
 {
 	struct kobject *kobj;
@@ -182,6 +215,9 @@ int xe_hw_engine_class_sysfs_init(struct xe_gt *gt)
 			goto err_object;
 		}
 
+		err = sysfs_create_files(&keclass->base, files);
+		if (err)
+			goto err_object;
 	}
 
 	return err;
Signature · 1 line
2.25.1
maintainer Reviewed-by on v9 3/6
#7 lore raw

Re: [Intel-xe] [PATCH V9 3/6] drm/xe: Add job timeout engine property to sysfs

Quoted 23 lines · Tejas Upadhyay

The time after which a job is removed from the scheduler. Add sysfs entry to provide user defined job timeout to scheduler.

The job timeout can be adjusted per-engine class using,

/sys/class/drm/cardX/device/tileN/gtN/engines/ccs/job_timeout_ms

V7:
- Rebase to use s/xe_engine/xe_hw_engine/ - Matt
V6:
- Remove timeout validation, not relevant - Niranjana
- Rebase to use common error path
V5:
- Rebase to use engine class interface instead of hw engine
V4:
- Rebase to per class engine props interface
V3:
- Rebase
- Update commit message to reflect tile update
V2:
- Use sysfs_create_files as part of this patch

Quoted 1 line
Quoted 68 lines
---
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +36 -0
index 15c2b0b9f1fd..5e2dba0be8eb 100644
@@ -39,6 +39,34 @@ kobj_xe_hw_engine_class(struct kobject *parent, char *name)
 	return keclass;
 }
 
+static ssize_t job_timeout_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
+		return err;
+
+	WRITE_ONCE(eclass->sched_props.job_timeout_ms, timeout);
+
+	return count;
+}
+
+static ssize_t job_timeout_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.job_timeout_ms);
+}
+
+static struct kobj_attribute job_timeout_attr =
+__ATTR(job_timeout_ms, 0644, job_timeout_show, job_timeout_store);
+
 static ssize_t job_timeout_default(struct kobject *kobj,
 				   struct kobj_attribute *attr, char *buf)
 {
@@ -80,6 +108,11 @@ static const struct attribute *defaults[] = {
 	NULL
 };
 
+static const struct attribute *files[] = {
+	&job_timeout_attr.attr,
+	NULL
+};
+
 static int xe_add_hw_engine_class_defaults(struct kobject *parent)
 {
 	struct kobject *kobj;
@@ -182,6 +215,9 @@ int xe_hw_engine_class_sysfs_init(struct xe_gt *gt)
 			goto err_object;
 		}
 
+		err = sysfs_create_files(&keclass->base, files);
+		if (err)
+			goto err_object;
 	}
 
 	return err;
Signature · 1 line
2.25.1
#8 lore raw

PATCH v9 4/6 drm/xe: Add timeslice duration engine property to sysfs

In reply to Tejas Upadhyay

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

---
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +30 -0
index 5e2dba0be8eb..b1c13d27bcf4 100644
@@ -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,
+	&timeslice_duration_attr.attr,
 	NULL
 };
 
Signature · 1 line
2.25.1
maintainer Reviewed-by on v9 4/6
#9 lore raw

Re: [Intel-xe] [PATCH V9 4/6] drm/xe: Add timeslice duration engine property to sysfs

Quoted 22 lines · Tejas Upadhyay

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

Quoted 1 line
Quoted 55 lines
---
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +30 -0
index 5e2dba0be8eb..b1c13d27bcf4 100644
@@ -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,
+	&timeslice_duration_attr.attr,
 	NULL
 };
 
Signature · 1 line
2.25.1
#10 lore raw

PATCH v9 5/6 drm/xe: Add sysfs for preempt reset timeout

In reply to Tejas Upadhyay

The preemption request and timeout is used for higher priority context or kill hung context and reset gpu.

The preempt timeout can be adjusted per-engine class using,

/sys/class/drm/cardX/device/tileN/gtN/engines/ccs/preempt_timeout_us

and can be disabled by setting it to 0.

V6:
- Rebase to use s/xe_engine/xe_hw_engine/ - Matt
V5:
- Remove timeout validation, not relevant - Niranjana
V4:
- Rebase to replace hw engine with eclass interface
V3:
- Rebase to per class engine props interface
V2:
- Rebase
- Update commit message to add tile

---
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +29 -0
index b1c13d27bcf4..990bb675d1e0 100644
@@ -118,6 +118,34 @@ static ssize_t timeslice_default(struct kobject *kobj,
 static struct kobj_attribute timeslice_duration_def =
 __ATTR(timeslice_duration_us, 0444, timeslice_default, NULL);
 
+static ssize_t preempt_timeout_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
+		return err;
+
+	WRITE_ONCE(eclass->sched_props.preempt_timeout_us, timeout);
+
+	return count;
+}
+
+static ssize_t preempt_timeout_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.preempt_timeout_us);
+}
+
+static struct kobj_attribute preempt_timeout_attr =
+__ATTR(preempt_timeout_us, 0644, preempt_timeout_show, preempt_timeout_store);
+
 static ssize_t preempt_timeout_default(struct kobject *kobj,
 				       struct kobj_attribute *attr,
 				       char *buf)
@@ -140,6 +168,7 @@ static const struct attribute *defaults[] = {
 static const struct attribute *files[] = {
 	&job_timeout_attr.attr,
 	&timeslice_duration_attr.attr,
+	&preempt_timeout_attr.attr,
 	NULL
 };
 
Signature · 1 line
2.25.1
maintainer Reviewed-by on v9 5/6
#11 lore raw

Re: [Intel-xe] [PATCH V9 5/6] drm/xe: Add sysfs for preempt reset timeout

Quoted 3 lines · Tejas Upadhyay

The preemption request and timeout is used for higher priority context or kill hung context and reset gpu.

NIT, reset hardware engine, not GPU.

With the NIT fixed:

Quoted 74 lines

The preempt timeout can be adjusted per-engine class using,

/sys/class/drm/cardX/device/tileN/gtN/engines/ccs/preempt_timeout_us

and can be disabled by setting it to 0.

V6:
- Rebase to use s/xe_engine/xe_hw_engine/ - Matt
V5:
- Remove timeout validation, not relevant - Niranjana
V4:
- Rebase to replace hw engine with eclass interface
V3:
- Rebase to per class engine props interface
V2:
- Rebase
- Update commit message to add tile

---
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +29 -0
index b1c13d27bcf4..990bb675d1e0 100644
@@ -118,6 +118,34 @@ static ssize_t timeslice_default(struct kobject *kobj,
 static struct kobj_attribute timeslice_duration_def =
 __ATTR(timeslice_duration_us, 0444, timeslice_default, NULL);
 
+static ssize_t preempt_timeout_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
+		return err;
+
+	WRITE_ONCE(eclass->sched_props.preempt_timeout_us, timeout);
+
+	return count;
+}
+
+static ssize_t preempt_timeout_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.preempt_timeout_us);
+}
+
+static struct kobj_attribute preempt_timeout_attr =
+__ATTR(preempt_timeout_us, 0644, preempt_timeout_show, preempt_timeout_store);
+
 static ssize_t preempt_timeout_default(struct kobject *kobj,
 				       struct kobj_attribute *attr,
 				       char *buf)
@@ -140,6 +168,7 @@ static const struct attribute *defaults[] = {
 static const struct attribute *files[] = {
 	&job_timeout_attr.attr,
 	&timeslice_duration_attr.attr,
+	&preempt_timeout_attr.attr,
 	NULL
 };
 
Signature · 1 line
2.25.1
#12 lore raw

PATCH v9 6/6 drm/xe: Add min/max cap for engine scheduler properties

In reply to Tejas Upadhyay

Add sysfs entries for the min, max, and defaults for each of engine scheduler controls for every hardware engine class.

Non-elevated user IOCTLs to set these controls must be within the min-max ranges of the sysfs entries, elevated user can set these controls to any value. However, introduced compile time CONFIG min-max values which restricts elevated user to be in compile time min-max range if at all sysfs min/max are violated.

Sysfs entries examples are,
DUT# cat /sys/class/drm/cardX/device/tileN/gtN/engines/ccs/.defaults/

job_timeout_max         job_timeout_ms          preempt_timeout_min     timeslice_duration_max  timeslice_duration_us
job_timeout_min         preempt_timeout_max     preempt_timeout_us      timeslice_duration_min

DUT# cat /sys/class/drm/card1/device/tileN/gtN/engines/ccs/

.defaults/              job_timeout_min         preempt_timeout_max     preempt_timeout_us      timeslice_duration_min
job_timeout_max         job_timeout_ms          preempt_timeout_min     timeslice_duration_max  timeslice_duration_us

V9 :
- Rebase to use s/xe_engine/xe_hw_engine/ - Matt
V8 :
- fix enforce_sched_limit and avoid code duplication - Niranjana
- Make sure min < max - Niranjana
V7 :
- Rebase to replace hw engine with eclass interface
- return EINVAL in place of EPERM
- Use some APIs to avoid code duplication
V6 :
- Rebase changes to reflect per engine class props interface - MattB
- Use #if ENABLED - MattB
- Remove MAX_SCHED_TIMEOUT check as range validation is enough
V5 :
- Rebase to resolve conflicts - CI
V4 :
- Rebase
- Update commit to reflect tile addition
- Use XE_HW macro directly as they are already filtered for CONFIG checks - Niranjana
- Add CONFIG for enable/disable min/max limitation
on elevated user. Default is enable - Matt/Joonas
V3 :
- Resolve CI hooks warning for kernel-doc
V2 :
- Restric min/max setting to #define default min/max for elevated user - Himal
- Remove unrelated changes from patch - Niranjana

---
 drivers/gpu/drm/xe/Kconfig                    |   6 +
 drivers/gpu/drm/xe/Kconfig.profile            |  46 +++
 drivers/gpu/drm/xe/xe_engine.c                |  25 +-
 drivers/gpu/drm/xe/xe_hw_engine.c             |   8 +
 drivers/gpu/drm/xe/xe_hw_engine.h             |  31 ++
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 354 ++++++++++++++++++
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h |   2 +
 7 files changed, 466 insertions(+), 6 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/Kconfig.profile
drivers/gpu/drm/xe/Kconfig +6 -0
index d44794f99338..0a4ea965645b 100644
@@ -83,3 +83,9 @@ depends on DRM_XE
 depends on EXPERT
 source "drivers/gpu/drm/xe/Kconfig.debug"
 endmenu
+
+menu "drm/xe Profile Guided Optimisation"
+	visible if EXPERT
+	depends on DRM_XE
+	source "drivers/gpu/drm/xe/Kconfig.profile"
+endmenu
drivers/gpu/drm/xe/Kconfig.profile new file +46 -0

46 lines not on this page · raw message

drivers/gpu/drm/xe/xe_engine.c +19 -6
index 9e167b113963..d934196eb79f 100644
@@ -13,6 +13,7 @@
 
 #include "xe_device.h"
 #include "xe_gt.h"
+#include "xe_hw_engine_class_sysfs.h"
 #include "xe_hw_fence.h"
 #include "xe_lrc.h"
 #include "xe_macros.h"
@@ -191,8 +192,12 @@ static int engine_set_priority(struct xe_device *xe, struct xe_engine *e,
 static int engine_set_timeslice(struct xe_device *xe, struct xe_engine *e,
 				u64 value, bool create)
 {
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	u32 min = e->hwe->eclass->sched_props.timeslice_min;
+	u32 max = e->hwe->eclass->sched_props.timeslice_max;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))
+		return -EINVAL;
 
 	return e->ops->set_timeslice(e, value);
 }
@@ -201,8 +206,12 @@ static int engine_set_preemption_timeout(struct xe_device *xe,
 					 struct xe_engine *e, u64 value,
 					 bool create)
 {
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	u32 min = e->hwe->eclass->sched_props.preempt_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.preempt_timeout_max;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))
+		return -EINVAL;
 
 	return e->ops->set_preempt_timeout(e, value);
 }
@@ -266,11 +275,15 @@ static int engine_set_persistence(struct xe_device *xe, struct xe_engine *e,
 static int engine_set_job_timeout(struct xe_device *xe, struct xe_engine *e,
 				  u64 value, bool create)
 {
+	u32 min = e->hwe->eclass->sched_props.job_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.job_timeout_max;
+
 	if (XE_IOCTL_DBG(xe, !create))
 		return -EINVAL;
 
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))
+		return -EINVAL;
 
 	return e->ops->set_job_timeout(e, value);
 }
drivers/gpu/drm/xe/xe_hw_engine.c +8 -0
index afa7d25c3852..e601bffe3b13 100644
@@ -364,8 +364,16 @@ static void hw_engine_init_early(struct xe_gt *gt, struct xe_hw_engine *hwe,
 
 	if (!gt->eclass[hwe->class].sched_props.job_timeout_ms) {
 		gt->eclass[hwe->class].sched_props.job_timeout_ms = HZ * 5;
+		gt->eclass[hwe->class].sched_props.job_timeout_min = XE_HW_ENGINE_JOB_TIMEOUT_MIN;
+		gt->eclass[hwe->class].sched_props.job_timeout_max = XE_HW_ENGINE_JOB_TIMEOUT_MAX;
 		gt->eclass[hwe->class].sched_props.timeslice_us = 1 * 1000;
+		gt->eclass[hwe->class].sched_props.timeslice_min = XE_HW_ENGINE_TIMESLICE_MIN;
+		gt->eclass[hwe->class].sched_props.timeslice_max = XE_HW_ENGINE_TIMESLICE_MAX;
 		gt->eclass[hwe->class].sched_props.preempt_timeout_us = 640 * 1000;
+		gt->eclass[hwe->class].sched_props.preempt_timeout_min =
+								XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN;
+		gt->eclass[hwe->class].sched_props.preempt_timeout_max =
+								XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX;
 		/* Record default props */
 		gt->eclass[hwe->class].defaults = gt->eclass[hwe->class].sched_props;
 	}
drivers/gpu/drm/xe/xe_hw_engine.h +31 -0
index 7eca9d53c7b1..3d37d6d44261 100644
@@ -10,6 +10,37 @@
 
 struct drm_printer;
 
+#ifdef CONFIG_DRM_XE_JOB_TIMEOUT_MIN
+#define XE_HW_ENGINE_JOB_TIMEOUT_MIN CONFIG_DRM_XE_JOB_TIMEOUT_MIN
+#else
+#define XE_HW_ENGINE_JOB_TIMEOUT_MIN 1
+#endif
+#ifdef CONFIG_DRM_XE_JOB_TIMEOUT_MAX
+#define XE_HW_ENGINE_JOB_TIMEOUT_MAX CONFIG_DRM_XE_JOB_TIMEOUT_MAX
+#else
+#define XE_HW_ENGINE_JOB_TIMEOUT_MAX (10 * 1000)
+#endif
+#ifdef CONFIG_DRM_XE_TIMESLICE_MIN
+#define XE_HW_ENGINE_TIMESLICE_MIN CONFIG_DRM_XE_TIMESLICE_MIN
+#else
+#define XE_HW_ENGINE_TIMESLICE_MIN 1
+#endif
+#ifdef CONFIG_DRM_XE_TIMESLICE_MAX
+#define XE_HW_ENGINE_TIMESLICE_MAX CONFIG_DRM_XE_TIMESLICE_MAX
+#else
+#define XE_HW_ENGINE_TIMESLICE_MAX (10 * 1000 * 1000)
+#endif
+#ifdef CONFIG_DRM_XE_PREEMPT_TIMEOUT_MIN
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN CONFIG_DRM_XE_PREEMPT_TIMEOUT_MIN
+#else
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN 1
+#endif
+#ifdef CONFIG_DRM_XE_PREEMPT_TIMEOUT_MAX
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX CONFIG_DRM_XE_PREEMPT_TIMEOUT_MAX
+#else
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX (10 * 1000 * 1000)
+#endif
+
 int xe_hw_engines_init_early(struct xe_gt *gt);
 int xe_hw_engines_init(struct xe_gt *gt);
 void xe_hw_engine_handle_irq(struct xe_hw_engine *hwe, u16 intr_vec);
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +354 -0

433 lines not on this page · raw message

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h +2 -0
index 757136614672..2e2ab351a991 100644
@@ -10,6 +10,8 @@
 
 #define MAX_ENGINE_CLASS_NAME_LEN    16
 int xe_hw_engine_class_sysfs_init(struct xe_gt *gt);
+bool enforce_schedule_limit(void);
+bool engine_timeout_in_range(u64 timeout, u64 min, u64 max);
 
 /**
  * struct kobj_eclass - A eclass's kobject struct that connects the kobject and the
Signature · 1 line
2.25.1
maintainer
#13 lore raw

Re: [Intel-xe] [PATCH V9 6/6] drm/xe: Add min/max cap for engine scheduler properties

Quoted 138 lines · Tejas Upadhyay

Add sysfs entries for the min, max, and defaults for each of engine scheduler controls for every hardware engine class.

Non-elevated user IOCTLs to set these controls must be within the min-max ranges of the sysfs entries, elevated user can set these controls to any value. However, introduced compile time CONFIG min-max values which restricts elevated user to be in compile time min-max range if at all sysfs min/max are violated.

Sysfs entries examples are,
DUT# cat /sys/class/drm/cardX/device/tileN/gtN/engines/ccs/.defaults/

job_timeout_max         job_timeout_ms          preempt_timeout_min     timeslice_duration_max  timeslice_duration_us
job_timeout_min         preempt_timeout_max     preempt_timeout_us      timeslice_duration_min

DUT# cat /sys/class/drm/card1/device/tileN/gtN/engines/ccs/

.defaults/              job_timeout_min         preempt_timeout_max     preempt_timeout_us      timeslice_duration_min
job_timeout_max         job_timeout_ms          preempt_timeout_min     timeslice_duration_max  timeslice_duration_us

V9 :
- Rebase to use s/xe_engine/xe_hw_engine/ - Matt
V8 :
- fix enforce_sched_limit and avoid code duplication - Niranjana
- Make sure min < max - Niranjana
V7 :
- Rebase to replace hw engine with eclass interface
- return EINVAL in place of EPERM
- Use some APIs to avoid code duplication
V6 :
- Rebase changes to reflect per engine class props interface - MattB
- Use #if ENABLED - MattB
- Remove MAX_SCHED_TIMEOUT check as range validation is enough
V5 :
- Rebase to resolve conflicts - CI
V4 :
- Rebase
- Update commit to reflect tile addition
- Use XE_HW macro directly as they are already filtered for CONFIG checks - Niranjana
- Add CONFIG for enable/disable min/max limitation
on elevated user. Default is enable - Matt/Joonas
V3 :
- Resolve CI hooks warning for kernel-doc
V2 :
- Restric min/max setting to #define default min/max for elevated user - Himal
- Remove unrelated changes from patch - Niranjana

---
 drivers/gpu/drm/xe/Kconfig                    |   6 +
 drivers/gpu/drm/xe/Kconfig.profile            |  46 +++
 drivers/gpu/drm/xe/xe_engine.c                |  25 +-
 drivers/gpu/drm/xe/xe_hw_engine.c             |   8 +
 drivers/gpu/drm/xe/xe_hw_engine.h             |  31 ++
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 354 ++++++++++++++++++
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h |   2 +
 7 files changed, 466 insertions(+), 6 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/Kconfig.profile
drivers/gpu/drm/xe/Kconfig +6 -0
index d44794f99338..0a4ea965645b 100644
@@ -83,3 +83,9 @@ depends on DRM_XE
 depends on EXPERT
 source "drivers/gpu/drm/xe/Kconfig.debug"
 endmenu
+
+menu "drm/xe Profile Guided Optimisation"
+	visible if EXPERT
+	depends on DRM_XE
+	source "drivers/gpu/drm/xe/Kconfig.profile"
+endmenu
drivers/gpu/drm/xe/Kconfig.profile new file +46 -0
new file mode 100644
index 000000000000..e72f15ec4bf6
@@ -0,0 +1,46 @@
+config DRM_XE_JOB_TIMEOUT_MAX
+       int "Default max job timeout (ms)"
+       default 10000 # milliseconds
+       help
+         Configures the default max job timeout after which job will
+         be forcefully taken away from scheduler.
+config DRM_XE_JOB_TIMEOUT_MIN
+       int "Default max job timeout (ms)"
+       default 1 # milliseconds
+       help
+         Configures the default min job timeout after which job will
+         be forcefully taken away from scheduler.
+config DRM_XE_TIMESLICE_MAX
+       int "Default max timeslice duration (us)"
+       default 10000000 # microseconds
+       help
+         Configures the default max timeslice duration between multiple
+         contexts by guc scheduling.
+config DRM_XE_TIMESLICE_MIN
+       int "Default min timeslice duration (us)"
+       default 1 # microseconds
+       help
+         Configures the default min timeslice duration between multiple
+         contexts by guc scheduling.
+config DRM_XE_PREEMPT_TIMEOUT_MAX
+       int "Default max  preempt timeout (us)"
+       default 10000000 # microseconds
+       help
+         Configures the default max preempt timeout after which context
+         will be forcefully taken away and higher priority context will
+         run.
+config DRM_XE_PREEMPT_TIMEOUT_MIN
+       int "Default min  preempt timeout (us)"
+       default 1 # microseconds
+       help
+         Configures the default min preempt timeout after which context
+         will be forcefully taken away and higher priority context will
+         run.
+config DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT
+       bool "Default configuration of limitation on scheduler timeout"
+       default y
+       help
+	 Configures the enablement of limitation on scheduler timeout
+	 to apply to applicable user. For elevated user, all above MIN
+	 and MAX values will apply when this configuration is enable to
+	 apply limitation. By default limitation is applied.
drivers/gpu/drm/xe/xe_engine.c +1 -0
index 9e167b113963..d934196eb79f 100644
@@ -13,6 +13,7 @@
 
 #include "xe_device.h"
 #include "xe_gt.h"
+#include "xe_hw_engine_class_sysfs.h"
 #include "xe_hw_fence.h"
 #include "xe_lrc.h"
 #include "xe_macros.h"

drivers/gpu/drm/xe/xe_engine.c static int engine_set_priority(struct xe_device *xe, struct xe_engine *e, · line 196

Quoted 7 lines
drivers/gpu/drm/xe/xe_engine.c +2 -2
@@ -191,8 +192,12 @@ static int engine_set_priority(struct xe_device *xe, struct xe_engine *e,
 static int engine_set_timeslice(struct xe_device *xe, struct xe_engine *e,
 				u64 value, bool create)
 {
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	u32 min = e->hwe->eclass->sched_props.timeslice_min;
+	u32 max = e->hwe->eclass->sched_props.timeslice_max;

So I screwed this up in my last comment, sorry.

min = cap_nice ? KConfig option for min : e->hwe->eclass->sched_props.timeslice_min; same logic for max;

Probably add helper for this.

drivers/gpu/drm/xe/xe_engine.c static int engine_set_priority(struct xe_device *xe, struct xe_engine *e, · line 199

Quoted 3 lines
drivers/gpu/drm/xe/xe_engine.c +3 -0
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))

Then I think logic works too...

if cap nice && !Kconfig option to enfore limits (enforce_schedule_limit returns false):
user can do whatever
else if cap nice
user within Kconfig range
else
user within sysfs range

This is what we want in the end.

Quoted 205 lines
drivers/gpu/drm/xe/xe_engine.c +13 -4
+		return -EINVAL;
 
 	return e->ops->set_timeslice(e, value);
 }
@@ -201,8 +206,12 @@ static int engine_set_preemption_timeout(struct xe_device *xe,
 					 struct xe_engine *e, u64 value,
 					 bool create)
 {
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	u32 min = e->hwe->eclass->sched_props.preempt_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.preempt_timeout_max;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))
+		return -EINVAL;
 
 	return e->ops->set_preempt_timeout(e, value);
 }
@@ -266,11 +275,15 @@ static int engine_set_persistence(struct xe_device *xe, struct xe_engine *e,
 static int engine_set_job_timeout(struct xe_device *xe, struct xe_engine *e,
 				  u64 value, bool create)
 {
+	u32 min = e->hwe->eclass->sched_props.job_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.job_timeout_max;
+
 	if (XE_IOCTL_DBG(xe, !create))
 		return -EINVAL;
 
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))
+		return -EINVAL;
 
 	return e->ops->set_job_timeout(e, value);
 }
drivers/gpu/drm/xe/xe_hw_engine.c +8 -0
index afa7d25c3852..e601bffe3b13 100644
@@ -364,8 +364,16 @@ static void hw_engine_init_early(struct xe_gt *gt, struct xe_hw_engine *hwe,
 
 	if (!gt->eclass[hwe->class].sched_props.job_timeout_ms) {
 		gt->eclass[hwe->class].sched_props.job_timeout_ms = HZ * 5;
+		gt->eclass[hwe->class].sched_props.job_timeout_min = XE_HW_ENGINE_JOB_TIMEOUT_MIN;
+		gt->eclass[hwe->class].sched_props.job_timeout_max = XE_HW_ENGINE_JOB_TIMEOUT_MAX;
 		gt->eclass[hwe->class].sched_props.timeslice_us = 1 * 1000;
+		gt->eclass[hwe->class].sched_props.timeslice_min = XE_HW_ENGINE_TIMESLICE_MIN;
+		gt->eclass[hwe->class].sched_props.timeslice_max = XE_HW_ENGINE_TIMESLICE_MAX;
 		gt->eclass[hwe->class].sched_props.preempt_timeout_us = 640 * 1000;
+		gt->eclass[hwe->class].sched_props.preempt_timeout_min =
+								XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN;
+		gt->eclass[hwe->class].sched_props.preempt_timeout_max =
+								XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX;
 		/* Record default props */
 		gt->eclass[hwe->class].defaults = gt->eclass[hwe->class].sched_props;
 	}
drivers/gpu/drm/xe/xe_hw_engine.h +31 -0
index 7eca9d53c7b1..3d37d6d44261 100644
@@ -10,6 +10,37 @@
 
 struct drm_printer;
 
+#ifdef CONFIG_DRM_XE_JOB_TIMEOUT_MIN
+#define XE_HW_ENGINE_JOB_TIMEOUT_MIN CONFIG_DRM_XE_JOB_TIMEOUT_MIN
+#else
+#define XE_HW_ENGINE_JOB_TIMEOUT_MIN 1
+#endif
+#ifdef CONFIG_DRM_XE_JOB_TIMEOUT_MAX
+#define XE_HW_ENGINE_JOB_TIMEOUT_MAX CONFIG_DRM_XE_JOB_TIMEOUT_MAX
+#else
+#define XE_HW_ENGINE_JOB_TIMEOUT_MAX (10 * 1000)
+#endif
+#ifdef CONFIG_DRM_XE_TIMESLICE_MIN
+#define XE_HW_ENGINE_TIMESLICE_MIN CONFIG_DRM_XE_TIMESLICE_MIN
+#else
+#define XE_HW_ENGINE_TIMESLICE_MIN 1
+#endif
+#ifdef CONFIG_DRM_XE_TIMESLICE_MAX
+#define XE_HW_ENGINE_TIMESLICE_MAX CONFIG_DRM_XE_TIMESLICE_MAX
+#else
+#define XE_HW_ENGINE_TIMESLICE_MAX (10 * 1000 * 1000)
+#endif
+#ifdef CONFIG_DRM_XE_PREEMPT_TIMEOUT_MIN
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN CONFIG_DRM_XE_PREEMPT_TIMEOUT_MIN
+#else
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN 1
+#endif
+#ifdef CONFIG_DRM_XE_PREEMPT_TIMEOUT_MAX
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX CONFIG_DRM_XE_PREEMPT_TIMEOUT_MAX
+#else
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX (10 * 1000 * 1000)
+#endif
+
 int xe_hw_engines_init_early(struct xe_gt *gt);
 int xe_hw_engines_init(struct xe_gt *gt);
 void xe_hw_engine_handle_irq(struct xe_hw_engine *hwe, u16 intr_vec);
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +88 -0
index 990bb675d1e0..2b7ac4e02db6 100644
@@ -11,6 +11,20 @@
 
 static int xe_add_hw_engine_class_defaults(struct kobject *parent);
 
+bool enforce_schedule_limit(void)
+{
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	return true;
+#else
+	return !capable(CAP_SYS_NICE);
+#endif
+}
+
+bool engine_timeout_in_range(u64 timeout, u64 min, u64 max)
+{
+	return timeout >= min && timeout <= max;
+}
+
 static void kobj_xe_hw_engine_release(struct kobject *kobj)
 {
 	kfree(kobj);
@@ -39,11 +53,92 @@ kobj_xe_hw_engine_class(struct kobject *parent, char *name)
 	return keclass;
 }
 
+static ssize_t job_timeout_max_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
+		return err;
+
+	if (timeout < eclass->sched_props.job_timeout_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+				     XE_HW_ENGINE_JOB_TIMEOUT_MIN,
+				     XE_HW_ENGINE_JOB_TIMEOUT_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.job_timeout_max, timeout);
+
+	return count;
+}
+
+static ssize_t job_timeout_max_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.job_timeout_max);
+}
+
+static struct kobj_attribute job_timeout_max_attr =
+__ATTR(job_timeout_max, 0644, job_timeout_max_show, job_timeout_max_store);
+
+static ssize_t job_timeout_min_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
+		return err;
+
+	if (timeout > eclass->sched_props.job_timeout_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+				     XE_HW_ENGINE_JOB_TIMEOUT_MIN,
+				     XE_HW_ENGINE_JOB_TIMEOUT_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.job_timeout_min, timeout);
+
+	return count;
+}
+
+static ssize_t job_timeout_min_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.job_timeout_min);
+}
+
+static struct kobj_attribute job_timeout_min_attr =
+__ATTR(job_timeout_min, 0644, job_timeout_min_show, job_timeout_min_store);
+
 static ssize_t job_timeout_store(struct kobject *kobj,
 				 struct kobj_attribute *attr,

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject *parent, char *name) · line 141

Quoted 10 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +7 -0
 				 const char *buf, size_t count)
 {
 	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj);
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	u32 min = XE_HW_ENGINE_JOB_TIMEOUT_MIN;
+	u32 max = XE_HW_ENGINE_JOB_TIMEOUT_MAX;
+#else
+	u32 min = e->hwe->eclass->sched_props.job_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.job_timeout_max;
+#endif

I don't think we need this, just make sure default is within min / max of the sched_props.

Matt

Quoted 346 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +259 -0
 	u32 timeout;
 	int err;
 
@@ -51,6 +146,10 @@ static ssize_t job_timeout_store(struct kobject *kobj,
 	if (err)
 		return err;
 
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout, min, max))
+		return -EINVAL;
+
 	WRITE_ONCE(eclass->sched_props.job_timeout_ms, timeout);
 
 	return count;
@@ -78,11 +177,40 @@ 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 job_timeout_min_default(struct kobject *kobj,
+				       struct kobj_attribute *attr, char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.job_timeout_min);
+}
+
+static struct kobj_attribute job_timeout_min_def =
+__ATTR(job_timeout_min, 0444, job_timeout_min_default, NULL);
+
+static ssize_t job_timeout_max_default(struct kobject *kobj,
+				       struct kobj_attribute *attr, char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.job_timeout_max);
+}
+
+static struct kobj_attribute job_timeout_max_def =
+__ATTR(job_timeout_max, 0444, job_timeout_max_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);
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	u32 min = XE_HW_ENGINE_TIMESLICE_MIN;
+	u32 max = XE_HW_ENGINE_TIMESLICE_MAX;
+#else
+	u32 min = e->hwe->eclass->sched_props.timeslice_min;
+	u32 max = e->hwe->eclass->sched_props.timeslice_max;
+#endif
 	u32 duration;
 	int err;
 
@@ -90,11 +218,92 @@ static ssize_t timeslice_duration_store(struct kobject *kobj,
 	if (err)
 		return err;
 
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(duration, min, max))
+		return -EINVAL;
+
 	WRITE_ONCE(eclass->sched_props.timeslice_us, duration);
 
 	return count;
 }
 
+static ssize_t timeslice_duration_max_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;
+
+	if (duration < eclass->sched_props.timeslice_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(duration,
+				     XE_HW_ENGINE_TIMESLICE_MIN,
+				     XE_HW_ENGINE_TIMESLICE_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.timeslice_max, duration);
+
+	return count;
+}
+
+static ssize_t timeslice_duration_max_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_max);
+}
+
+static struct kobj_attribute timeslice_duration_max_attr =
+	__ATTR(timeslice_duration_max, 0644, timeslice_duration_max_show,
+	       timeslice_duration_max_store);
+
+static ssize_t timeslice_duration_min_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;
+
+	if (duration > eclass->sched_props.timeslice_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(duration,
+				     XE_HW_ENGINE_TIMESLICE_MIN,
+				     XE_HW_ENGINE_TIMESLICE_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.timeslice_min, duration);
+
+	return count;
+}
+
+static ssize_t timeslice_duration_min_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_min);
+}
+
+static struct kobj_attribute timeslice_duration_min_attr =
+	__ATTR(timeslice_duration_min, 0644, timeslice_duration_min_show,
+	       timeslice_duration_min_store);
+
 static ssize_t timeslice_duration_show(struct kobject *kobj,
 		struct kobj_attribute *attr, char *buf)
 {
@@ -118,11 +327,40 @@ static ssize_t timeslice_default(struct kobject *kobj,
 static struct kobj_attribute timeslice_duration_def =
 __ATTR(timeslice_duration_us, 0444, timeslice_default, NULL);
 
+static ssize_t timeslice_min_default(struct kobject *kobj,
+				     struct kobj_attribute *attr, char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.timeslice_min);
+}
+
+static struct kobj_attribute timeslice_duration_min_def =
+__ATTR(timeslice_duration_min, 0444, timeslice_min_default, NULL);
+
+static ssize_t timeslice_max_default(struct kobject *kobj,
+				     struct kobj_attribute *attr, char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.timeslice_max);
+}
+
+static struct kobj_attribute timeslice_duration_max_def =
+__ATTR(timeslice_duration_max, 0444, timeslice_max_default, NULL);
+
 static ssize_t preempt_timeout_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);
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	u32 min = XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN;
+	u32 max = XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX;
+#else
+	u32 min = e->hwe->eclass->sched_props.preempt_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.preempt_timeout_max;
+#endif
 	u32 timeout;
 	int err;
 
@@ -130,6 +368,10 @@ static ssize_t preempt_timeout_store(struct kobject *kobj,
 	if (err)
 		return err;
 
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout, min, max))
+		return -EINVAL;
+
 	WRITE_ONCE(eclass->sched_props.preempt_timeout_us, timeout);
 
 	return count;
@@ -158,17 +400,129 @@ static ssize_t preempt_timeout_default(struct kobject *kobj,
 static struct kobj_attribute preempt_timeout_def =
 __ATTR(preempt_timeout_us, 0444, preempt_timeout_default, NULL);
 
+static ssize_t preempt_timeout_min_default(struct kobject *kobj,
+					   struct kobj_attribute *attr,
+					   char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.preempt_timeout_min);
+}
+
+static struct kobj_attribute preempt_timeout_min_def =
+__ATTR(preempt_timeout_min, 0444, preempt_timeout_min_default, NULL);
+
+static ssize_t preempt_timeout_max_default(struct kobject *kobj,
+					   struct kobj_attribute *attr,
+					   char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.preempt_timeout_max);
+}
+
+static struct kobj_attribute preempt_timeout_max_def =
+__ATTR(preempt_timeout_max, 0444, preempt_timeout_max_default, NULL);
+
+static ssize_t preempt_timeout_max_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
+		return err;
+
+	if (timeout < eclass->sched_props.preempt_timeout_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+				     XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN,
+				     XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.preempt_timeout_max, timeout);
+
+	return count;
+}
+
+static ssize_t preempt_timeout_max_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.preempt_timeout_max);
+}
+
+static struct kobj_attribute preempt_timeout_max_attr =
+	__ATTR(preempt_timeout_max, 0644, preempt_timeout_max_show,
+	       preempt_timeout_max_store);
+
+static ssize_t preempt_timeout_min_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
+		return err;
+
+	if (timeout > eclass->sched_props.preempt_timeout_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+				     XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN,
+				     XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.preempt_timeout_min, timeout);
+
+	return count;
+}
+
+static ssize_t preempt_timeout_min_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.preempt_timeout_min);
+}
+
+static struct kobj_attribute preempt_timeout_min_attr =
+	__ATTR(preempt_timeout_min, 0644, preempt_timeout_min_show,
+	       preempt_timeout_min_store);
+
 static const struct attribute *defaults[] = {
 	&job_timeout_def.attr,
+	&job_timeout_min_def.attr,
+	&job_timeout_max_def.attr,
 	&timeslice_duration_def.attr,
+	&timeslice_duration_min_def.attr,
+	&timeslice_duration_max_def.attr,
 	&preempt_timeout_def.attr,
+	&preempt_timeout_min_def.attr,
+	&preempt_timeout_max_def.attr,
 	NULL
 };
 
 static const struct attribute *files[] = {
 	&job_timeout_attr.attr,
+	&job_timeout_min_attr.attr,
+	&job_timeout_max_attr.attr,
 	&timeslice_duration_attr.attr,
+	&timeslice_duration_min_attr.attr,
+	&timeslice_duration_max_attr.attr,
 	&preempt_timeout_attr.attr,
+	&preempt_timeout_min_attr.attr,
+	&preempt_timeout_max_attr.attr,
 	NULL
 };
 
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h +2 -0
index 757136614672..2e2ab351a991 100644
@@ -10,6 +10,8 @@
 
 #define MAX_ENGINE_CLASS_NAME_LEN    16
 int xe_hw_engine_class_sysfs_init(struct xe_gt *gt);
+bool enforce_schedule_limit(void);
+bool engine_timeout_in_range(u64 timeout, u64 min, u64 max);
 
 /**
  * struct kobj_eclass - A eclass's kobject struct that connects the kobject and the
Signature · 1 line
2.25.1
#14 lore raw

Re: [Intel-xe] [PATCH V9 6/6] drm/xe: Add min/max cap for engine scheduler properties

Quoted 160 lines · Matthew Brost
Quoted 138 lines · Tejas Upadhyay

Add sysfs entries for the min, max, and defaults for each of engine scheduler controls for every hardware engine class.

Non-elevated user IOCTLs to set these controls must be within the min-max ranges of the sysfs entries, elevated user can set these controls to any value. However, introduced compile time CONFIG min-max values which restricts elevated user to be in compile time min-max range if at all sysfs min/max are violated.

Sysfs entries examples are,
DUT# cat /sys/class/drm/cardX/device/tileN/gtN/engines/ccs/.defaults/

job_timeout_max         job_timeout_ms          preempt_timeout_min     timeslice_duration_max  timeslice_duration_us
job_timeout_min         preempt_timeout_max     preempt_timeout_us      timeslice_duration_min

DUT# cat /sys/class/drm/card1/device/tileN/gtN/engines/ccs/

.defaults/              job_timeout_min         preempt_timeout_max     preempt_timeout_us      timeslice_duration_min
job_timeout_max         job_timeout_ms          preempt_timeout_min     timeslice_duration_max  timeslice_duration_us

V9 :
- Rebase to use s/xe_engine/xe_hw_engine/ - Matt
V8 :
- fix enforce_sched_limit and avoid code duplication - Niranjana
- Make sure min < max - Niranjana
V7 :
- Rebase to replace hw engine with eclass interface
- return EINVAL in place of EPERM
- Use some APIs to avoid code duplication
V6 :
- Rebase changes to reflect per engine class props interface - MattB
- Use #if ENABLED - MattB
- Remove MAX_SCHED_TIMEOUT check as range validation is enough
V5 :
- Rebase to resolve conflicts - CI
V4 :
- Rebase
- Update commit to reflect tile addition
- Use XE_HW macro directly as they are already filtered for CONFIG checks - Niranjana
- Add CONFIG for enable/disable min/max limitation
on elevated user. Default is enable - Matt/Joonas
V3 :
- Resolve CI hooks warning for kernel-doc
V2 :
- Restric min/max setting to #define default min/max for elevated user - Himal
- Remove unrelated changes from patch - Niranjana

---
 drivers/gpu/drm/xe/Kconfig                    |   6 +
 drivers/gpu/drm/xe/Kconfig.profile            |  46 +++
 drivers/gpu/drm/xe/xe_engine.c                |  25 +-
 drivers/gpu/drm/xe/xe_hw_engine.c             |   8 +
 drivers/gpu/drm/xe/xe_hw_engine.h             |  31 ++
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 354 ++++++++++++++++++
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h |   2 +
 7 files changed, 466 insertions(+), 6 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/Kconfig.profile
drivers/gpu/drm/xe/Kconfig +6 -0
index d44794f99338..0a4ea965645b 100644
@@ -83,3 +83,9 @@ depends on DRM_XE
 depends on EXPERT
 source "drivers/gpu/drm/xe/Kconfig.debug"
 endmenu
+
+menu "drm/xe Profile Guided Optimisation"
+	visible if EXPERT
+	depends on DRM_XE
+	source "drivers/gpu/drm/xe/Kconfig.profile"
+endmenu
drivers/gpu/drm/xe/Kconfig.profile new file +46 -0
new file mode 100644
index 000000000000..e72f15ec4bf6
@@ -0,0 +1,46 @@
+config DRM_XE_JOB_TIMEOUT_MAX
+       int "Default max job timeout (ms)"
+       default 10000 # milliseconds
+       help
+         Configures the default max job timeout after which job will
+         be forcefully taken away from scheduler.
+config DRM_XE_JOB_TIMEOUT_MIN
+       int "Default max job timeout (ms)"
+       default 1 # milliseconds
+       help
+         Configures the default min job timeout after which job will
+         be forcefully taken away from scheduler.
+config DRM_XE_TIMESLICE_MAX
+       int "Default max timeslice duration (us)"
+       default 10000000 # microseconds
+       help
+         Configures the default max timeslice duration between multiple
+         contexts by guc scheduling.
+config DRM_XE_TIMESLICE_MIN
+       int "Default min timeslice duration (us)"
+       default 1 # microseconds
+       help
+         Configures the default min timeslice duration between multiple
+         contexts by guc scheduling.
+config DRM_XE_PREEMPT_TIMEOUT_MAX
+       int "Default max  preempt timeout (us)"
+       default 10000000 # microseconds
+       help
+         Configures the default max preempt timeout after which context
+         will be forcefully taken away and higher priority context will
+         run.
+config DRM_XE_PREEMPT_TIMEOUT_MIN
+       int "Default min  preempt timeout (us)"
+       default 1 # microseconds
+       help
+         Configures the default min preempt timeout after which context
+         will be forcefully taken away and higher priority context will
+         run.
+config DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT
+       bool "Default configuration of limitation on scheduler timeout"
+       default y
+       help
+	 Configures the enablement of limitation on scheduler timeout
+	 to apply to applicable user. For elevated user, all above MIN
+	 and MAX values will apply when this configuration is enable to
+	 apply limitation. By default limitation is applied.
drivers/gpu/drm/xe/xe_engine.c +1 -0
index 9e167b113963..d934196eb79f 100644
@@ -13,6 +13,7 @@
 
 #include "xe_device.h"
 #include "xe_gt.h"
+#include "xe_hw_engine_class_sysfs.h"
 #include "xe_hw_fence.h"
 #include "xe_lrc.h"
 #include "xe_macros.h"

drivers/gpu/drm/xe/xe_engine.c static int engine_set_priority(struct xe_device *xe, struct xe_engine *e, · line 196

Quoted 7 lines
drivers/gpu/drm/xe/xe_engine.c +2 -2
@@ -191,8 +192,12 @@ static int engine_set_priority(struct xe_device *xe, struct xe_engine *e,
 static int engine_set_timeslice(struct xe_device *xe, struct xe_engine *e,
 				u64 value, bool create)
 {
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	u32 min = e->hwe->eclass->sched_props.timeslice_min;
+	u32 max = e->hwe->eclass->sched_props.timeslice_max;

So I screwed this up in my last comment, sorry.

min = cap_nice ? KConfig option for min : e->hwe->eclass->sched_props.timeslice_min; same logic for max;

Probably add helper for this.

drivers/gpu/drm/xe/xe_engine.c static int engine_set_priority(struct xe_device *xe, struct xe_engine *e, · line 199

Quoted 3 lines
drivers/gpu/drm/xe/xe_engine.c +3 -0
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))

Then I think logic works too...

Quoted 9 lines

if cap nice && !Kconfig option to enfore limits (enforce_schedule_limit returns false):
user can do whatever
else if cap nice
user within Kconfig range
else
user within sysfs range

This is what we want in the end.

Matt, I think this is exactly what the previous revision of the patch was doing.

Quoted 210 lines
Quoted 210 lines
drivers/gpu/drm/xe/xe_engine.c +13 -4
+		return -EINVAL;
 
 	return e->ops->set_timeslice(e, value);
 }
@@ -201,8 +206,12 @@ static int engine_set_preemption_timeout(struct xe_device *xe,
 					 struct xe_engine *e, u64 value,
 					 bool create)
 {
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	u32 min = e->hwe->eclass->sched_props.preempt_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.preempt_timeout_max;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))
+		return -EINVAL;
 
 	return e->ops->set_preempt_timeout(e, value);
 }
@@ -266,11 +275,15 @@ static int engine_set_persistence(struct xe_device *xe, struct xe_engine *e,
 static int engine_set_job_timeout(struct xe_device *xe, struct xe_engine *e,
 				  u64 value, bool create)
 {
+	u32 min = e->hwe->eclass->sched_props.job_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.job_timeout_max;
+
 	if (XE_IOCTL_DBG(xe, !create))
 		return -EINVAL;
 
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))
+		return -EINVAL;
 
 	return e->ops->set_job_timeout(e, value);
 }
drivers/gpu/drm/xe/xe_hw_engine.c +8 -0
index afa7d25c3852..e601bffe3b13 100644
@@ -364,8 +364,16 @@ static void hw_engine_init_early(struct xe_gt *gt, struct xe_hw_engine *hwe,
 
 	if (!gt->eclass[hwe->class].sched_props.job_timeout_ms) {
 		gt->eclass[hwe->class].sched_props.job_timeout_ms = HZ * 5;
+		gt->eclass[hwe->class].sched_props.job_timeout_min = XE_HW_ENGINE_JOB_TIMEOUT_MIN;
+		gt->eclass[hwe->class].sched_props.job_timeout_max = XE_HW_ENGINE_JOB_TIMEOUT_MAX;
 		gt->eclass[hwe->class].sched_props.timeslice_us = 1 * 1000;
+		gt->eclass[hwe->class].sched_props.timeslice_min = XE_HW_ENGINE_TIMESLICE_MIN;
+		gt->eclass[hwe->class].sched_props.timeslice_max = XE_HW_ENGINE_TIMESLICE_MAX;
 		gt->eclass[hwe->class].sched_props.preempt_timeout_us = 640 * 1000;
+		gt->eclass[hwe->class].sched_props.preempt_timeout_min =
+								XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN;
+		gt->eclass[hwe->class].sched_props.preempt_timeout_max =
+								XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX;
 		/* Record default props */
 		gt->eclass[hwe->class].defaults = gt->eclass[hwe->class].sched_props;
 	}
drivers/gpu/drm/xe/xe_hw_engine.h +31 -0
index 7eca9d53c7b1..3d37d6d44261 100644
@@ -10,6 +10,37 @@
 
 struct drm_printer;
 
+#ifdef CONFIG_DRM_XE_JOB_TIMEOUT_MIN
+#define XE_HW_ENGINE_JOB_TIMEOUT_MIN CONFIG_DRM_XE_JOB_TIMEOUT_MIN
+#else
+#define XE_HW_ENGINE_JOB_TIMEOUT_MIN 1
+#endif
+#ifdef CONFIG_DRM_XE_JOB_TIMEOUT_MAX
+#define XE_HW_ENGINE_JOB_TIMEOUT_MAX CONFIG_DRM_XE_JOB_TIMEOUT_MAX
+#else
+#define XE_HW_ENGINE_JOB_TIMEOUT_MAX (10 * 1000)
+#endif
+#ifdef CONFIG_DRM_XE_TIMESLICE_MIN
+#define XE_HW_ENGINE_TIMESLICE_MIN CONFIG_DRM_XE_TIMESLICE_MIN
+#else
+#define XE_HW_ENGINE_TIMESLICE_MIN 1
+#endif
+#ifdef CONFIG_DRM_XE_TIMESLICE_MAX
+#define XE_HW_ENGINE_TIMESLICE_MAX CONFIG_DRM_XE_TIMESLICE_MAX
+#else
+#define XE_HW_ENGINE_TIMESLICE_MAX (10 * 1000 * 1000)
+#endif
+#ifdef CONFIG_DRM_XE_PREEMPT_TIMEOUT_MIN
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN CONFIG_DRM_XE_PREEMPT_TIMEOUT_MIN
+#else
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN 1
+#endif
+#ifdef CONFIG_DRM_XE_PREEMPT_TIMEOUT_MAX
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX CONFIG_DRM_XE_PREEMPT_TIMEOUT_MAX
+#else
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX (10 * 1000 * 1000)
+#endif
+
 int xe_hw_engines_init_early(struct xe_gt *gt);
 int xe_hw_engines_init(struct xe_gt *gt);
 void xe_hw_engine_handle_irq(struct xe_hw_engine *hwe, u16 intr_vec);
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +90 -0
index 990bb675d1e0..2b7ac4e02db6 100644
@@ -11,6 +11,20 @@
 
 static int xe_add_hw_engine_class_defaults(struct kobject *parent);
 
+bool enforce_schedule_limit(void)
+{
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	return true;
+#else
+	return !capable(CAP_SYS_NICE);
+#endif
+}
+
+bool engine_timeout_in_range(u64 timeout, u64 min, u64 max)
+{
+	return timeout >= min && timeout <= max;
+}
+
 static void kobj_xe_hw_engine_release(struct kobject *kobj)
 {
 	kfree(kobj);
@@ -39,11 +53,92 @@ kobj_xe_hw_engine_class(struct kobject *parent, char *name)
 	return keclass;
 }
 
+static ssize_t job_timeout_max_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
+		return err;
+
+	if (timeout < eclass->sched_props.job_timeout_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+				     XE_HW_ENGINE_JOB_TIMEOUT_MIN,
+				     XE_HW_ENGINE_JOB_TIMEOUT_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.job_timeout_max, timeout);
+
+	return count;
+}
+
+static ssize_t job_timeout_max_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.job_timeout_max);
+}
+
+static struct kobj_attribute job_timeout_max_attr =
+__ATTR(job_timeout_max, 0644, job_timeout_max_show, job_timeout_max_store);
+
+static ssize_t job_timeout_min_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
+		return err;
+
+	if (timeout > eclass->sched_props.job_timeout_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+				     XE_HW_ENGINE_JOB_TIMEOUT_MIN,
+				     XE_HW_ENGINE_JOB_TIMEOUT_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.job_timeout_min, timeout);
+
+	return count;
+}
+
+static ssize_t job_timeout_min_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.job_timeout_min);
+}
+
+static struct kobj_attribute job_timeout_min_attr =
+__ATTR(job_timeout_min, 0644, job_timeout_min_show, job_timeout_min_store);
+
 static ssize_t job_timeout_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);
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	u32 min = XE_HW_ENGINE_JOB_TIMEOUT_MIN;
Quoted 9 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject *parent, char *name) · line 141

Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	u32 max = XE_HW_ENGINE_JOB_TIMEOUT_MAX;
+#else
+	u32 min = e->hwe->eclass->sched_props.job_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.job_timeout_max;
+#endif

I don't think we need this, just make sure default is within min / max of the sched_props.

Shouldn't the sched_prop set through sysfs here which applies to all future user engines (xe_engine) has the same requirement as the sched_prop set directly to user engine (xe_engine) through set_properly ioctl? ie., shoudln't the requirement be same in job_timeout_store() and engine_set_job_timeout()?

Niranjana

Quoted 348 lines

Matt

Quoted 346 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +259 -0
 	u32 timeout;
 	int err;
 
@@ -51,6 +146,10 @@ static ssize_t job_timeout_store(struct kobject *kobj,
 	if (err)
 		return err;
 
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout, min, max))
+		return -EINVAL;
+
 	WRITE_ONCE(eclass->sched_props.job_timeout_ms, timeout);
 
 	return count;
@@ -78,11 +177,40 @@ 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 job_timeout_min_default(struct kobject *kobj,
+				       struct kobj_attribute *attr, char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.job_timeout_min);
+}
+
+static struct kobj_attribute job_timeout_min_def =
+__ATTR(job_timeout_min, 0444, job_timeout_min_default, NULL);
+
+static ssize_t job_timeout_max_default(struct kobject *kobj,
+				       struct kobj_attribute *attr, char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.job_timeout_max);
+}
+
+static struct kobj_attribute job_timeout_max_def =
+__ATTR(job_timeout_max, 0444, job_timeout_max_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);
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	u32 min = XE_HW_ENGINE_TIMESLICE_MIN;
+	u32 max = XE_HW_ENGINE_TIMESLICE_MAX;
+#else
+	u32 min = e->hwe->eclass->sched_props.timeslice_min;
+	u32 max = e->hwe->eclass->sched_props.timeslice_max;
+#endif
 	u32 duration;
 	int err;
 
@@ -90,11 +218,92 @@ static ssize_t timeslice_duration_store(struct kobject *kobj,
 	if (err)
 		return err;
 
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(duration, min, max))
+		return -EINVAL;
+
 	WRITE_ONCE(eclass->sched_props.timeslice_us, duration);
 
 	return count;
 }
 
+static ssize_t timeslice_duration_max_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;
+
+	if (duration < eclass->sched_props.timeslice_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(duration,
+				     XE_HW_ENGINE_TIMESLICE_MIN,
+				     XE_HW_ENGINE_TIMESLICE_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.timeslice_max, duration);
+
+	return count;
+}
+
+static ssize_t timeslice_duration_max_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_max);
+}
+
+static struct kobj_attribute timeslice_duration_max_attr =
+	__ATTR(timeslice_duration_max, 0644, timeslice_duration_max_show,
+	       timeslice_duration_max_store);
+
+static ssize_t timeslice_duration_min_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;
+
+	if (duration > eclass->sched_props.timeslice_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(duration,
+				     XE_HW_ENGINE_TIMESLICE_MIN,
+				     XE_HW_ENGINE_TIMESLICE_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.timeslice_min, duration);
+
+	return count;
+}
+
+static ssize_t timeslice_duration_min_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_min);
+}
+
+static struct kobj_attribute timeslice_duration_min_attr =
+	__ATTR(timeslice_duration_min, 0644, timeslice_duration_min_show,
+	       timeslice_duration_min_store);
+
 static ssize_t timeslice_duration_show(struct kobject *kobj,
 		struct kobj_attribute *attr, char *buf)
 {
@@ -118,11 +327,40 @@ static ssize_t timeslice_default(struct kobject *kobj,
 static struct kobj_attribute timeslice_duration_def =
 __ATTR(timeslice_duration_us, 0444, timeslice_default, NULL);
 
+static ssize_t timeslice_min_default(struct kobject *kobj,
+				     struct kobj_attribute *attr, char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.timeslice_min);
+}
+
+static struct kobj_attribute timeslice_duration_min_def =
+__ATTR(timeslice_duration_min, 0444, timeslice_min_default, NULL);
+
+static ssize_t timeslice_max_default(struct kobject *kobj,
+				     struct kobj_attribute *attr, char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.timeslice_max);
+}
+
+static struct kobj_attribute timeslice_duration_max_def =
+__ATTR(timeslice_duration_max, 0444, timeslice_max_default, NULL);
+
 static ssize_t preempt_timeout_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);
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	u32 min = XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN;
+	u32 max = XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX;
+#else
+	u32 min = e->hwe->eclass->sched_props.preempt_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.preempt_timeout_max;
+#endif
 	u32 timeout;
 	int err;
 
@@ -130,6 +368,10 @@ static ssize_t preempt_timeout_store(struct kobject *kobj,
 	if (err)
 		return err;
 
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout, min, max))
+		return -EINVAL;
+
 	WRITE_ONCE(eclass->sched_props.preempt_timeout_us, timeout);
 
 	return count;
@@ -158,17 +400,129 @@ static ssize_t preempt_timeout_default(struct kobject *kobj,
 static struct kobj_attribute preempt_timeout_def =
 __ATTR(preempt_timeout_us, 0444, preempt_timeout_default, NULL);
 
+static ssize_t preempt_timeout_min_default(struct kobject *kobj,
+					   struct kobj_attribute *attr,
+					   char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.preempt_timeout_min);
+}
+
+static struct kobj_attribute preempt_timeout_min_def =
+__ATTR(preempt_timeout_min, 0444, preempt_timeout_min_default, NULL);
+
+static ssize_t preempt_timeout_max_default(struct kobject *kobj,
+					   struct kobj_attribute *attr,
+					   char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.preempt_timeout_max);
+}
+
+static struct kobj_attribute preempt_timeout_max_def =
+__ATTR(preempt_timeout_max, 0444, preempt_timeout_max_default, NULL);
+
+static ssize_t preempt_timeout_max_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
+		return err;
+
+	if (timeout < eclass->sched_props.preempt_timeout_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+				     XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN,
+				     XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.preempt_timeout_max, timeout);
+
+	return count;
+}
+
+static ssize_t preempt_timeout_max_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.preempt_timeout_max);
+}
+
+static struct kobj_attribute preempt_timeout_max_attr =
+	__ATTR(preempt_timeout_max, 0644, preempt_timeout_max_show,
+	       preempt_timeout_max_store);
+
+static ssize_t preempt_timeout_min_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
+		return err;
+
+	if (timeout > eclass->sched_props.preempt_timeout_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+				     XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN,
+				     XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.preempt_timeout_min, timeout);
+
+	return count;
+}
+
+static ssize_t preempt_timeout_min_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.preempt_timeout_min);
+}
+
+static struct kobj_attribute preempt_timeout_min_attr =
+	__ATTR(preempt_timeout_min, 0644, preempt_timeout_min_show,
+	       preempt_timeout_min_store);
+
 static const struct attribute *defaults[] = {
 	&job_timeout_def.attr,
+	&job_timeout_min_def.attr,
+	&job_timeout_max_def.attr,
 	&timeslice_duration_def.attr,
+	&timeslice_duration_min_def.attr,
+	&timeslice_duration_max_def.attr,
 	&preempt_timeout_def.attr,
+	&preempt_timeout_min_def.attr,
+	&preempt_timeout_max_def.attr,
 	NULL
 };
 
 static const struct attribute *files[] = {
 	&job_timeout_attr.attr,
+	&job_timeout_min_attr.attr,
+	&job_timeout_max_attr.attr,
 	&timeslice_duration_attr.attr,
+	&timeslice_duration_min_attr.attr,
+	&timeslice_duration_max_attr.attr,
 	&preempt_timeout_attr.attr,
+	&preempt_timeout_min_attr.attr,
+	&preempt_timeout_max_attr.attr,
 	NULL
 };
 
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h +2 -1
index 757136614672..2e2ab351a991 100644
@@ -10,6 +10,8 @@
 
 #define MAX_ENGINE_CLASS_NAME_LEN    16
 int xe_hw_engine_class_sysfs_init(struct xe_gt *gt);
+bool enforce_schedule_limit(void);
+bool engine_timeout_in_range(u64 timeout, u64 min, u64 max);
 
 /**
  * struct kobj_eclass - A eclass's kobject struct that connects the kobject and the
--

2.25.1

maintainer
#15 lore raw

Re: [Intel-xe] [PATCH V9 6/6] drm/xe: Add min/max cap for engine scheduler properties

Quoted 168 lines · Niranjana Vishwanathapura
Quoted 167 lines · Matthew Brost
Quoted 138 lines · Tejas Upadhyay

Add sysfs entries for the min, max, and defaults for each of engine scheduler controls for every hardware engine class.

Non-elevated user IOCTLs to set these controls must be within the min-max ranges of the sysfs entries, elevated user can set these controls to any value. However, introduced compile time CONFIG min-max values which restricts elevated user to be in compile time min-max range if at all sysfs min/max are violated.

Sysfs entries examples are,
DUT# cat /sys/class/drm/cardX/device/tileN/gtN/engines/ccs/.defaults/

job_timeout_max         job_timeout_ms          preempt_timeout_min     timeslice_duration_max  timeslice_duration_us
job_timeout_min         preempt_timeout_max     preempt_timeout_us      timeslice_duration_min

DUT# cat /sys/class/drm/card1/device/tileN/gtN/engines/ccs/

.defaults/              job_timeout_min         preempt_timeout_max     preempt_timeout_us      timeslice_duration_min
job_timeout_max         job_timeout_ms          preempt_timeout_min     timeslice_duration_max  timeslice_duration_us

V9 :
- Rebase to use s/xe_engine/xe_hw_engine/ - Matt
V8 :
- fix enforce_sched_limit and avoid code duplication - Niranjana
- Make sure min < max - Niranjana
V7 :
- Rebase to replace hw engine with eclass interface
- return EINVAL in place of EPERM
- Use some APIs to avoid code duplication
V6 :
- Rebase changes to reflect per engine class props interface - MattB
- Use #if ENABLED - MattB
- Remove MAX_SCHED_TIMEOUT check as range validation is enough
V5 :
- Rebase to resolve conflicts - CI
V4 :
- Rebase
- Update commit to reflect tile addition
- Use XE_HW macro directly as they are already filtered for CONFIG checks - Niranjana
- Add CONFIG for enable/disable min/max limitation
on elevated user. Default is enable - Matt/Joonas
V3 :
- Resolve CI hooks warning for kernel-doc
V2 :
- Restric min/max setting to #define default min/max for elevated user - Himal
- Remove unrelated changes from patch - Niranjana

---
 drivers/gpu/drm/xe/Kconfig                    |   6 +
 drivers/gpu/drm/xe/Kconfig.profile            |  46 +++
 drivers/gpu/drm/xe/xe_engine.c                |  25 +-
 drivers/gpu/drm/xe/xe_hw_engine.c             |   8 +
 drivers/gpu/drm/xe/xe_hw_engine.h             |  31 ++
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 354 ++++++++++++++++++
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h |   2 +
 7 files changed, 466 insertions(+), 6 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/Kconfig.profile
drivers/gpu/drm/xe/Kconfig +6 -0
index d44794f99338..0a4ea965645b 100644
@@ -83,3 +83,9 @@ depends on DRM_XE
 depends on EXPERT
 source "drivers/gpu/drm/xe/Kconfig.debug"
 endmenu
+
+menu "drm/xe Profile Guided Optimisation"
+	visible if EXPERT
+	depends on DRM_XE
+	source "drivers/gpu/drm/xe/Kconfig.profile"
+endmenu
drivers/gpu/drm/xe/Kconfig.profile new file +46 -0
new file mode 100644
index 000000000000..e72f15ec4bf6
@@ -0,0 +1,46 @@
+config DRM_XE_JOB_TIMEOUT_MAX
+       int "Default max job timeout (ms)"
+       default 10000 # milliseconds
+       help
+         Configures the default max job timeout after which job will
+         be forcefully taken away from scheduler.
+config DRM_XE_JOB_TIMEOUT_MIN
+       int "Default max job timeout (ms)"
+       default 1 # milliseconds
+       help
+         Configures the default min job timeout after which job will
+         be forcefully taken away from scheduler.
+config DRM_XE_TIMESLICE_MAX
+       int "Default max timeslice duration (us)"
+       default 10000000 # microseconds
+       help
+         Configures the default max timeslice duration between multiple
+         contexts by guc scheduling.
+config DRM_XE_TIMESLICE_MIN
+       int "Default min timeslice duration (us)"
+       default 1 # microseconds
+       help
+         Configures the default min timeslice duration between multiple
+         contexts by guc scheduling.
+config DRM_XE_PREEMPT_TIMEOUT_MAX
+       int "Default max  preempt timeout (us)"
+       default 10000000 # microseconds
+       help
+         Configures the default max preempt timeout after which context
+         will be forcefully taken away and higher priority context will
+         run.
+config DRM_XE_PREEMPT_TIMEOUT_MIN
+       int "Default min  preempt timeout (us)"
+       default 1 # microseconds
+       help
+         Configures the default min preempt timeout after which context
+         will be forcefully taken away and higher priority context will
+         run.
+config DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT
+       bool "Default configuration of limitation on scheduler timeout"
+       default y
+       help
+	 Configures the enablement of limitation on scheduler timeout
+	 to apply to applicable user. For elevated user, all above MIN
+	 and MAX values will apply when this configuration is enable to
+	 apply limitation. By default limitation is applied.
drivers/gpu/drm/xe/xe_engine.c +1 -0
index 9e167b113963..d934196eb79f 100644
@@ -13,6 +13,7 @@
 
 #include "xe_device.h"
 #include "xe_gt.h"
+#include "xe_hw_engine_class_sysfs.h"
 #include "xe_hw_fence.h"
 #include "xe_lrc.h"
 #include "xe_macros.h"

drivers/gpu/drm/xe/xe_engine.c static int engine_set_priority(struct xe_device *xe, struct xe_engine *e, · line 196

Quoted 7 lines
drivers/gpu/drm/xe/xe_engine.c +2 -2
@@ -191,8 +192,12 @@ static int engine_set_priority(struct xe_device *xe, struct xe_engine *e,
 static int engine_set_timeslice(struct xe_device *xe, struct xe_engine *e,
 				u64 value, bool create)
 {
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	u32 min = e->hwe->eclass->sched_props.timeslice_min;
+	u32 max = e->hwe->eclass->sched_props.timeslice_max;

So I screwed this up in my last comment, sorry.

min = cap_nice ? KConfig option for min : e->hwe->eclass->sched_props.timeslice_min; same logic for max;

Probably add helper for this.

drivers/gpu/drm/xe/xe_engine.c static int engine_set_priority(struct xe_device *xe, struct xe_engine *e, · line 199

Quoted 3 lines
drivers/gpu/drm/xe/xe_engine.c +3 -0
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))

Then I think logic works too...

if cap nice && !Kconfig option to enfore limits (enforce_schedule_limit returns false):
user can do whatever
else if cap nice
user within Kconfig range
else
user within sysfs range

Quoted 5 lines
Quoted 2 lines

This is what we want in the end.

Matt, I think this is exactly what the previous revision of the patch was doing.

No... Previous version

min = Kconfig option to enfore limits ? KConfig option for min : e->hwe->eclass->sched_props.timeslice_min same for max

Results in:

if cap nice && !Kconfig option to enfore limits (enforce_schedule_limit returns false):
user can do whatever
else if cap_nice || Kconfig option to enfore limit
user within Kconfig range
else
user within sysfs range

!cap_nice && Kconfig option to enfore limits == user within Kconfig range (previously) !cap_nice && Kconfig option to enfore limits == user within sysfs range (my suggestion)

The logic is different and I believe we want what I'm suggesting.

Matt

Quoted 576 lines
Quoted 210 lines
Quoted 210 lines
drivers/gpu/drm/xe/xe_engine.c +13 -4
+		return -EINVAL;
 
 	return e->ops->set_timeslice(e, value);
 }
@@ -201,8 +206,12 @@ static int engine_set_preemption_timeout(struct xe_device *xe,
 					 struct xe_engine *e, u64 value,
 					 bool create)
 {
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	u32 min = e->hwe->eclass->sched_props.preempt_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.preempt_timeout_max;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))
+		return -EINVAL;
 
 	return e->ops->set_preempt_timeout(e, value);
 }
@@ -266,11 +275,15 @@ static int engine_set_persistence(struct xe_device *xe, struct xe_engine *e,
 static int engine_set_job_timeout(struct xe_device *xe, struct xe_engine *e,
 				  u64 value, bool create)
 {
+	u32 min = e->hwe->eclass->sched_props.job_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.job_timeout_max;
+
 	if (XE_IOCTL_DBG(xe, !create))
 		return -EINVAL;
 
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))
+		return -EINVAL;
 
 	return e->ops->set_job_timeout(e, value);
 }
drivers/gpu/drm/xe/xe_hw_engine.c +8 -0
index afa7d25c3852..e601bffe3b13 100644
@@ -364,8 +364,16 @@ static void hw_engine_init_early(struct xe_gt *gt, struct xe_hw_engine *hwe,
 
 	if (!gt->eclass[hwe->class].sched_props.job_timeout_ms) {
 		gt->eclass[hwe->class].sched_props.job_timeout_ms = HZ * 5;
+		gt->eclass[hwe->class].sched_props.job_timeout_min = XE_HW_ENGINE_JOB_TIMEOUT_MIN;
+		gt->eclass[hwe->class].sched_props.job_timeout_max = XE_HW_ENGINE_JOB_TIMEOUT_MAX;
 		gt->eclass[hwe->class].sched_props.timeslice_us = 1 * 1000;
+		gt->eclass[hwe->class].sched_props.timeslice_min = XE_HW_ENGINE_TIMESLICE_MIN;
+		gt->eclass[hwe->class].sched_props.timeslice_max = XE_HW_ENGINE_TIMESLICE_MAX;
 		gt->eclass[hwe->class].sched_props.preempt_timeout_us = 640 * 1000;
+		gt->eclass[hwe->class].sched_props.preempt_timeout_min =
+								XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN;
+		gt->eclass[hwe->class].sched_props.preempt_timeout_max =
+								XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX;
 		/* Record default props */
 		gt->eclass[hwe->class].defaults = gt->eclass[hwe->class].sched_props;
 	}
drivers/gpu/drm/xe/xe_hw_engine.h +31 -0
index 7eca9d53c7b1..3d37d6d44261 100644
@@ -10,6 +10,37 @@
 
 struct drm_printer;
 
+#ifdef CONFIG_DRM_XE_JOB_TIMEOUT_MIN
+#define XE_HW_ENGINE_JOB_TIMEOUT_MIN CONFIG_DRM_XE_JOB_TIMEOUT_MIN
+#else
+#define XE_HW_ENGINE_JOB_TIMEOUT_MIN 1
+#endif
+#ifdef CONFIG_DRM_XE_JOB_TIMEOUT_MAX
+#define XE_HW_ENGINE_JOB_TIMEOUT_MAX CONFIG_DRM_XE_JOB_TIMEOUT_MAX
+#else
+#define XE_HW_ENGINE_JOB_TIMEOUT_MAX (10 * 1000)
+#endif
+#ifdef CONFIG_DRM_XE_TIMESLICE_MIN
+#define XE_HW_ENGINE_TIMESLICE_MIN CONFIG_DRM_XE_TIMESLICE_MIN
+#else
+#define XE_HW_ENGINE_TIMESLICE_MIN 1
+#endif
+#ifdef CONFIG_DRM_XE_TIMESLICE_MAX
+#define XE_HW_ENGINE_TIMESLICE_MAX CONFIG_DRM_XE_TIMESLICE_MAX
+#else
+#define XE_HW_ENGINE_TIMESLICE_MAX (10 * 1000 * 1000)
+#endif
+#ifdef CONFIG_DRM_XE_PREEMPT_TIMEOUT_MIN
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN CONFIG_DRM_XE_PREEMPT_TIMEOUT_MIN
+#else
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN 1
+#endif
+#ifdef CONFIG_DRM_XE_PREEMPT_TIMEOUT_MAX
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX CONFIG_DRM_XE_PREEMPT_TIMEOUT_MAX
+#else
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX (10 * 1000 * 1000)
+#endif
+
 int xe_hw_engines_init_early(struct xe_gt *gt);
 int xe_hw_engines_init(struct xe_gt *gt);
 void xe_hw_engine_handle_irq(struct xe_hw_engine *hwe, u16 intr_vec);
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +90 -0
index 990bb675d1e0..2b7ac4e02db6 100644
@@ -11,6 +11,20 @@
 
 static int xe_add_hw_engine_class_defaults(struct kobject *parent);
 
+bool enforce_schedule_limit(void)
+{
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	return true;
+#else
+	return !capable(CAP_SYS_NICE);
+#endif
+}
+
+bool engine_timeout_in_range(u64 timeout, u64 min, u64 max)
+{
+	return timeout >= min && timeout <= max;
+}
+
 static void kobj_xe_hw_engine_release(struct kobject *kobj)
 {
 	kfree(kobj);
@@ -39,11 +53,92 @@ kobj_xe_hw_engine_class(struct kobject *parent, char *name)
 	return keclass;
 }
 
+static ssize_t job_timeout_max_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
+		return err;
+
+	if (timeout < eclass->sched_props.job_timeout_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+				     XE_HW_ENGINE_JOB_TIMEOUT_MIN,
+				     XE_HW_ENGINE_JOB_TIMEOUT_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.job_timeout_max, timeout);
+
+	return count;
+}
+
+static ssize_t job_timeout_max_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.job_timeout_max);
+}
+
+static struct kobj_attribute job_timeout_max_attr =
+__ATTR(job_timeout_max, 0644, job_timeout_max_show, job_timeout_max_store);
+
+static ssize_t job_timeout_min_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
+		return err;
+
+	if (timeout > eclass->sched_props.job_timeout_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+				     XE_HW_ENGINE_JOB_TIMEOUT_MIN,
+				     XE_HW_ENGINE_JOB_TIMEOUT_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.job_timeout_min, timeout);
+
+	return count;
+}
+
+static ssize_t job_timeout_min_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.job_timeout_min);
+}
+
+static struct kobj_attribute job_timeout_min_attr =
+__ATTR(job_timeout_min, 0644, job_timeout_min_show, job_timeout_min_store);
+
 static ssize_t job_timeout_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);
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	u32 min = XE_HW_ENGINE_JOB_TIMEOUT_MIN;
Quoted 9 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject *parent, char *name) · line 141

Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	u32 max = XE_HW_ENGINE_JOB_TIMEOUT_MAX;
+#else
+	u32 min = e->hwe->eclass->sched_props.job_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.job_timeout_max;
+#endif

I don't think we need this, just make sure default is within min / max of the sched_props.

Shouldn't the sched_prop set through sysfs here which applies to all future user engines (xe_engine) has the same requirement as the sched_prop set directly to user engine (xe_engine) through set_properly ioctl? ie., shoudln't the requirement be same in job_timeout_store() and engine_set_job_timeout()?

Niranjana

Quoted 348 lines

Matt

Quoted 346 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +259 -0
 	u32 timeout;
 	int err;
 
@@ -51,6 +146,10 @@ static ssize_t job_timeout_store(struct kobject *kobj,
 	if (err)
 		return err;
 
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout, min, max))
+		return -EINVAL;
+
 	WRITE_ONCE(eclass->sched_props.job_timeout_ms, timeout);
 
 	return count;
@@ -78,11 +177,40 @@ 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 job_timeout_min_default(struct kobject *kobj,
+				       struct kobj_attribute *attr, char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.job_timeout_min);
+}
+
+static struct kobj_attribute job_timeout_min_def =
+__ATTR(job_timeout_min, 0444, job_timeout_min_default, NULL);
+
+static ssize_t job_timeout_max_default(struct kobject *kobj,
+				       struct kobj_attribute *attr, char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.job_timeout_max);
+}
+
+static struct kobj_attribute job_timeout_max_def =
+__ATTR(job_timeout_max, 0444, job_timeout_max_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);
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	u32 min = XE_HW_ENGINE_TIMESLICE_MIN;
+	u32 max = XE_HW_ENGINE_TIMESLICE_MAX;
+#else
+	u32 min = e->hwe->eclass->sched_props.timeslice_min;
+	u32 max = e->hwe->eclass->sched_props.timeslice_max;
+#endif
 	u32 duration;
 	int err;
 
@@ -90,11 +218,92 @@ static ssize_t timeslice_duration_store(struct kobject *kobj,
 	if (err)
 		return err;
 
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(duration, min, max))
+		return -EINVAL;
+
 	WRITE_ONCE(eclass->sched_props.timeslice_us, duration);
 
 	return count;
 }
 
+static ssize_t timeslice_duration_max_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;
+
+	if (duration < eclass->sched_props.timeslice_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(duration,
+				     XE_HW_ENGINE_TIMESLICE_MIN,
+				     XE_HW_ENGINE_TIMESLICE_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.timeslice_max, duration);
+
+	return count;
+}
+
+static ssize_t timeslice_duration_max_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_max);
+}
+
+static struct kobj_attribute timeslice_duration_max_attr =
+	__ATTR(timeslice_duration_max, 0644, timeslice_duration_max_show,
+	       timeslice_duration_max_store);
+
+static ssize_t timeslice_duration_min_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;
+
+	if (duration > eclass->sched_props.timeslice_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(duration,
+				     XE_HW_ENGINE_TIMESLICE_MIN,
+				     XE_HW_ENGINE_TIMESLICE_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.timeslice_min, duration);
+
+	return count;
+}
+
+static ssize_t timeslice_duration_min_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_min);
+}
+
+static struct kobj_attribute timeslice_duration_min_attr =
+	__ATTR(timeslice_duration_min, 0644, timeslice_duration_min_show,
+	       timeslice_duration_min_store);
+
 static ssize_t timeslice_duration_show(struct kobject *kobj,
 		struct kobj_attribute *attr, char *buf)
 {
@@ -118,11 +327,40 @@ static ssize_t timeslice_default(struct kobject *kobj,
 static struct kobj_attribute timeslice_duration_def =
 __ATTR(timeslice_duration_us, 0444, timeslice_default, NULL);
 
+static ssize_t timeslice_min_default(struct kobject *kobj,
+				     struct kobj_attribute *attr, char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.timeslice_min);
+}
+
+static struct kobj_attribute timeslice_duration_min_def =
+__ATTR(timeslice_duration_min, 0444, timeslice_min_default, NULL);
+
+static ssize_t timeslice_max_default(struct kobject *kobj,
+				     struct kobj_attribute *attr, char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.timeslice_max);
+}
+
+static struct kobj_attribute timeslice_duration_max_def =
+__ATTR(timeslice_duration_max, 0444, timeslice_max_default, NULL);
+
 static ssize_t preempt_timeout_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);
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	u32 min = XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN;
+	u32 max = XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX;
+#else
+	u32 min = e->hwe->eclass->sched_props.preempt_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.preempt_timeout_max;
+#endif
 	u32 timeout;
 	int err;
 
@@ -130,6 +368,10 @@ static ssize_t preempt_timeout_store(struct kobject *kobj,
 	if (err)
 		return err;
 
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout, min, max))
+		return -EINVAL;
+
 	WRITE_ONCE(eclass->sched_props.preempt_timeout_us, timeout);
 
 	return count;
@@ -158,17 +400,129 @@ static ssize_t preempt_timeout_default(struct kobject *kobj,
 static struct kobj_attribute preempt_timeout_def =
 __ATTR(preempt_timeout_us, 0444, preempt_timeout_default, NULL);
 
+static ssize_t preempt_timeout_min_default(struct kobject *kobj,
+					   struct kobj_attribute *attr,
+					   char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.preempt_timeout_min);
+}
+
+static struct kobj_attribute preempt_timeout_min_def =
+__ATTR(preempt_timeout_min, 0444, preempt_timeout_min_default, NULL);
+
+static ssize_t preempt_timeout_max_default(struct kobject *kobj,
+					   struct kobj_attribute *attr,
+					   char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.preempt_timeout_max);
+}
+
+static struct kobj_attribute preempt_timeout_max_def =
+__ATTR(preempt_timeout_max, 0444, preempt_timeout_max_default, NULL);
+
+static ssize_t preempt_timeout_max_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
+		return err;
+
+	if (timeout < eclass->sched_props.preempt_timeout_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+				     XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN,
+				     XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.preempt_timeout_max, timeout);
+
+	return count;
+}
+
+static ssize_t preempt_timeout_max_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.preempt_timeout_max);
+}
+
+static struct kobj_attribute preempt_timeout_max_attr =
+	__ATTR(preempt_timeout_max, 0644, preempt_timeout_max_show,
+	       preempt_timeout_max_store);
+
+static ssize_t preempt_timeout_min_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
+		return err;
+
+	if (timeout > eclass->sched_props.preempt_timeout_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+				     XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN,
+				     XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.preempt_timeout_min, timeout);
+
+	return count;
+}
+
+static ssize_t preempt_timeout_min_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.preempt_timeout_min);
+}
+
+static struct kobj_attribute preempt_timeout_min_attr =
+	__ATTR(preempt_timeout_min, 0644, preempt_timeout_min_show,
+	       preempt_timeout_min_store);
+
 static const struct attribute *defaults[] = {
 	&job_timeout_def.attr,
+	&job_timeout_min_def.attr,
+	&job_timeout_max_def.attr,
 	&timeslice_duration_def.attr,
+	&timeslice_duration_min_def.attr,
+	&timeslice_duration_max_def.attr,
 	&preempt_timeout_def.attr,
+	&preempt_timeout_min_def.attr,
+	&preempt_timeout_max_def.attr,
 	NULL
 };
 
 static const struct attribute *files[] = {
 	&job_timeout_attr.attr,
+	&job_timeout_min_attr.attr,
+	&job_timeout_max_attr.attr,
 	&timeslice_duration_attr.attr,
+	&timeslice_duration_min_attr.attr,
+	&timeslice_duration_max_attr.attr,
 	&preempt_timeout_attr.attr,
+	&preempt_timeout_min_attr.attr,
+	&preempt_timeout_max_attr.attr,
 	NULL
 };
 
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h +2 -1
index 757136614672..2e2ab351a991 100644
@@ -10,6 +10,8 @@
 
 #define MAX_ENGINE_CLASS_NAME_LEN    16
 int xe_hw_engine_class_sysfs_init(struct xe_gt *gt);
+bool enforce_schedule_limit(void);
+bool engine_timeout_in_range(u64 timeout, u64 min, u64 max);
 
 /**
  * struct kobj_eclass - A eclass's kobject struct that connects the kobject and the
--

2.25.1

#16 lore raw

Re: [Intel-xe] [PATCH V9 6/6] drm/xe: Add min/max cap for engine scheduler properties

Quoted 214 lines

-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: Friday, July 28, 2023 10:35 AM
To: Vishwanathapura, Niranjana <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>; intel- [email protected]
Subject: Re: [PATCH V9 6/6] drm/xe: Add min/max cap for engine scheduler properties

Quoted 11 lines · Niranjana Vishwanathapura
Quoted 10 lines · Matthew Brost
Quoted 9 lines · Tejas Upadhyay

Add sysfs entries for the min, max, and defaults for each of engine scheduler controls for every hardware engine class.

Non-elevated user IOCTLs to set these controls must be within the min-max ranges of the sysfs entries, elevated user can set these controls to any value. However, introduced compile time CONFIG min-max values which restricts elevated user to be in compile time min-max range if at all sysfs min/max are violated.

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Sysfs entries examples are,
DUT# cat /sys/class/drm/cardX/device/tileN/gtN/engines/ccs/.defaults/
job_timeout_max job_timeout_ms preempt_timeout_min

timeslice_duration_max timeslice_duration_us

Quoted 1 line
Quoted 1 line
Quoted 1 line

job_timeout_min preempt_timeout_max preempt_timeout_us

timeslice_duration_min

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

DUT# cat /sys/class/drm/card1/device/tileN/gtN/engines/ccs/
.defaults/ job_timeout_min preempt_timeout_max

preempt_timeout_us timeslice_duration_min

Quoted 1 line
Quoted 1 line
Quoted 1 line

job_timeout_max job_timeout_ms preempt_timeout_min

timeslice_duration_max timeslice_duration_us

Quoted 30 lines
Quoted 30 lines
Quoted 30 lines

V9 :
- Rebase to use s/xe_engine/xe_hw_engine/ - Matt
V8 :
- fix enforce_sched_limit and avoid code duplication - Niranjana
- Make sure min < max - Niranjana
V7 :
- Rebase to replace hw engine with eclass interface
- return EINVAL in place of EPERM
- Use some APIs to avoid code duplication
V6 :
- Rebase changes to reflect per engine class props interface - MattB
- Use #if ENABLED - MattB
- Remove MAX_SCHED_TIMEOUT check as range validation is enough
V5 :
- Rebase to resolve conflicts - CI
V4 :
- Rebase
- Update commit to reflect tile addition
- Use XE_HW macro directly as they are already filtered for CONFIG checks - Niranjana
- Add CONFIG for enable/disable min/max limitation
on elevated user. Default is enable - Matt/Joonas
V3 :
- Resolve CI hooks warning for kernel-doc
V2 :
- Restric min/max setting to #define default min/max for elevated user - Himal
- Remove unrelated changes from patch - Niranjana

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
---
 drivers/gpu/drm/xe/Kconfig                    |   6 +
 drivers/gpu/drm/xe/Kconfig.profile            |  46 +++
 drivers/gpu/drm/xe/xe_engine.c                |  25 +-
 drivers/gpu/drm/xe/xe_hw_engine.c             |   8 +
 drivers/gpu/drm/xe/xe_hw_engine.h             |  31 ++
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 354

++++++++++++++++++

Quoted 78 lines
Quoted 78 lines
Quoted 78 lines
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h |   2 +
 7 files changed, 466 insertions(+), 6 deletions(-)  create mode

100644 drivers/gpu/drm/xe/Kconfig.profile

(quoted diff) +0 -0

b/drivers/gpu/drm/xe/Kconfig index d44794f99338..0a4ea965645b 100644

drivers/gpu/drm/xe/Kconfig +0 -0
@@ -83,3 +83,9 @@ depends on DRM_XE  depends on EXPERT  source

"drivers/gpu/drm/xe/Kconfig.debug"
endmenu

drivers/gpu/drm/xe/Kconfig +6 -0
+
+menu "drm/xe Profile Guided Optimisation"
+	visible if EXPERT
+	depends on DRM_XE
+	source "drivers/gpu/drm/xe/Kconfig.profile"
+endmenu
drivers/gpu/drm/xe/Kconfig.profile new file +46 -0
new file mode 100644
index 000000000000..e72f15ec4bf6
@@ -0,0 +1,46 @@
+config DRM_XE_JOB_TIMEOUT_MAX
+       int "Default max job timeout (ms)"
+       default 10000 # milliseconds
+       help
+         Configures the default max job timeout after which job will
+         be forcefully taken away from scheduler.
+config DRM_XE_JOB_TIMEOUT_MIN
+       int "Default max job timeout (ms)"
+       default 1 # milliseconds
+       help
+         Configures the default min job timeout after which job will
+         be forcefully taken away from scheduler.
+config DRM_XE_TIMESLICE_MAX
+       int "Default max timeslice duration (us)"
+       default 10000000 # microseconds
+       help
+         Configures the default max timeslice duration between multiple
+         contexts by guc scheduling.
+config DRM_XE_TIMESLICE_MIN
+       int "Default min timeslice duration (us)"
+       default 1 # microseconds
+       help
+         Configures the default min timeslice duration between multiple
+         contexts by guc scheduling.
+config DRM_XE_PREEMPT_TIMEOUT_MAX
+       int "Default max  preempt timeout (us)"
+       default 10000000 # microseconds
+       help
+         Configures the default max preempt timeout after which context
+         will be forcefully taken away and higher priority context will
+         run.
+config DRM_XE_PREEMPT_TIMEOUT_MIN
+       int "Default min  preempt timeout (us)"
+       default 1 # microseconds
+       help
+         Configures the default min preempt timeout after which context
+         will be forcefully taken away and higher priority context will
+         run.
+config DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT
+       bool "Default configuration of limitation on scheduler timeout"
+       default y
+       help
+	 Configures the enablement of limitation on scheduler timeout
+	 to apply to applicable user. For elevated user, all above MIN
+	 and MAX values will apply when this configuration is enable to
+	 apply limitation. By default limitation is applied.
(quoted diff) +0 -0

b/drivers/gpu/drm/xe/xe_engine.c index 9e167b113963..d934196eb79f 100644

drivers/gpu/drm/xe/xe_engine.c +0 -0
@@ -13,6 +13,7 @@
 
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/xe/xe_engine.c +1 -0
 #include "xe_device.h"
 #include "xe_gt.h"
+#include "xe_hw_engine_class_sysfs.h"
 #include "xe_hw_fence.h"
 #include "xe_lrc.h"
 #include "xe_macros.h"
@@ -191,8 +192,12 @@ static int engine_set_priority(struct

xe_device *xe, struct xe_engine *e, static int

engine_set_timeslice(struct xe_device *xe, struct xe_engine *e,

Quoted 15 lines
Quoted 15 lines

drivers/gpu/drm/xe/xe_engine.c static int engine_set_priority(struct xe_device *xe, struct xe_engine *e, · line 196

Quoted 6 lines
drivers/gpu/drm/xe/xe_engine.c +2 -2
 				u64 value, bool create)
 {
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	u32 min = e->hwe->eclass->sched_props.timeslice_min;
+	u32 max = e->hwe->eclass->sched_props.timeslice_max;

So I screwed this up in my last comment, sorry.

min = cap_nice ? KConfig option for min :
e->hwe->eclass->sched_props.timeslice_min;
same logic for max;

Probably add helper for this.

Quoted 7 lines
Quoted 7 lines

drivers/gpu/drm/xe/xe_engine.c static int engine_set_priority(struct xe_device *xe, struct xe_engine *e, · line 199

Quoted 3 lines
drivers/gpu/drm/xe/xe_engine.c +3 -0
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))

Then I think logic works too...

if cap nice && !Kconfig option to enfore limits (enforce_schedule_limit

returns false):

Quoted 10 lines
Quoted 8 lines

user can do whatever
else if cap nice
user within Kconfig range
else
user within sysfs range

This is what we want in the end.

Matt, I think this is exactly what the previous revision of the patch was

doing.

Quoted 1 line

No... Previous version

min = Kconfig option to enfore limits ? KConfig option for min : e->hwe-

Quoted 1 line

eclass->sched_props.timeslice_min

same for max

Results in:

if cap nice && !Kconfig option to enfore limits (enforce_schedule_limit returns false):
user can do whatever
else if cap_nice || Kconfig option to enfore limit
user within Kconfig range
else
user within sysfs range

Quoted 3 lines

!cap_nice && Kconfig option to enfore limits == user within Kconfig range (previously) !cap_nice && Kconfig option to enfore limits == user within sysfs range (my suggestion)

In previous version we can achieve it by just adding one below check right? #if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT) && cap_nice
+ u32 min = XE_HW_ENGINE_TIMESLICE_MIN;
+ u32 max = XE_HW_ENGINE_TIMESLICE_MAX;
+#else
+ u32 min = e->hwe->eclass->sched_props.timeslice_min;
+ u32 max = e->hwe->eclass->sched_props.timeslice_max;
+#endif

Please let me know!

Quoted 596 lines

The logic is different and I believe we want what I'm suggesting.

Matt

Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
drivers/gpu/drm/xe/xe_engine.c +1 -0
+		return -EINVAL;
 
 	return e->ops->set_timeslice(e, value);  } @@ -201,8 +206,12 @@

static int engine_set_preemption_timeout(struct xe_device *xe,

drivers/gpu/drm/xe/xe_engine.c +6 -2
 					 struct xe_engine *e, u64 value,
 					 bool create)
 {
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	u32 min = e->hwe->eclass->sched_props.preempt_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.preempt_timeout_max;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))
+		return -EINVAL;
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

return e->ops->set_preempt_timeout(e, value); } @@ -266,11
+275,15 @@ static int engine_set_persistence(struct xe_device *xe, struct xe_engine *e, static int engine_set_job_timeout(struct xe_device

*xe, struct xe_engine *e,

Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
drivers/gpu/drm/xe/xe_engine.c +6 -2
 				  u64 value, bool create)
 {
+	u32 min = e->hwe->eclass->sched_props.job_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.job_timeout_max;
+
 	if (XE_IOCTL_DBG(xe, !create))
 		return -EINVAL;
 
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))
+		return -EINVAL;
 
 	return e->ops->set_job_timeout(e, value);  } diff --git

a/drivers/gpu/drm/xe/xe_hw_engine.c
b/drivers/gpu/drm/xe/xe_hw_engine.c
index afa7d25c3852..e601bffe3b13 100644

drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
@@ -364,8 +364,16 @@ static void hw_engine_init_early(struct xe_gt
 *gt, struct xe_hw_engine *hwe,
 
Quoted 2 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct xe_gt · line 367

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
 	if (!gt->eclass[hwe->class].sched_props.job_timeout_ms) {
 		gt->eclass[hwe->class].sched_props.job_timeout_ms = HZ *

5;

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct xe_gt · line 368

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+		gt->eclass[hwe->class].sched_props.job_timeout_min =

XE_HW_ENGINE_JOB_TIMEOUT_MIN;

Quoted 4 lines
Quoted 4 lines

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct xe_gt · line 372

Quoted 4 lines
drivers/gpu/drm/xe/xe_hw_engine.c +3 -0
+		gt->eclass[hwe->class].sched_props.job_timeout_max =
+XE_HW_ENGINE_JOB_TIMEOUT_MAX;
 		gt->eclass[hwe->class].sched_props.timeslice_us = 1 * 1000;
+		gt->eclass[hwe->class].sched_props.timeslice_min =

XE_HW_ENGINE_TIMESLICE_MIN;

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct xe_gt · line 375

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine.c +2 -0
+		gt->eclass[hwe->class].sched_props.timeslice_max =
+XE_HW_ENGINE_TIMESLICE_MAX;
 		gt->eclass[hwe->class].sched_props.preempt_timeout_us =

640 *

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct xe_gt · line 378

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine.c +2 -0
 1000;
+		gt->eclass[hwe->class].sched_props.preempt_timeout_min =
+
	XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN;
Quoted 2 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct xe_gt

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.c +2 -0
+		gt->eclass[hwe->class].sched_props.preempt_timeout_max =
+
	XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX;
Quoted 11 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.c

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
 		/* Record default props */
 		gt->eclass[hwe->class].defaults = gt->eclass[hwe-

class].sched_props;

Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
 	}
drivers/gpu/drm/xe/xe_hw_engine.h +0 -0
index 7eca9d53c7b1..3d37d6d44261 100644
@@ -10,6 +10,37 @@
 
Quoted 4 lines
Quoted 4 lines

drivers/gpu/drm/xe/xe_hw_engine.h

Quoted 4 lines
drivers/gpu/drm/xe/xe_hw_engine.h +2 -0
 struct drm_printer;
 
+#ifdef CONFIG_DRM_XE_JOB_TIMEOUT_MIN #define
+XE_HW_ENGINE_JOB_TIMEOUT_MIN

CONFIG_DRM_XE_JOB_TIMEOUT_MIN #else

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine.h line 17

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine.h +3 -0
+#define XE_HW_ENGINE_JOB_TIMEOUT_MIN 1 #endif #ifdef
+CONFIG_DRM_XE_JOB_TIMEOUT_MAX #define
+XE_HW_ENGINE_JOB_TIMEOUT_MAX

CONFIG_DRM_XE_JOB_TIMEOUT_MAX #else

Quoted 2 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.h line 19

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.h +2 -0
+#define XE_HW_ENGINE_JOB_TIMEOUT_MAX (10 * 1000) #endif #ifdef
+CONFIG_DRM_XE_TIMESLICE_MIN #define

XE_HW_ENGINE_TIMESLICE_MIN

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine.h line 22

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine.h +3 -0
+CONFIG_DRM_XE_TIMESLICE_MIN #else #define
+XE_HW_ENGINE_TIMESLICE_MIN 1 #endif #ifdef
+CONFIG_DRM_XE_TIMESLICE_MAX #define

XE_HW_ENGINE_TIMESLICE_MAX

Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
drivers/gpu/drm/xe/xe_hw_engine.h +11 -0
+CONFIG_DRM_XE_TIMESLICE_MAX #else #define
+XE_HW_ENGINE_TIMESLICE_MAX (10 * 1000 * 1000) #endif #ifdef
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MIN
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MIN #else #define
+XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN 1 #endif #ifdef
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MAX
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MAX #else #define
+XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX (10 * 1000 * 1000) #endif
+
 int xe_hw_engines_init_early(struct xe_gt *gt);  int

xe_hw_engines_init(struct xe_gt *gt); void xe_hw_engine_handle_irq(struct xe_hw_engine *hwe, u16 intr_vec);

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
index 990bb675d1e0..2b7ac4e02db6 100644
@@ -11,6 +11,20 @@
 
 static int xe_add_hw_engine_class_defaults(struct kobject
 *parent);
 
Quoted 14 lines
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +6 -0
+bool enforce_schedule_limit(void) { #if
+IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	return true;
+#else
+	return !capable(CAP_SYS_NICE);
+#endif
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+}
+
+bool engine_timeout_in_range(u64 timeout, u64 min, u64 max) {
+	return timeout >= min && timeout <= max; }
+
 static void kobj_xe_hw_engine_release(struct kobject *kobj)  {
 	kfree(kobj);
@@ -39,11 +53,92 @@ kobj_xe_hw_engine_class(struct kobject

*parent, char *name)

Quoted 92 lines
Quoted 82 lines
Quoted 82 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +75 -0
 	return keclass;
 }
 
+static ssize_t job_timeout_max_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
+		return err;
+
+	if (timeout < eclass->sched_props.job_timeout_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+				     XE_HW_ENGINE_JOB_TIMEOUT_MIN,
+				     XE_HW_ENGINE_JOB_TIMEOUT_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.job_timeout_max, timeout);
+
+	return count;
+}
+
+static ssize_t job_timeout_max_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.job_timeout_max);
+}
+
+static struct kobj_attribute job_timeout_max_attr =
+__ATTR(job_timeout_max, 0644, job_timeout_max_show,
+job_timeout_max_store);
+
+static ssize_t job_timeout_min_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
+		return err;
+
+	if (timeout > eclass->sched_props.job_timeout_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+				     XE_HW_ENGINE_JOB_TIMEOUT_MIN,
+				     XE_HW_ENGINE_JOB_TIMEOUT_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.job_timeout_min, timeout);
+
+	return count;
+}
+
+static ssize_t job_timeout_min_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.job_timeout_min);
+}
+
+static struct kobj_attribute job_timeout_min_attr =
+__ATTR(job_timeout_min, 0644, job_timeout_min_show,
+job_timeout_min_store);
+
 static ssize_t job_timeout_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);
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
Quoted 9 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject *parent, char *name) · line 141

Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	u32 min = XE_HW_ENGINE_JOB_TIMEOUT_MIN;
+	u32 max = XE_HW_ENGINE_JOB_TIMEOUT_MAX; #else
+	u32 min = e->hwe->eclass->sched_props.job_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.job_timeout_max;
+#endif

I don't think we need this, just make sure default is within min / max of the sched_props.

Quoted 3 lines

Shouldn't the sched_prop set through sysfs here which applies to all future user engines (xe_engine) has the same requirement as the sched_prop set directly to user engine (xe_engine) through set_properly

ioctl?

Quoted 11 lines

ie., shoudln't the requirement be same in job_timeout_store() and engine_set_job_timeout()?

Niranjana

Quoted 6 lines

Matt

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t job_timeout_store(struct kobject

Quoted 4 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
 	u32 timeout;
 	int err;
 
@@ -51,6 +146,10 @@ static ssize_t job_timeout_store(struct kobject

*kobj,

Quoted 49 lines
Quoted 49 lines
Quoted 49 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +4 -0
 	if (err)
 		return err;
 
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout, min, max))
+		return -EINVAL;
+
 	WRITE_ONCE(eclass->sched_props.job_timeout_ms, timeout);
 
 	return count;
@@ -78,11 +177,40 @@ 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);

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +28 -0
+static ssize_t job_timeout_min_default(struct kobject *kobj,
+				       struct kobj_attribute *attr, char *buf) {
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.job_timeout_min);
+}
+
+static struct kobj_attribute job_timeout_min_def =
+__ATTR(job_timeout_min, 0444, job_timeout_min_default, NULL);
+
+static ssize_t job_timeout_max_default(struct kobject *kobj,
+				       struct kobj_attribute *attr, char *buf) {
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.job_timeout_max);
+}
+
+static struct kobj_attribute job_timeout_max_def =
+__ATTR(job_timeout_max, 0444, job_timeout_max_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);
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	u32 min = XE_HW_ENGINE_TIMESLICE_MIN;
+	u32 max = XE_HW_ENGINE_TIMESLICE_MAX; #else
+	u32 min = e->hwe->eclass->sched_props.timeslice_min;
+	u32 max = e->hwe->eclass->sched_props.timeslice_max;
+#endif
 	u32 duration;
 	int err;
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t timeslice_duration_store(struct

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
@@ -90,11 +218,92 @@ static ssize_t timeslice_duration_store(struct

kobject *kobj,

Quoted 40 lines
Quoted 40 lines
Quoted 40 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +32 -0
 	if (err)
 		return err;
 
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(duration, min, max))
+		return -EINVAL;
+
 	WRITE_ONCE(eclass->sched_props.timeslice_us, duration);
 
 	return count;
 }
 
+static ssize_t timeslice_duration_max_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;
+
+	if (duration < eclass->sched_props.timeslice_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(duration,
+				     XE_HW_ENGINE_TIMESLICE_MIN,
+				     XE_HW_ENGINE_TIMESLICE_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.timeslice_max, duration);
+
+	return count;
+}
+
+static ssize_t timeslice_duration_max_show(struct kobject *kobj,
+					   struct kobj_attribute *attr,
+					   char *buf)
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t timeslice_duration_store(struct kobject *kobj,

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+{
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n", eclass->sched_props.timeslice_max);
+}
+
+static struct kobj_attribute timeslice_duration_max_attr =
+	__ATTR(timeslice_duration_max, 0644,

timeslice_duration_max_show,

Quoted 21 lines
Quoted 21 lines
Quoted 21 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +21 -0
+	       timeslice_duration_max_store);
+
+static ssize_t timeslice_duration_min_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;
+
+	if (duration > eclass->sched_props.timeslice_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(duration,
+				     XE_HW_ENGINE_TIMESLICE_MIN,
+				     XE_HW_ENGINE_TIMESLICE_MAX))
+		return -EINVAL;
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t timeslice_duration_store(struct kobject *kobj,

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+
+	WRITE_ONCE(eclass->sched_props.timeslice_min, duration);
+
+	return count;
+}
+
+static ssize_t timeslice_duration_min_show(struct kobject *kobj,
+					   struct kobj_attribute *attr, char

*buf) {

Quoted 7 lines
Quoted 7 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t timeslice_duration_store(struct kobject *kobj,

Quoted 7 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +7 -0
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n", eclass->sched_props.timeslice_min);
+}
+
+static struct kobj_attribute timeslice_duration_min_attr =
+	__ATTR(timeslice_duration_min, 0644,

timeslice_duration_min_show,

Quoted 43 lines
Quoted 43 lines
Quoted 43 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +2 -0
+	       timeslice_duration_min_store);
+
 static ssize_t timeslice_duration_show(struct kobject *kobj,
 		struct kobj_attribute *attr, char *buf)  { @@ -118,11 +327,40

@@ static ssize_t timeslice_default(struct kobject *kobj, static struct kobj_attribute timeslice_duration_def = __ATTR(timeslice_duration_us, 0444, timeslice_default, NULL);

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +28 -0
+static ssize_t timeslice_min_default(struct kobject *kobj,
+				     struct kobj_attribute *attr, char *buf) {
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.timeslice_min); }
+
+static struct kobj_attribute timeslice_duration_min_def =
+__ATTR(timeslice_duration_min, 0444, timeslice_min_default,
+NULL);
+
+static ssize_t timeslice_max_default(struct kobject *kobj,
+				     struct kobj_attribute *attr, char *buf) {
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.timeslice_max); }
+
+static struct kobj_attribute timeslice_duration_max_def =
+__ATTR(timeslice_duration_max, 0444, timeslice_max_default,
+NULL);
+
 static ssize_t preempt_timeout_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);
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	u32 min = XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN;
+	u32 max = XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX; #else
+	u32 min = e->hwe->eclass->sched_props.preempt_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.preempt_timeout_max;
+#endif
 	u32 timeout;
 	int err;
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_store(struct

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
@@ -130,6 +368,10 @@ static ssize_t preempt_timeout_store(struct

kobject *kobj,

Quoted 35 lines
Quoted 35 lines
Quoted 35 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +4 -0
 	if (err)
 		return err;
 
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout, min, max))
+		return -EINVAL;
+
 	WRITE_ONCE(eclass->sched_props.preempt_timeout_us, timeout);
 
 	return count;
@@ -158,17 +400,129 @@ static ssize_t

preempt_timeout_default(struct kobject *kobj, static struct kobj_attribute preempt_timeout_def = __ATTR(preempt_timeout_us, 0444, preempt_timeout_default, NULL);

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +20 -0
+static ssize_t preempt_timeout_min_default(struct kobject *kobj,
+					   struct kobj_attribute *attr,
+					   char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n",
+eclass->defaults.preempt_timeout_min);
+}
+
+static struct kobj_attribute preempt_timeout_min_def =
+__ATTR(preempt_timeout_min, 0444, preempt_timeout_min_default,
+NULL);
+
+static ssize_t preempt_timeout_max_default(struct kobject *kobj,
+					   struct kobj_attribute *attr,
+					   char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass =
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_default(struct kobject *kobj,

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n",
+eclass->defaults.preempt_timeout_max);
+}
+
+static struct kobj_attribute preempt_timeout_max_def =
+__ATTR(preempt_timeout_max, 0444,

preempt_timeout_max_default,

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +11 -0
+NULL);
+
+static ssize_t preempt_timeout_max_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_default(struct kobject *kobj, · line 447

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+		return err;
+
+	if (timeout < eclass->sched_props.preempt_timeout_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+

XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN,

Quoted 1 line
Quoted 1 line
Quoted 1 line

+

XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX))

Quoted 9 lines
Quoted 9 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_default(struct kobject *kobj, · line 454

Quoted 9 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +9 -0
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.preempt_timeout_max, timeout);
+
+	return count;
+}
+
+static ssize_t preempt_timeout_max_show(struct kobject *kobj,
+					struct kobj_attribute *attr, char *buf)

{

Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +19 -0
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n",
+eclass->sched_props.preempt_timeout_max);
+}
+
+static struct kobj_attribute preempt_timeout_max_attr =
+	__ATTR(preempt_timeout_max, 0644, preempt_timeout_max_show,
+	       preempt_timeout_max_store);
+
+static ssize_t preempt_timeout_min_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_default(struct kobject *kobj, · line 485

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+		return err;
+
+	if (timeout > eclass->sched_props.preempt_timeout_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+

XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN,

Quoted 1 line
Quoted 1 line
Quoted 1 line

+

XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX))

Quoted 9 lines
Quoted 9 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_default(struct kobject *kobj, · line 492

Quoted 9 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +9 -0
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.preempt_timeout_min, timeout);
+
+	return count;
+}
+
+static ssize_t preempt_timeout_min_show(struct kobject *kobj,
+					struct kobj_attribute *attr, char *buf)

{

Quoted 54 lines
Quoted 54 lines
Quoted 54 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +22 -0
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n",
+eclass->sched_props.preempt_timeout_min);
+}
+
+static struct kobj_attribute preempt_timeout_min_attr =
+	__ATTR(preempt_timeout_min, 0644, preempt_timeout_min_show,
+	       preempt_timeout_min_store);
+
 static const struct attribute *defaults[] = {
 	&job_timeout_def.attr,
+	&job_timeout_min_def.attr,
+	&job_timeout_max_def.attr,
 	&timeslice_duration_def.attr,
+	&timeslice_duration_min_def.attr,
+	&timeslice_duration_max_def.attr,
 	&preempt_timeout_def.attr,
+	&preempt_timeout_min_def.attr,
+	&preempt_timeout_max_def.attr,
 	NULL
 };
 
 static const struct attribute *files[] = {
 	&job_timeout_attr.attr,
+	&job_timeout_min_attr.attr,
+	&job_timeout_max_attr.attr,
 	&timeslice_duration_attr.attr,
+	&timeslice_duration_min_attr.attr,
+	&timeslice_duration_max_attr.attr,
 	&preempt_timeout_attr.attr,
+	&preempt_timeout_min_attr.attr,
+	&preempt_timeout_max_attr.attr,
 	NULL
 };
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h +2 -0
index 757136614672..2e2ab351a991 100644
@@ -10,6 +10,8 @@
 
 #define MAX_ENGINE_CLASS_NAME_LEN    16
 int xe_hw_engine_class_sysfs_init(struct xe_gt *gt);
+bool enforce_schedule_limit(void); bool
+engine_timeout_in_range(u64 timeout, u64 min, u64 max);
 
 /**
  * struct kobj_eclass - A eclass's kobject struct that connects

the kobject and the
--
2.25.1

#17 lore raw

Re: [Intel-xe] [PATCH V9 6/6] drm/xe: Add min/max cap for engine scheduler properties

Quoted 227 lines · Tejas
Quoted 214 lines

-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: Friday, July 28, 2023 10:35 AM
To: Vishwanathapura, Niranjana <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>; intel- [email protected]
Subject: Re: [PATCH V9 6/6] drm/xe: Add min/max cap for engine scheduler properties

Quoted 11 lines · Niranjana Vishwanathapura
Quoted 10 lines · Matthew Brost
Quoted 9 lines · Tejas Upadhyay

Add sysfs entries for the min, max, and defaults for each of engine scheduler controls for every hardware engine class.

Non-elevated user IOCTLs to set these controls must be within the min-max ranges of the sysfs entries, elevated user can set these controls to any value. However, introduced compile time CONFIG min-max values which restricts elevated user to be in compile time min-max range if at all sysfs min/max are violated.

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Sysfs entries examples are,
DUT# cat /sys/class/drm/cardX/device/tileN/gtN/engines/ccs/.defaults/
job_timeout_max job_timeout_ms preempt_timeout_min

timeslice_duration_max timeslice_duration_us

Quoted 1 line
Quoted 1 line
Quoted 1 line

job_timeout_min preempt_timeout_max preempt_timeout_us

timeslice_duration_min

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

DUT# cat /sys/class/drm/card1/device/tileN/gtN/engines/ccs/
.defaults/ job_timeout_min preempt_timeout_max

preempt_timeout_us timeslice_duration_min

Quoted 1 line
Quoted 1 line
Quoted 1 line

job_timeout_max job_timeout_ms preempt_timeout_min

timeslice_duration_max timeslice_duration_us

Quoted 30 lines
Quoted 30 lines
Quoted 30 lines

V9 :
- Rebase to use s/xe_engine/xe_hw_engine/ - Matt
V8 :
- fix enforce_sched_limit and avoid code duplication - Niranjana
- Make sure min < max - Niranjana
V7 :
- Rebase to replace hw engine with eclass interface
- return EINVAL in place of EPERM
- Use some APIs to avoid code duplication
V6 :
- Rebase changes to reflect per engine class props interface - MattB
- Use #if ENABLED - MattB
- Remove MAX_SCHED_TIMEOUT check as range validation is enough
V5 :
- Rebase to resolve conflicts - CI
V4 :
- Rebase
- Update commit to reflect tile addition
- Use XE_HW macro directly as they are already filtered for CONFIG checks - Niranjana
- Add CONFIG for enable/disable min/max limitation
on elevated user. Default is enable - Matt/Joonas
V3 :
- Resolve CI hooks warning for kernel-doc
V2 :
- Restric min/max setting to #define default min/max for elevated user - Himal
- Remove unrelated changes from patch - Niranjana

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
---
 drivers/gpu/drm/xe/Kconfig                    |   6 +
 drivers/gpu/drm/xe/Kconfig.profile            |  46 +++
 drivers/gpu/drm/xe/xe_engine.c                |  25 +-
 drivers/gpu/drm/xe/xe_hw_engine.c             |   8 +
 drivers/gpu/drm/xe/xe_hw_engine.h             |  31 ++
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 354

++++++++++++++++++

Quoted 78 lines
Quoted 78 lines
Quoted 78 lines
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h |   2 +
 7 files changed, 466 insertions(+), 6 deletions(-)  create mode

100644 drivers/gpu/drm/xe/Kconfig.profile

(quoted diff) +0 -0

b/drivers/gpu/drm/xe/Kconfig index d44794f99338..0a4ea965645b 100644

drivers/gpu/drm/xe/Kconfig +0 -0
@@ -83,3 +83,9 @@ depends on DRM_XE  depends on EXPERT  source

"drivers/gpu/drm/xe/Kconfig.debug"
endmenu

drivers/gpu/drm/xe/Kconfig +6 -0
+
+menu "drm/xe Profile Guided Optimisation"
+	visible if EXPERT
+	depends on DRM_XE
+	source "drivers/gpu/drm/xe/Kconfig.profile"
+endmenu
drivers/gpu/drm/xe/Kconfig.profile new file +46 -0
new file mode 100644
index 000000000000..e72f15ec4bf6
@@ -0,0 +1,46 @@
+config DRM_XE_JOB_TIMEOUT_MAX
+       int "Default max job timeout (ms)"
+       default 10000 # milliseconds
+       help
+         Configures the default max job timeout after which job will
+         be forcefully taken away from scheduler.
+config DRM_XE_JOB_TIMEOUT_MIN
+       int "Default max job timeout (ms)"
+       default 1 # milliseconds
+       help
+         Configures the default min job timeout after which job will
+         be forcefully taken away from scheduler.
+config DRM_XE_TIMESLICE_MAX
+       int "Default max timeslice duration (us)"
+       default 10000000 # microseconds
+       help
+         Configures the default max timeslice duration between multiple
+         contexts by guc scheduling.
+config DRM_XE_TIMESLICE_MIN
+       int "Default min timeslice duration (us)"
+       default 1 # microseconds
+       help
+         Configures the default min timeslice duration between multiple
+         contexts by guc scheduling.
+config DRM_XE_PREEMPT_TIMEOUT_MAX
+       int "Default max  preempt timeout (us)"
+       default 10000000 # microseconds
+       help
+         Configures the default max preempt timeout after which context
+         will be forcefully taken away and higher priority context will
+         run.
+config DRM_XE_PREEMPT_TIMEOUT_MIN
+       int "Default min  preempt timeout (us)"
+       default 1 # microseconds
+       help
+         Configures the default min preempt timeout after which context
+         will be forcefully taken away and higher priority context will
+         run.
+config DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT
+       bool "Default configuration of limitation on scheduler timeout"
+       default y
+       help
+	 Configures the enablement of limitation on scheduler timeout
+	 to apply to applicable user. For elevated user, all above MIN
+	 and MAX values will apply when this configuration is enable to
+	 apply limitation. By default limitation is applied.
(quoted diff) +0 -0

b/drivers/gpu/drm/xe/xe_engine.c index 9e167b113963..d934196eb79f 100644

drivers/gpu/drm/xe/xe_engine.c +0 -0
@@ -13,6 +13,7 @@
 
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/xe/xe_engine.c +1 -0
 #include "xe_device.h"
 #include "xe_gt.h"
+#include "xe_hw_engine_class_sysfs.h"
 #include "xe_hw_fence.h"
 #include "xe_lrc.h"
 #include "xe_macros.h"
@@ -191,8 +192,12 @@ static int engine_set_priority(struct

xe_device *xe, struct xe_engine *e, static int

engine_set_timeslice(struct xe_device *xe, struct xe_engine *e,

Quoted 15 lines
Quoted 15 lines

drivers/gpu/drm/xe/xe_engine.c static int engine_set_priority(struct xe_device *xe, struct xe_engine *e, · line 196

Quoted 6 lines
drivers/gpu/drm/xe/xe_engine.c +2 -2
 				u64 value, bool create)
 {
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	u32 min = e->hwe->eclass->sched_props.timeslice_min;
+	u32 max = e->hwe->eclass->sched_props.timeslice_max;

So I screwed this up in my last comment, sorry.

min = cap_nice ? KConfig option for min :
e->hwe->eclass->sched_props.timeslice_min;
same logic for max;

Probably add helper for this.

Quoted 7 lines
Quoted 7 lines

drivers/gpu/drm/xe/xe_engine.c static int engine_set_priority(struct xe_device *xe, struct xe_engine *e, · line 199

Quoted 3 lines
drivers/gpu/drm/xe/xe_engine.c +3 -0
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))

Then I think logic works too...

if cap nice && !Kconfig option to enfore limits (enforce_schedule_limit

returns false):

Quoted 10 lines
Quoted 8 lines

user can do whatever
else if cap nice
user within Kconfig range
else
user within sysfs range

This is what we want in the end.

Matt, I think this is exactly what the previous revision of the patch was

doing.

Quoted 1 line

No... Previous version

min = Kconfig option to enfore limits ? KConfig option for min : e->hwe-

Quoted 1 line

eclass->sched_props.timeslice_min

same for max

Results in:

if cap nice && !Kconfig option to enfore limits (enforce_schedule_limit returns false):
user can do whatever
else if cap_nice || Kconfig option to enfore limit
user within Kconfig range
else
user within sysfs range

Quoted 3 lines

!cap_nice && Kconfig option to enfore limits == user within Kconfig range (previously) !cap_nice && Kconfig option to enfore limits == user within sysfs range (my suggestion)

In previous version we can achieve it by just adding one below check right? #if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT) && cap_nice

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +6 -0
+       u32 min = XE_HW_ENGINE_TIMESLICE_MIN;
+       u32 max = XE_HW_ENGINE_TIMESLICE_MAX;
+#else
+       u32 min = e->hwe->eclass->sched_props.timeslice_min;
+       u32 max = e->hwe->eclass->sched_props.timeslice_max;
+#endif
Quoted 2 lines

Please let me know!

Ah I see. Yah, it is a limits selection issue.
We can do,

u32 min = e->hwe->eclass->sched_props.timeslice_min; u32 max = e->hwe->eclass->sched_props.timeslice_max;

#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
        if (cap_nice) {
                u32 min = XE_HW_ENGINE_TIMESLICE_MIN;
                u32 max = XE_HW_ENGINE_TIMESLICE_MAX;
        }

#endif

Matt, Tejas
Also, looks like you missed my another comment below.

Niranjana

Quoted 596 lines
Quoted 596 lines

The logic is different and I believe we want what I'm suggesting.

Matt

Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
drivers/gpu/drm/xe/xe_engine.c +1 -0
+		return -EINVAL;
 
 	return e->ops->set_timeslice(e, value);  } @@ -201,8 +206,12 @@

static int engine_set_preemption_timeout(struct xe_device *xe,

drivers/gpu/drm/xe/xe_engine.c +6 -2
 					 struct xe_engine *e, u64 value,
 					 bool create)
 {
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	u32 min = e->hwe->eclass->sched_props.preempt_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.preempt_timeout_max;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))
+		return -EINVAL;
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

return e->ops->set_preempt_timeout(e, value); } @@ -266,11
+275,15 @@ static int engine_set_persistence(struct xe_device *xe, struct xe_engine *e, static int engine_set_job_timeout(struct xe_device

*xe, struct xe_engine *e,

Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
drivers/gpu/drm/xe/xe_engine.c +6 -2
 				  u64 value, bool create)
 {
+	u32 min = e->hwe->eclass->sched_props.job_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.job_timeout_max;
+
 	if (XE_IOCTL_DBG(xe, !create))
 		return -EINVAL;
 
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))
+		return -EINVAL;
 
 	return e->ops->set_job_timeout(e, value);  } diff --git

a/drivers/gpu/drm/xe/xe_hw_engine.c
b/drivers/gpu/drm/xe/xe_hw_engine.c
index afa7d25c3852..e601bffe3b13 100644

drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
@@ -364,8 +364,16 @@ static void hw_engine_init_early(struct xe_gt
 *gt, struct xe_hw_engine *hwe,
 
Quoted 2 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct xe_gt · line 367

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
 	if (!gt->eclass[hwe->class].sched_props.job_timeout_ms) {
 		gt->eclass[hwe->class].sched_props.job_timeout_ms = HZ *

5;

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct xe_gt · line 368

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+		gt->eclass[hwe->class].sched_props.job_timeout_min =

XE_HW_ENGINE_JOB_TIMEOUT_MIN;

Quoted 4 lines
Quoted 4 lines

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct xe_gt · line 372

Quoted 4 lines
drivers/gpu/drm/xe/xe_hw_engine.c +3 -0
+		gt->eclass[hwe->class].sched_props.job_timeout_max =
+XE_HW_ENGINE_JOB_TIMEOUT_MAX;
 		gt->eclass[hwe->class].sched_props.timeslice_us = 1 * 1000;
+		gt->eclass[hwe->class].sched_props.timeslice_min =

XE_HW_ENGINE_TIMESLICE_MIN;

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct xe_gt · line 375

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine.c +2 -0
+		gt->eclass[hwe->class].sched_props.timeslice_max =
+XE_HW_ENGINE_TIMESLICE_MAX;
 		gt->eclass[hwe->class].sched_props.preempt_timeout_us =

640 *

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct xe_gt · line 378

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine.c +2 -0
 1000;
+		gt->eclass[hwe->class].sched_props.preempt_timeout_min =
+
	XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN;
Quoted 2 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct xe_gt

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.c +2 -0
+		gt->eclass[hwe->class].sched_props.preempt_timeout_max =
+
	XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX;
Quoted 11 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.c

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
 		/* Record default props */
 		gt->eclass[hwe->class].defaults = gt->eclass[hwe-

class].sched_props;

Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
 	}
drivers/gpu/drm/xe/xe_hw_engine.h +0 -0
index 7eca9d53c7b1..3d37d6d44261 100644
@@ -10,6 +10,37 @@
 
Quoted 4 lines
Quoted 4 lines

drivers/gpu/drm/xe/xe_hw_engine.h

Quoted 4 lines
drivers/gpu/drm/xe/xe_hw_engine.h +2 -0
 struct drm_printer;
 
+#ifdef CONFIG_DRM_XE_JOB_TIMEOUT_MIN #define
+XE_HW_ENGINE_JOB_TIMEOUT_MIN

CONFIG_DRM_XE_JOB_TIMEOUT_MIN #else

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine.h line 17

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine.h +3 -0
+#define XE_HW_ENGINE_JOB_TIMEOUT_MIN 1 #endif #ifdef
+CONFIG_DRM_XE_JOB_TIMEOUT_MAX #define
+XE_HW_ENGINE_JOB_TIMEOUT_MAX

CONFIG_DRM_XE_JOB_TIMEOUT_MAX #else

Quoted 2 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.h line 19

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.h +2 -0
+#define XE_HW_ENGINE_JOB_TIMEOUT_MAX (10 * 1000) #endif #ifdef
+CONFIG_DRM_XE_TIMESLICE_MIN #define

XE_HW_ENGINE_TIMESLICE_MIN

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine.h line 22

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine.h +3 -0
+CONFIG_DRM_XE_TIMESLICE_MIN #else #define
+XE_HW_ENGINE_TIMESLICE_MIN 1 #endif #ifdef
+CONFIG_DRM_XE_TIMESLICE_MAX #define

XE_HW_ENGINE_TIMESLICE_MAX

Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
drivers/gpu/drm/xe/xe_hw_engine.h +11 -0
+CONFIG_DRM_XE_TIMESLICE_MAX #else #define
+XE_HW_ENGINE_TIMESLICE_MAX (10 * 1000 * 1000) #endif #ifdef
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MIN
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MIN #else #define
+XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN 1 #endif #ifdef
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MAX
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MAX #else #define
+XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX (10 * 1000 * 1000) #endif
+
 int xe_hw_engines_init_early(struct xe_gt *gt);  int

xe_hw_engines_init(struct xe_gt *gt); void xe_hw_engine_handle_irq(struct xe_hw_engine *hwe, u16 intr_vec);

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
index 990bb675d1e0..2b7ac4e02db6 100644
@@ -11,6 +11,20 @@
 
 static int xe_add_hw_engine_class_defaults(struct kobject
 *parent);
 
Quoted 14 lines
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +6 -0
+bool enforce_schedule_limit(void) { #if
+IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	return true;
+#else
+	return !capable(CAP_SYS_NICE);
+#endif
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+}
+
+bool engine_timeout_in_range(u64 timeout, u64 min, u64 max) {
+	return timeout >= min && timeout <= max; }
+
 static void kobj_xe_hw_engine_release(struct kobject *kobj)  {
 	kfree(kobj);
@@ -39,11 +53,92 @@ kobj_xe_hw_engine_class(struct kobject

*parent, char *name)

Quoted 92 lines
Quoted 82 lines
Quoted 82 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +75 -0
 	return keclass;
 }
 
+static ssize_t job_timeout_max_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
+		return err;
+
+	if (timeout < eclass->sched_props.job_timeout_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+				     XE_HW_ENGINE_JOB_TIMEOUT_MIN,
+				     XE_HW_ENGINE_JOB_TIMEOUT_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.job_timeout_max, timeout);
+
+	return count;
+}
+
+static ssize_t job_timeout_max_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.job_timeout_max);
+}
+
+static struct kobj_attribute job_timeout_max_attr =
+__ATTR(job_timeout_max, 0644, job_timeout_max_show,
+job_timeout_max_store);
+
+static ssize_t job_timeout_min_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
+		return err;
+
+	if (timeout > eclass->sched_props.job_timeout_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+				     XE_HW_ENGINE_JOB_TIMEOUT_MIN,
+				     XE_HW_ENGINE_JOB_TIMEOUT_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.job_timeout_min, timeout);
+
+	return count;
+}
+
+static ssize_t job_timeout_min_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.job_timeout_min);
+}
+
+static struct kobj_attribute job_timeout_min_attr =
+__ATTR(job_timeout_min, 0644, job_timeout_min_show,
+job_timeout_min_store);
+
 static ssize_t job_timeout_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);
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
Quoted 9 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject *parent, char *name) · line 141

Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	u32 min = XE_HW_ENGINE_JOB_TIMEOUT_MIN;
+	u32 max = XE_HW_ENGINE_JOB_TIMEOUT_MAX; #else
+	u32 min = e->hwe->eclass->sched_props.job_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.job_timeout_max;
+#endif

I don't think we need this, just make sure default is within min / max of the sched_props.

Quoted 3 lines

Shouldn't the sched_prop set through sysfs here which applies to all future user engines (xe_engine) has the same requirement as the sched_prop set directly to user engine (xe_engine) through set_properly

ioctl?

Quoted 11 lines

ie., shoudln't the requirement be same in job_timeout_store() and engine_set_job_timeout()?

Niranjana

Quoted 6 lines

Matt

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t job_timeout_store(struct kobject

Quoted 4 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
 	u32 timeout;
 	int err;
 
@@ -51,6 +146,10 @@ static ssize_t job_timeout_store(struct kobject

*kobj,

Quoted 49 lines
Quoted 49 lines
Quoted 49 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +4 -0
 	if (err)
 		return err;
 
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout, min, max))
+		return -EINVAL;
+
 	WRITE_ONCE(eclass->sched_props.job_timeout_ms, timeout);
 
 	return count;
@@ -78,11 +177,40 @@ 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);

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +28 -0
+static ssize_t job_timeout_min_default(struct kobject *kobj,
+				       struct kobj_attribute *attr, char *buf) {
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.job_timeout_min);
+}
+
+static struct kobj_attribute job_timeout_min_def =
+__ATTR(job_timeout_min, 0444, job_timeout_min_default, NULL);
+
+static ssize_t job_timeout_max_default(struct kobject *kobj,
+				       struct kobj_attribute *attr, char *buf) {
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.job_timeout_max);
+}
+
+static struct kobj_attribute job_timeout_max_def =
+__ATTR(job_timeout_max, 0444, job_timeout_max_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);
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	u32 min = XE_HW_ENGINE_TIMESLICE_MIN;
+	u32 max = XE_HW_ENGINE_TIMESLICE_MAX; #else
+	u32 min = e->hwe->eclass->sched_props.timeslice_min;
+	u32 max = e->hwe->eclass->sched_props.timeslice_max;
+#endif
 	u32 duration;
 	int err;
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t timeslice_duration_store(struct

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
@@ -90,11 +218,92 @@ static ssize_t timeslice_duration_store(struct

kobject *kobj,

Quoted 40 lines
Quoted 40 lines
Quoted 40 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +32 -0
 	if (err)
 		return err;
 
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(duration, min, max))
+		return -EINVAL;
+
 	WRITE_ONCE(eclass->sched_props.timeslice_us, duration);
 
 	return count;
 }
 
+static ssize_t timeslice_duration_max_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;
+
+	if (duration < eclass->sched_props.timeslice_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(duration,
+				     XE_HW_ENGINE_TIMESLICE_MIN,
+				     XE_HW_ENGINE_TIMESLICE_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.timeslice_max, duration);
+
+	return count;
+}
+
+static ssize_t timeslice_duration_max_show(struct kobject *kobj,
+					   struct kobj_attribute *attr,
+					   char *buf)
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t timeslice_duration_store(struct kobject *kobj,

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+{
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n", eclass->sched_props.timeslice_max);
+}
+
+static struct kobj_attribute timeslice_duration_max_attr =
+	__ATTR(timeslice_duration_max, 0644,

timeslice_duration_max_show,

Quoted 21 lines
Quoted 21 lines
Quoted 21 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +21 -0
+	       timeslice_duration_max_store);
+
+static ssize_t timeslice_duration_min_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;
+
+	if (duration > eclass->sched_props.timeslice_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(duration,
+				     XE_HW_ENGINE_TIMESLICE_MIN,
+				     XE_HW_ENGINE_TIMESLICE_MAX))
+		return -EINVAL;
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t timeslice_duration_store(struct kobject *kobj,

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+
+	WRITE_ONCE(eclass->sched_props.timeslice_min, duration);
+
+	return count;
+}
+
+static ssize_t timeslice_duration_min_show(struct kobject *kobj,
+					   struct kobj_attribute *attr, char

*buf) {

Quoted 7 lines
Quoted 7 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t timeslice_duration_store(struct kobject *kobj,

Quoted 7 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +7 -0
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n", eclass->sched_props.timeslice_min);
+}
+
+static struct kobj_attribute timeslice_duration_min_attr =
+	__ATTR(timeslice_duration_min, 0644,

timeslice_duration_min_show,

Quoted 43 lines
Quoted 43 lines
Quoted 43 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +2 -0
+	       timeslice_duration_min_store);
+
 static ssize_t timeslice_duration_show(struct kobject *kobj,
 		struct kobj_attribute *attr, char *buf)  { @@ -118,11 +327,40

@@ static ssize_t timeslice_default(struct kobject *kobj, static struct kobj_attribute timeslice_duration_def = __ATTR(timeslice_duration_us, 0444, timeslice_default, NULL);

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +28 -0
+static ssize_t timeslice_min_default(struct kobject *kobj,
+				     struct kobj_attribute *attr, char *buf) {
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.timeslice_min); }
+
+static struct kobj_attribute timeslice_duration_min_def =
+__ATTR(timeslice_duration_min, 0444, timeslice_min_default,
+NULL);
+
+static ssize_t timeslice_max_default(struct kobject *kobj,
+				     struct kobj_attribute *attr, char *buf) {
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.timeslice_max); }
+
+static struct kobj_attribute timeslice_duration_max_def =
+__ATTR(timeslice_duration_max, 0444, timeslice_max_default,
+NULL);
+
 static ssize_t preempt_timeout_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);
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	u32 min = XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN;
+	u32 max = XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX; #else
+	u32 min = e->hwe->eclass->sched_props.preempt_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.preempt_timeout_max;
+#endif
 	u32 timeout;
 	int err;
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_store(struct

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
@@ -130,6 +368,10 @@ static ssize_t preempt_timeout_store(struct

kobject *kobj,

Quoted 35 lines
Quoted 35 lines
Quoted 35 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +4 -0
 	if (err)
 		return err;
 
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout, min, max))
+		return -EINVAL;
+
 	WRITE_ONCE(eclass->sched_props.preempt_timeout_us, timeout);
 
 	return count;
@@ -158,17 +400,129 @@ static ssize_t

preempt_timeout_default(struct kobject *kobj, static struct kobj_attribute preempt_timeout_def = __ATTR(preempt_timeout_us, 0444, preempt_timeout_default, NULL);

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +20 -0
+static ssize_t preempt_timeout_min_default(struct kobject *kobj,
+					   struct kobj_attribute *attr,
+					   char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n",
+eclass->defaults.preempt_timeout_min);
+}
+
+static struct kobj_attribute preempt_timeout_min_def =
+__ATTR(preempt_timeout_min, 0444, preempt_timeout_min_default,
+NULL);
+
+static ssize_t preempt_timeout_max_default(struct kobject *kobj,
+					   struct kobj_attribute *attr,
+					   char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass =
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_default(struct kobject *kobj,

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n",
+eclass->defaults.preempt_timeout_max);
+}
+
+static struct kobj_attribute preempt_timeout_max_def =
+__ATTR(preempt_timeout_max, 0444,

preempt_timeout_max_default,

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +11 -0
+NULL);
+
+static ssize_t preempt_timeout_max_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_default(struct kobject *kobj, · line 447

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+		return err;
+
+	if (timeout < eclass->sched_props.preempt_timeout_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+

XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN,

Quoted 1 line
Quoted 1 line
Quoted 1 line

+

XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX))

Quoted 9 lines
Quoted 9 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_default(struct kobject *kobj, · line 454

Quoted 9 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +9 -0
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.preempt_timeout_max, timeout);
+
+	return count;
+}
+
+static ssize_t preempt_timeout_max_show(struct kobject *kobj,
+					struct kobj_attribute *attr, char *buf)

{

Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +19 -0
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n",
+eclass->sched_props.preempt_timeout_max);
+}
+
+static struct kobj_attribute preempt_timeout_max_attr =
+	__ATTR(preempt_timeout_max, 0644, preempt_timeout_max_show,
+	       preempt_timeout_max_store);
+
+static ssize_t preempt_timeout_min_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_default(struct kobject *kobj, · line 485

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+		return err;
+
+	if (timeout > eclass->sched_props.preempt_timeout_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+

XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN,

Quoted 1 line
Quoted 1 line
Quoted 1 line

+

XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX))

Quoted 9 lines
Quoted 9 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_default(struct kobject *kobj, · line 492

Quoted 9 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +9 -0
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.preempt_timeout_min, timeout);
+
+	return count;
+}
+
+static ssize_t preempt_timeout_min_show(struct kobject *kobj,
+					struct kobj_attribute *attr, char *buf)

{

Quoted 54 lines
Quoted 54 lines
Quoted 54 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +22 -0
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n",
+eclass->sched_props.preempt_timeout_min);
+}
+
+static struct kobj_attribute preempt_timeout_min_attr =
+	__ATTR(preempt_timeout_min, 0644, preempt_timeout_min_show,
+	       preempt_timeout_min_store);
+
 static const struct attribute *defaults[] = {
 	&job_timeout_def.attr,
+	&job_timeout_min_def.attr,
+	&job_timeout_max_def.attr,
 	&timeslice_duration_def.attr,
+	&timeslice_duration_min_def.attr,
+	&timeslice_duration_max_def.attr,
 	&preempt_timeout_def.attr,
+	&preempt_timeout_min_def.attr,
+	&preempt_timeout_max_def.attr,
 	NULL
 };
 
 static const struct attribute *files[] = {
 	&job_timeout_attr.attr,
+	&job_timeout_min_attr.attr,
+	&job_timeout_max_attr.attr,
 	&timeslice_duration_attr.attr,
+	&timeslice_duration_min_attr.attr,
+	&timeslice_duration_max_attr.attr,
 	&preempt_timeout_attr.attr,
+	&preempt_timeout_min_attr.attr,
+	&preempt_timeout_max_attr.attr,
 	NULL
 };
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h +2 -0
index 757136614672..2e2ab351a991 100644
@@ -10,6 +10,8 @@
 
 #define MAX_ENGINE_CLASS_NAME_LEN    16
 int xe_hw_engine_class_sysfs_init(struct xe_gt *gt);
+bool enforce_schedule_limit(void); bool
+engine_timeout_in_range(u64 timeout, u64 min, u64 max);
 
 /**
  * struct kobj_eclass - A eclass's kobject struct that connects

the kobject and the
--
2.25.1

#18 lore raw

Re: [Intel-xe] [PATCH V9 6/6] drm/xe: Add min/max cap for engine scheduler properties

Quoted 497 lines

-----Original Message-----
From: Vishwanathapura, Niranjana <[email protected]>
Sent: Friday, July 28, 2023 11:56 AM
To: Upadhyay, Tejas <[email protected]>
Cc: Brost, Matthew <[email protected]>; intel- [email protected]
Subject: Re: [PATCH V9 6/6] drm/xe: Add min/max cap for engine scheduler properties

Quoted 6 lines · Tejas
Quoted 6 lines

-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: Friday, July 28, 2023 10:35 AM
To: Vishwanathapura, Niranjana

<[email protected]>

Quoted 12 lines
Quoted 12 lines

Cc: Upadhyay, Tejas <[email protected]>; intel- [email protected]
Subject: Re: [PATCH V9 6/6] drm/xe: Add min/max cap for engine scheduler properties

Quoted 5 lines · Niranjana Vishwanathapura
Quoted 4 lines · Matthew Brost
Quoted 3 lines · Tejas Upadhyay

Add sysfs entries for the min, max, and defaults for each of engine scheduler controls for every hardware engine class.

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

Non-elevated user IOCTLs to set these controls must be within the min-max ranges of the sysfs entries, elevated user can set these controls to any value. However, introduced compile time CONFIG min-max values which restricts elevated user to be in compile time min-max range if at all sysfs min/max are violated.

Sysfs entries examples are,
DUT# cat

/sys/class/drm/cardX/device/tileN/gtN/engines/ccs/.defaults/

Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

job_timeout_max job_timeout_ms preempt_timeout_min

timeslice_duration_max timeslice_duration_us

Quoted 1 line
Quoted 1 line
Quoted 1 line

job_timeout_min preempt_timeout_max

preempt_timeout_us

Quoted 52 lines
Quoted 52 lines

timeslice_duration_min

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

DUT# cat /sys/class/drm/card1/device/tileN/gtN/engines/ccs/
.defaults/ job_timeout_min preempt_timeout_max

preempt_timeout_us timeslice_duration_min

Quoted 1 line
Quoted 1 line
Quoted 1 line

job_timeout_max job_timeout_ms preempt_timeout_min

timeslice_duration_max timeslice_duration_us

Quoted 31 lines
Quoted 31 lines
Quoted 31 lines

V9 :
- Rebase to use s/xe_engine/xe_hw_engine/ - Matt
V8 :
- fix enforce_sched_limit and avoid code duplication - Niranjana
- Make sure min < max - Niranjana
V7 :
- Rebase to replace hw engine with eclass interface
- return EINVAL in place of EPERM
- Use some APIs to avoid code duplication
V6 :
- Rebase changes to reflect per engine class props interface - MattB
- Use #if ENABLED - MattB
- Remove MAX_SCHED_TIMEOUT check as range validation is
enough
V5 :
- Rebase to resolve conflicts - CI
V4 :
- Rebase
- Update commit to reflect tile addition
- Use XE_HW macro directly as they are already filtered for CONFIG checks - Niranjana
- Add CONFIG for enable/disable min/max limitation
on elevated user. Default is enable - Matt/Joonas
V3 :
- Resolve CI hooks warning for kernel-doc
V2 :
- Restric min/max setting to #define default min/max for elevated user - Himal
- Remove unrelated changes from patch - Niranjana

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
---
 drivers/gpu/drm/xe/Kconfig                    |   6 +
 drivers/gpu/drm/xe/Kconfig.profile            |  46 +++
 drivers/gpu/drm/xe/xe_engine.c                |  25 +-
 drivers/gpu/drm/xe/xe_hw_engine.c             |   8 +
 drivers/gpu/drm/xe/xe_hw_engine.h             |  31 ++
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 354

++++++++++++++++++

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h |   2 +
 7 files changed, 466 insertions(+), 6 deletions(-)  create

mode
100644 drivers/gpu/drm/xe/Kconfig.profile

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/xe/Kconfig depends on DRM_XE depends on EXPERT

Quoted 6 lines
(quoted diff) +0 -0

b/drivers/gpu/drm/xe/Kconfig index d44794f99338..0a4ea965645b 100644

drivers/gpu/drm/xe/Kconfig +0 -0
@@ -83,3 +83,9 @@ depends on DRM_XE  depends on EXPERT

source

Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
Quoted 24 lines

"drivers/gpu/drm/xe/Kconfig.debug"
endmenu

drivers/gpu/drm/xe/Kconfig +6 -0
+
+menu "drm/xe Profile Guided Optimisation"
+	visible if EXPERT
+	depends on DRM_XE
+	source "drivers/gpu/drm/xe/Kconfig.profile"
+endmenu
drivers/gpu/drm/xe/Kconfig.profile new file +9 -0
new file mode 100644
index 000000000000..e72f15ec4bf6
@@ -0,0 +1,46 @@
+config DRM_XE_JOB_TIMEOUT_MAX
+       int "Default max job timeout (ms)"
+       default 10000 # milliseconds
+       help
+         Configures the default max job timeout after which job will
+         be forcefully taken away from scheduler.
+config DRM_XE_JOB_TIMEOUT_MIN
+       int "Default max job timeout (ms)"
+       default 1 # milliseconds
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/Kconfig.profile

Quoted 8 lines
drivers/gpu/drm/xe/Kconfig.profile new file +8 -0
+       help
+         Configures the default min job timeout after which job will
+         be forcefully taken away from scheduler.
+config DRM_XE_TIMESLICE_MAX
+       int "Default max timeslice duration (us)"
+       default 10000000 # microseconds
+       help
+         Configures the default max timeslice duration between

multiple

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/xe/Kconfig.profile

Quoted 6 lines
drivers/gpu/drm/xe/Kconfig.profile new file +6 -0
+         contexts by guc scheduling.
+config DRM_XE_TIMESLICE_MIN
+       int "Default min timeslice duration (us)"
+       default 1 # microseconds
+       help
+         Configures the default min timeslice duration between

multiple

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/xe/Kconfig.profile

Quoted 6 lines
drivers/gpu/drm/xe/Kconfig.profile new file +6 -0
+         contexts by guc scheduling.
+config DRM_XE_PREEMPT_TIMEOUT_MAX
+       int "Default max  preempt timeout (us)"
+       default 10000000 # microseconds
+       help
+         Configures the default max preempt timeout after which

context

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

drivers/gpu/drm/xe/Kconfig.profile

Quoted 7 lines
drivers/gpu/drm/xe/Kconfig.profile new file +7 -0
+         will be forcefully taken away and higher priority context will
+         run.
+config DRM_XE_PREEMPT_TIMEOUT_MIN
+       int "Default min  preempt timeout (us)"
+       default 1 # microseconds
+       help
+         Configures the default min preempt timeout after which

context

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

drivers/gpu/drm/xe/Kconfig.profile

Quoted 7 lines
drivers/gpu/drm/xe/Kconfig.profile new file +7 -0
+         will be forcefully taken away and higher priority context will
+         run.
+config DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT
+       bool "Default configuration of limitation on scheduler timeout"
+       default y
+       help
+	 Configures the enablement of limitation on scheduler

timeout

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

drivers/gpu/drm/xe/Kconfig.profile line 45

Quoted 2 lines
drivers/gpu/drm/xe/Kconfig.profile new file +2 -0
+	 to apply to applicable user. For elevated user, all above MIN
+	 and MAX values will apply when this configuration is enable

to

Quoted 73 lines
Quoted 73 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
drivers/gpu/drm/xe/Kconfig.profile new file +1 -0
+	 apply limitation. By default limitation is applied.
(quoted diff) +0 -0

b/drivers/gpu/drm/xe/xe_engine.c index
9e167b113963..d934196eb79f
100644

drivers/gpu/drm/xe/xe_engine.c +0 -0
@@ -13,6 +13,7 @@
 
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/xe/xe_engine.c +1 -0
 #include "xe_device.h"
 #include "xe_gt.h"
+#include "xe_hw_engine_class_sysfs.h"
 #include "xe_hw_fence.h"
 #include "xe_lrc.h"
 #include "xe_macros.h"
@@ -191,8 +192,12 @@ static int engine_set_priority(struct

xe_device *xe, struct xe_engine *e, static int

engine_set_timeslice(struct xe_device *xe, struct xe_engine *e,

Quoted 15 lines
Quoted 15 lines

drivers/gpu/drm/xe/xe_engine.c static int engine_set_priority(struct xe_device *xe, struct xe_engine *e, · line 196

Quoted 6 lines
drivers/gpu/drm/xe/xe_engine.c +2 -2
 				u64 value, bool create)
 {
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	u32 min = e->hwe->eclass->sched_props.timeslice_min;
+	u32 max = e->hwe->eclass->sched_props.timeslice_max;

So I screwed this up in my last comment, sorry.

min = cap_nice ? KConfig option for min :
e->hwe->eclass->sched_props.timeslice_min;
same logic for max;

Probably add helper for this.

Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_engine.c static int engine_set_priority(struct xe_device *xe, struct xe_engine *e, · line 199

Quoted 3 lines
drivers/gpu/drm/xe/xe_engine.c +3 -0
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))

Then I think logic works too...

if cap nice && !Kconfig option to enfore limits
(enforce_schedule_limit

returns false):

Quoted 11 lines
Quoted 8 lines

user can do whatever
else if cap nice
user within Kconfig range
else
user within sysfs range

This is what we want in the end.

Matt, I think this is exactly what the previous revision of the patch was

doing.

Quoted 1 line

No... Previous version

min = Kconfig option to enfore limits ? KConfig option for min :
e->hwe-

Quoted 1 line

eclass->sched_props.timeslice_min

same for max

Results in:

if cap nice && !Kconfig option to enfore limits (enforce_schedule_limit returns false):
user can do whatever
else if cap_nice || Kconfig option to enfore limit
user within Kconfig range
else
user within sysfs range

Quoted 7 lines
Quoted 4 lines

!cap_nice && Kconfig option to enfore limits == user within Kconfig range
(previously) !cap_nice && Kconfig option to enfore limits == user within sysfs range (my suggestion)

In previous version we can achieve it by just adding one below check right? #if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT) &&

cap_nice

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+       u32 min = XE_HW_ENGINE_TIMESLICE_MIN;
+       u32 max = XE_HW_ENGINE_TIMESLICE_MAX; #else
+       u32 min = e->hwe->eclass->sched_props.timeslice_min;
+       u32 max = e->hwe->eclass->sched_props.timeslice_max;
+#endif

Please let me know!

Ah I see. Yah, it is a limits selection issue.
We can do,

u32 min = e->hwe->eclass->sched_props.timeslice_min; u32 max = e->hwe->eclass->sched_props.timeslice_max;

#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
         if (cap_nice) {
                 u32 min = XE_HW_ENGINE_TIMESLICE_MIN;
                 u32 max = XE_HW_ENGINE_TIMESLICE_MAX;
         }

#endif

Matt, Tejas
Also, looks like you missed my another comment below.

Niranjana

Quoted 10 lines
Quoted 10 lines

The logic is different and I believe we want what I'm suggesting.

Matt

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_engine.c +1 -0
+		return -EINVAL;
 
 	return e->ops->set_timeslice(e, value);  } @@ -201,8 +206,12

@@ static int engine_set_preemption_timeout(struct xe_device *xe,
struct xe_engine *e, u64

value,

Quoted 6 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

drivers/gpu/drm/xe/xe_engine.c static int engine_set_preemption_timeout(struct xe_device *xe,

Quoted 5 lines
drivers/gpu/drm/xe/xe_engine.c +1 -2
 					 bool create)
 {
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	u32 min = e->hwe->eclass-

sched_props.preempt_timeout_min;

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_engine.c

Quoted 1 line
drivers/gpu/drm/xe/xe_engine.c +1 -0
+	u32 max = e->hwe->eclass-

sched_props.preempt_timeout_max;

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/xe/xe_engine.c static int engine_set_priority(struct xe_device *xe, struct xe_engine *e,

Quoted 6 lines
drivers/gpu/drm/xe/xe_engine.c +4 -0
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))
+		return -EINVAL;
 
 	return e->ops->set_preempt_timeout(e, value);  } @@ -

266,11

Quoted 28 lines
Quoted 28 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

+275,15 @@ static int engine_set_persistence(struct xe_device +*xe,
struct xe_engine *e, static int engine_set_job_timeout(struct xe_device

*xe, struct xe_engine *e,

Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
drivers/gpu/drm/xe/xe_engine.c +6 -2
 				  u64 value, bool create)
 {
+	u32 min = e->hwe->eclass->sched_props.job_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.job_timeout_max;
+
 	if (XE_IOCTL_DBG(xe, !create))
 		return -EINVAL;
 
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))
+		return -EINVAL;
 
 	return e->ops->set_job_timeout(e, value);  } diff --git

a/drivers/gpu/drm/xe/xe_hw_engine.c
b/drivers/gpu/drm/xe/xe_hw_engine.c
index afa7d25c3852..e601bffe3b13 100644

drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
@@ -364,8 +364,16 @@ static void hw_engine_init_early(struct
 xe_gt *gt, struct xe_hw_engine *hwe,
 
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct · line 367

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
 	if (!gt->eclass[hwe->class].sched_props.job_timeout_ms) {
 		gt->eclass[hwe->class].sched_props.job_timeout_ms

= HZ *

Quoted 8 lines
Quoted 2 lines

5;

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct · line 368

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+		gt->eclass[hwe-

class].sched_props.job_timeout_min =

Quoted 2 lines

XE_HW_ENGINE_JOB_TIMEOUT_MIN;

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct · line 369

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+		gt->eclass[hwe-

class].sched_props.job_timeout_max =

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+XE_HW_ENGINE_JOB_TIMEOUT_MAX;
 		gt->eclass[hwe->class].sched_props.timeslice_us = 1

* 1000;

Quoted 6 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct · line 372

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+		gt->eclass[hwe->class].sched_props.timeslice_min =

XE_HW_ENGINE_TIMESLICE_MIN;

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct · line 375

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine.c +2 -0
+		gt->eclass[hwe->class].sched_props.timeslice_max =
+XE_HW_ENGINE_TIMESLICE_MAX;
 		gt->eclass[hwe-

class].sched_props.preempt_timeout_us =

Quoted 31 lines
Quoted 3 lines

640 *

Quoted 2 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct · line 377

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
 1000;
+		gt->eclass[hwe-

class].sched_props.preempt_timeout_min =

Quoted 3 lines
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct · line 378

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+
	XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN;
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct · line 379

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+		gt->eclass[hwe-

class].sched_props.preempt_timeout_max =

Quoted 23 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

+

	XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX;
Quoted 11 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.c

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
 		/* Record default props */
 		gt->eclass[hwe->class].defaults = gt->eclass[hwe-

class].sched_props;

Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
 	}
drivers/gpu/drm/xe/xe_hw_engine.h +0 -0
index 7eca9d53c7b1..3d37d6d44261 100644
@@ -10,6 +10,37 @@
 
Quoted 4 lines
Quoted 4 lines

drivers/gpu/drm/xe/xe_hw_engine.h

Quoted 4 lines
drivers/gpu/drm/xe/xe_hw_engine.h +2 -0
 struct drm_printer;
 
+#ifdef CONFIG_DRM_XE_JOB_TIMEOUT_MIN #define
+XE_HW_ENGINE_JOB_TIMEOUT_MIN

CONFIG_DRM_XE_JOB_TIMEOUT_MIN #else

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine.h line 17

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine.h +3 -0
+#define XE_HW_ENGINE_JOB_TIMEOUT_MIN 1 #endif #ifdef
+CONFIG_DRM_XE_JOB_TIMEOUT_MAX #define
+XE_HW_ENGINE_JOB_TIMEOUT_MAX

CONFIG_DRM_XE_JOB_TIMEOUT_MAX #else

Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.h +1 -0
+#define XE_HW_ENGINE_JOB_TIMEOUT_MAX (10 * 1000) #endif

#ifdef

Quoted 6 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine.h line 19

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.h +1 -0
+CONFIG_DRM_XE_TIMESLICE_MIN #define

XE_HW_ENGINE_TIMESLICE_MIN

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine.h line 22

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine.h +3 -0
+CONFIG_DRM_XE_TIMESLICE_MIN #else #define
+XE_HW_ENGINE_TIMESLICE_MIN 1 #endif #ifdef
+CONFIG_DRM_XE_TIMESLICE_MAX #define

XE_HW_ENGINE_TIMESLICE_MAX

Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines

drivers/gpu/drm/xe/xe_hw_engine.h line 32

Quoted 10 lines
drivers/gpu/drm/xe/xe_hw_engine.h +10 -0
+CONFIG_DRM_XE_TIMESLICE_MAX #else #define
+XE_HW_ENGINE_TIMESLICE_MAX (10 * 1000 * 1000) #endif #ifdef
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MIN
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MIN #else #define
+XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN 1 #endif #ifdef
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MAX
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MAX #else #define
+XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX (10 * 1000 * 1000)

#endif

Quoted 28 lines
Quoted 28 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
drivers/gpu/drm/xe/xe_hw_engine.h +1 -0
+
 int xe_hw_engines_init_early(struct xe_gt *gt);  int

xe_hw_engines_init(struct xe_gt *gt); void xe_hw_engine_handle_irq(struct xe_hw_engine *hwe, u16 intr_vec); 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 990bb675d1e0..2b7ac4e02db6 100644

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
@@ -11,6 +11,20 @@
 
 static int xe_add_hw_engine_class_defaults(struct kobject
 *parent);
 
Quoted 12 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +4 -0
+bool enforce_schedule_limit(void) { #if
+IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	return true;
+#else
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	return !capable(CAP_SYS_NICE); #endif }
+
+bool engine_timeout_in_range(u64 timeout, u64 min, u64 max) {
+	return timeout >= min && timeout <= max; }
+
 static void kobj_xe_hw_engine_release(struct kobject *kobj)  {
 	kfree(kobj);
@@ -39,11 +53,92 @@ kobj_xe_hw_engine_class(struct kobject

*parent, char *name)

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject *parent, char *name)

Quoted 7 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +4 -0
 	return keclass;
 }
 
+static ssize_t job_timeout_max_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);

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	u32 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject *parent, char *name) · line 76

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+		return err;
+
+	if (timeout < eclass->sched_props.job_timeout_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+

XE_HW_ENGINE_JOB_TIMEOUT_MIN,

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 73

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +1 -0
+

XE_HW_ENGINE_JOB_TIMEOUT_MAX))

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject *parent, char *name)

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +3 -0
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.job_timeout_max,

timeout);

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject *parent, char *name)

Quoted 6 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +6 -0
+
+	return count;
+}
+
+static ssize_t job_timeout_max_show(struct kobject *kobj,
+				    struct kobj_attribute *attr, char

*buf) {

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +7 -0
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n",
+eclass->sched_props.job_timeout_max);
+}
+
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject *parent, char *name)

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+static struct kobj_attribute job_timeout_max_attr =
+__ATTR(job_timeout_max, 0644, job_timeout_max_show,
+job_timeout_max_store);
+
+static ssize_t job_timeout_min_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);

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	u32 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject *parent, char *name) · line 113

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+		return err;
+
+	if (timeout > eclass->sched_props.job_timeout_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+

XE_HW_ENGINE_JOB_TIMEOUT_MIN,

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 111

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +1 -0
+

XE_HW_ENGINE_JOB_TIMEOUT_MAX))

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject *parent, char *name)

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +3 -0
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.job_timeout_min,

timeout);

Quoted 41 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject *parent, char *name)

Quoted 6 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +6 -0
+
+	return count;
+}
+
+static ssize_t job_timeout_min_show(struct kobject *kobj,
+				    struct kobj_attribute *attr, char

*buf) {

Quoted 34 lines
Quoted 34 lines
Quoted 27 lines
Quoted 17 lines
Quoted 17 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +12 -0
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n",
+eclass->sched_props.job_timeout_min);
+}
+
+static struct kobj_attribute job_timeout_min_attr =
+__ATTR(job_timeout_min, 0644, job_timeout_min_show,
+job_timeout_min_store);
+
 static ssize_t job_timeout_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);
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
Quoted 9 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject *parent, char *name) · line 141

Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	u32 min = XE_HW_ENGINE_JOB_TIMEOUT_MIN;
+	u32 max = XE_HW_ENGINE_JOB_TIMEOUT_MAX; #else
+	u32 min = e->hwe->eclass->sched_props.job_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.job_timeout_max;
+#endif

I don't think we need this, just make sure default is within min / max of the sched_props.

Quoted 4 lines

Shouldn't the sched_prop set through sysfs here which applies to all future user engines (xe_engine) has the same requirement as the sched_prop set directly to user engine (xe_engine) through set_properly

ioctl?

Quoted 2 lines

ie., shoudln't the requirement be same in job_timeout_store() and engine_set_job_timeout()?

I also think it should apply same to sysfs calls as well. Unless we think sysfs should limit to compile configs only. Since sysfs min/max cab be changed.

Thanks,
Tejas

Quoted 406 lines
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines

Niranjana

Quoted 7 lines

Matt

Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
 	u32 timeout;
 	int err;
@@ -51,6 +146,10 @@ static ssize_t job_timeout_store(struct

kobject

*kobj,

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t job_timeout_store(struct kobject *kobj,

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +4 -0
 	if (err)
 		return err;
 
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout, min, max))
+		return -EINVAL;
+
 	WRITE_ONCE(eclass->sched_props.job_timeout_ms,

timeout);

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
 	return count;
@@ -78,11 +177,40 @@ 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);

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +2 -0
+static ssize_t job_timeout_min_default(struct kobject *kobj,
+				       struct kobj_attribute *attr, char

*buf) {

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +4 -0
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n",
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t job_timeout_default(struct kobject *kobj,

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+eclass->defaults.job_timeout_min);
+}
+
+static struct kobj_attribute job_timeout_min_def =
+__ATTR(job_timeout_min, 0444, job_timeout_min_default, NULL);
+
+static ssize_t job_timeout_max_default(struct kobject *kobj,
+				       struct kobj_attribute *attr, char

*buf) {

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n",
+eclass->defaults.job_timeout_max);
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t job_timeout_default(struct kobject *kobj, · line 204

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+}
+
+static struct kobj_attribute job_timeout_max_def =
+__ATTR(job_timeout_max, 0444, job_timeout_max_default, NULL);
+
 static ssize_t timeslice_duration_store(struct kobject *kobj,
 					struct kobj_attribute *attr,
 					const char *buf, size_t count)

{

Quoted 23 lines
Quoted 23 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

struct xe_hw_engine_class_intf *eclass =
kobj_to_eclass(kobj);

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +6 -0
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	u32 min = XE_HW_ENGINE_TIMESLICE_MIN;
+	u32 max = XE_HW_ENGINE_TIMESLICE_MAX; #else
+	u32 min = e->hwe->eclass->sched_props.timeslice_min;
+	u32 max = e->hwe->eclass->sched_props.timeslice_max;
+#endif
 	u32 duration;
 	int err;
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
@@ -90,11 +218,92 @@ static ssize_t

timeslice_duration_store(struct

kobject *kobj,

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +4 -0
 	if (err)
 		return err;
 
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(duration, min, max))
+		return -EINVAL;
+
 	WRITE_ONCE(eclass->sched_props.timeslice_us, duration);
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t timeslice_duration_store(struct kobject *kobj,

Quoted 6 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +3 -0
 	return count;
 }
 
+static ssize_t timeslice_duration_max_store(struct kobject *kobj,
+					    struct kobj_attribute *attr,
+					    const char *buf, size_t

count) {

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +1 -0
+	struct xe_hw_engine_class_intf *eclass =

kobj_to_eclass(kobj);

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +6 -0
+	u32 duration;
+	int err;
+
+	err = kstrtou32(buf, 0, &duration);
+	if (err)
+		return err;
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t timeslice_duration_store(struct kobject *kobj, · line 250

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+
+	if (duration < eclass->sched_props.timeslice_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(duration,
+				     XE_HW_ENGINE_TIMESLICE_MIN,
+

XE_HW_ENGINE_TIMESLICE_MAX))

Quoted 21 lines
Quoted 21 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +12 -0
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.timeslice_max, duration);
+
+	return count;
+}
+
+static ssize_t timeslice_duration_max_show(struct kobject *kobj,
+					   struct kobj_attribute *attr,
+					   char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass =
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t timeslice_duration_store(struct kobject *kobj,

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n",
+eclass->sched_props.timeslice_max);
+}
+
+static struct kobj_attribute timeslice_duration_max_attr =
+	__ATTR(timeslice_duration_max, 0644,

timeslice_duration_max_show,

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t timeslice_duration_store(struct kobject *kobj,

Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	       timeslice_duration_max_store);
+
+static ssize_t timeslice_duration_min_store(struct kobject *kobj,
+					    struct kobj_attribute *attr,
+					    const char *buf, size_t

count) {

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +1 -0
+	struct xe_hw_engine_class_intf *eclass =

kobj_to_eclass(kobj);

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +6 -0
+	u32 duration;
+	int err;
+
+	err = kstrtou32(buf, 0, &duration);
+	if (err)
+		return err;
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t timeslice_duration_store(struct kobject *kobj, · line 289

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+
+	if (duration > eclass->sched_props.timeslice_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(duration,
+				     XE_HW_ENGINE_TIMESLICE_MIN,
+

XE_HW_ENGINE_TIMESLICE_MAX))

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t timeslice_duration_store(struct kobject *kobj,

Quoted 9 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +9 -0
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.timeslice_min, duration);
+
+	return count;
+}
+
+static ssize_t timeslice_duration_min_show(struct kobject *kobj,
+					   struct kobj_attribute *attr,

char

Quoted 19 lines
Quoted 19 lines

*buf) {

Quoted 9 lines
Quoted 9 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 9 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +9 -0
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n",
+eclass->sched_props.timeslice_min);
+}
+
+static struct kobj_attribute timeslice_duration_min_attr =
+	__ATTR(timeslice_duration_min, 0644,

timeslice_duration_min_show,

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +3 -0
+	       timeslice_duration_min_store);
+
 static ssize_t timeslice_duration_show(struct kobject *kobj,
 		struct kobj_attribute *attr, char *buf)  { @@ -118,11
+327,40 @@ static ssize_t timeslice_default(struct kobject

*kobj, static struct kobj_attribute timeslice_duration_def = __ATTR(timeslice_duration_us, 0444, timeslice_default, NULL);

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +2 -0
+static ssize_t timeslice_min_default(struct kobject *kobj,
+				     struct kobj_attribute *attr, char

*buf) {

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +4 -0
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.timeslice_min);
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t timeslice_default(struct kobject *kobj,

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+}
+
+static struct kobj_attribute timeslice_duration_min_def =
+__ATTR(timeslice_duration_min, 0444, timeslice_min_default,
+NULL);
+
+static ssize_t timeslice_max_default(struct kobject *kobj,
+				     struct kobj_attribute *attr, char

*buf) {

Quoted 29 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +10 -0
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.timeslice_max);
+}
+
+static struct kobj_attribute timeslice_duration_max_def =
+__ATTR(timeslice_duration_max, 0444, timeslice_max_default,
+NULL);
+
 static ssize_t preempt_timeout_store(struct kobject *kobj,
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t timeslice_default(struct kobject *kobj,

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
 				     struct kobj_attribute *attr,
 				     const char *buf, size_t count)  {
 	struct xe_hw_engine_class_intf *eclass =

kobj_to_eclass(kobj);

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +4 -0
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	u32 min = XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN;
+	u32 max = XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX; #else
+	u32 min = e->hwe->eclass-

sched_props.preempt_timeout_min;

Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +1 -0
+	u32 max = e->hwe->eclass-

sched_props.preempt_timeout_max;

Quoted 7 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +1 -0
+#endif
 	u32 timeout;
 	int err;
@@ -130,6 +368,10 @@ static ssize_t

preempt_timeout_store(struct

kobject *kobj,

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t job_timeout_store(struct kobject *kobj,

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +4 -0
 	if (err)
 		return err;
 
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout, min, max))
+		return -EINVAL;
+
 	WRITE_ONCE(eclass->sched_props.preempt_timeout_us,

timeout);

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
 	return count;
@@ -158,17 +400,129 @@ static ssize_t

preempt_timeout_default(struct kobject *kobj, static struct kobj_attribute preempt_timeout_def = __ATTR(preempt_timeout_us, 0444, preempt_timeout_default, NULL);

Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+static ssize_t preempt_timeout_min_default(struct kobject *kobj,
+					   struct kobj_attribute *attr,
+					   char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass =
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_default(struct kobject *kobj,

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n",
+eclass->defaults.preempt_timeout_min);
+}
+
+static struct kobj_attribute preempt_timeout_min_def =
+__ATTR(preempt_timeout_min, 0444,

preempt_timeout_min_default,

Quoted 16 lines
Quoted 16 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +7 -0
+NULL);
+
+static ssize_t preempt_timeout_max_default(struct kobject *kobj,
+					   struct kobj_attribute *attr,
+					   char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass =
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_default(struct kobject *kobj,

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n",
+eclass->defaults.preempt_timeout_max);
+}
+
+static struct kobj_attribute preempt_timeout_max_def =
+__ATTR(preempt_timeout_max, 0444,

preempt_timeout_max_default,

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_default(struct kobject *kobj, · line 429

Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+NULL);
+
+static ssize_t preempt_timeout_max_store(struct kobject *kobj,
+					 struct kobj_attribute *attr,
+					 const char *buf, size_t count)

{

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +1 -0
+	struct xe_hw_engine_class_intf *eclass =

kobj_to_eclass(kobj);

Quoted 14 lines
Quoted 14 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	u32 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_default(struct kobject *kobj, · line 447

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+		return err;
+
+	if (timeout < eclass->sched_props.preempt_timeout_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+

XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN,

Quoted 5 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

+

XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX))

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject *parent, char *name)

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +3 -0
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.preempt_timeout_max,

timeout);

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_default(struct kobject *kobj, · line 466

Quoted 6 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +6 -0
+
+	return count;
+}
+
+static ssize_t preempt_timeout_max_show(struct kobject *kobj,
+					struct kobj_attribute *attr,

char *buf)

Quoted 10 lines
Quoted 10 lines

{

Quoted 9 lines
Quoted 9 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 9 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +9 -0
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n",
+eclass->sched_props.preempt_timeout_max);
+}
+
+static struct kobj_attribute preempt_timeout_max_attr =
+	__ATTR(preempt_timeout_max, 0644,

preempt_timeout_max_show,

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_default(struct kobject *kobj, · line 467

Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	       preempt_timeout_max_store);
+
+static ssize_t preempt_timeout_min_store(struct kobject *kobj,
+					 struct kobj_attribute *attr,
+					 const char *buf, size_t count)

{

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +1 -0
+	struct xe_hw_engine_class_intf *eclass =

kobj_to_eclass(kobj);

Quoted 14 lines
Quoted 14 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	u32 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_default(struct kobject *kobj, · line 485

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+		return err;
+
+	if (timeout > eclass->sched_props.preempt_timeout_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+

XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN,

Quoted 5 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

+

XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX))

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject *parent, char *name)

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +3 -0
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.preempt_timeout_min,

timeout);

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_default(struct kobject *kobj,

Quoted 6 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +6 -0
+
+	return count;
+}
+
+static ssize_t preempt_timeout_min_show(struct kobject *kobj,
+					struct kobj_attribute *attr,

char *buf)

Quoted 10 lines
Quoted 10 lines

{

Quoted 9 lines
Quoted 9 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 9 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +9 -0
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n",
+eclass->sched_props.preempt_timeout_min);
+}
+
+static struct kobj_attribute preempt_timeout_min_attr =
+	__ATTR(preempt_timeout_min, 0644,

preempt_timeout_min_show,

Quoted 46 lines
Quoted 46 lines
Quoted 46 lines
Quoted 46 lines
Quoted 46 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +14 -0
+	       preempt_timeout_min_store);
+
 static const struct attribute *defaults[] = {
 	&job_timeout_def.attr,
+	&job_timeout_min_def.attr,
+	&job_timeout_max_def.attr,
 	&timeslice_duration_def.attr,
+	&timeslice_duration_min_def.attr,
+	&timeslice_duration_max_def.attr,
 	&preempt_timeout_def.attr,
+	&preempt_timeout_min_def.attr,
+	&preempt_timeout_max_def.attr,
 	NULL
 };
 
 static const struct attribute *files[] = {
 	&job_timeout_attr.attr,
+	&job_timeout_min_attr.attr,
+	&job_timeout_max_attr.attr,
 	&timeslice_duration_attr.attr,
+	&timeslice_duration_min_attr.attr,
+	&timeslice_duration_max_attr.attr,
 	&preempt_timeout_attr.attr,
+	&preempt_timeout_min_attr.attr,
+	&preempt_timeout_max_attr.attr,
 	NULL
 };
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h +2 -0
index 757136614672..2e2ab351a991 100644
@@ -10,6 +10,8 @@
 
 #define MAX_ENGINE_CLASS_NAME_LEN    16
 int xe_hw_engine_class_sysfs_init(struct xe_gt *gt);
+bool enforce_schedule_limit(void); bool
+engine_timeout_in_range(u64 timeout, u64 min, u64 max);
 
 /**
  * struct kobj_eclass - A eclass's kobject struct that

connects the kobject and the
--
2.25.1

maintainer
#19 lore raw

Re: [Intel-xe] [PATCH V9 6/6] drm/xe: Add min/max cap for engine scheduler properties

Quoted 535 lines · Tejas
Quoted 535 lines

-----Original Message-----
From: Vishwanathapura, Niranjana <[email protected]>
Sent: Friday, July 28, 2023 11:56 AM
To: Upadhyay, Tejas <[email protected]>
Cc: Brost, Matthew <[email protected]>; intel- [email protected]
Subject: Re: [PATCH V9 6/6] drm/xe: Add min/max cap for engine scheduler properties

Quoted 6 lines · Tejas
Quoted 6 lines

-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: Friday, July 28, 2023 10:35 AM
To: Vishwanathapura, Niranjana

<[email protected]>

Quoted 12 lines
Quoted 12 lines

Cc: Upadhyay, Tejas <[email protected]>; intel- [email protected]
Subject: Re: [PATCH V9 6/6] drm/xe: Add min/max cap for engine scheduler properties

Quoted 5 lines · Niranjana Vishwanathapura
Quoted 4 lines · Matthew Brost
Quoted 3 lines · Tejas Upadhyay

Add sysfs entries for the min, max, and defaults for each of engine scheduler controls for every hardware engine class.

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

Non-elevated user IOCTLs to set these controls must be within the min-max ranges of the sysfs entries, elevated user can set these controls to any value. However, introduced compile time CONFIG min-max values which restricts elevated user to be in compile time min-max range if at all sysfs min/max are violated.

Sysfs entries examples are,
DUT# cat

/sys/class/drm/cardX/device/tileN/gtN/engines/ccs/.defaults/

Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

job_timeout_max job_timeout_ms preempt_timeout_min

timeslice_duration_max timeslice_duration_us

Quoted 1 line
Quoted 1 line
Quoted 1 line

job_timeout_min preempt_timeout_max

preempt_timeout_us

Quoted 52 lines
Quoted 52 lines

timeslice_duration_min

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

DUT# cat /sys/class/drm/card1/device/tileN/gtN/engines/ccs/
.defaults/ job_timeout_min preempt_timeout_max

preempt_timeout_us timeslice_duration_min

Quoted 1 line
Quoted 1 line
Quoted 1 line

job_timeout_max job_timeout_ms preempt_timeout_min

timeslice_duration_max timeslice_duration_us

Quoted 31 lines
Quoted 31 lines
Quoted 31 lines

V9 :
- Rebase to use s/xe_engine/xe_hw_engine/ - Matt
V8 :
- fix enforce_sched_limit and avoid code duplication - Niranjana
- Make sure min < max - Niranjana
V7 :
- Rebase to replace hw engine with eclass interface
- return EINVAL in place of EPERM
- Use some APIs to avoid code duplication
V6 :
- Rebase changes to reflect per engine class props interface - MattB
- Use #if ENABLED - MattB
- Remove MAX_SCHED_TIMEOUT check as range validation is
enough
V5 :
- Rebase to resolve conflicts - CI
V4 :
- Rebase
- Update commit to reflect tile addition
- Use XE_HW macro directly as they are already filtered for CONFIG checks - Niranjana
- Add CONFIG for enable/disable min/max limitation
on elevated user. Default is enable - Matt/Joonas
V3 :
- Resolve CI hooks warning for kernel-doc
V2 :
- Restric min/max setting to #define default min/max for elevated user - Himal
- Remove unrelated changes from patch - Niranjana

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
---
 drivers/gpu/drm/xe/Kconfig                    |   6 +
 drivers/gpu/drm/xe/Kconfig.profile            |  46 +++
 drivers/gpu/drm/xe/xe_engine.c                |  25 +-
 drivers/gpu/drm/xe/xe_hw_engine.c             |   8 +
 drivers/gpu/drm/xe/xe_hw_engine.h             |  31 ++
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 354

++++++++++++++++++

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h |   2 +
 7 files changed, 466 insertions(+), 6 deletions(-)  create

mode
100644 drivers/gpu/drm/xe/Kconfig.profile

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/xe/Kconfig depends on DRM_XE depends on EXPERT

Quoted 6 lines
(quoted diff) +0 -0

b/drivers/gpu/drm/xe/Kconfig index d44794f99338..0a4ea965645b 100644

drivers/gpu/drm/xe/Kconfig +0 -0
@@ -83,3 +83,9 @@ depends on DRM_XE  depends on EXPERT

source

Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
Quoted 24 lines

"drivers/gpu/drm/xe/Kconfig.debug"
endmenu

drivers/gpu/drm/xe/Kconfig +6 -0
+
+menu "drm/xe Profile Guided Optimisation"
+	visible if EXPERT
+	depends on DRM_XE
+	source "drivers/gpu/drm/xe/Kconfig.profile"
+endmenu
drivers/gpu/drm/xe/Kconfig.profile new file +9 -0
new file mode 100644
index 000000000000..e72f15ec4bf6
@@ -0,0 +1,46 @@
+config DRM_XE_JOB_TIMEOUT_MAX
+       int "Default max job timeout (ms)"
+       default 10000 # milliseconds
+       help
+         Configures the default max job timeout after which job will
+         be forcefully taken away from scheduler.
+config DRM_XE_JOB_TIMEOUT_MIN
+       int "Default max job timeout (ms)"
+       default 1 # milliseconds
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/Kconfig.profile line 17

Quoted 8 lines
drivers/gpu/drm/xe/Kconfig.profile new file +8 -0
+       help
+         Configures the default min job timeout after which job will
+         be forcefully taken away from scheduler.
+config DRM_XE_TIMESLICE_MAX
+       int "Default max timeslice duration (us)"
+       default 10000000 # microseconds
+       help
+         Configures the default max timeslice duration between

multiple

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/xe/Kconfig.profile line 23

Quoted 6 lines
drivers/gpu/drm/xe/Kconfig.profile new file +6 -0
+         contexts by guc scheduling.
+config DRM_XE_TIMESLICE_MIN
+       int "Default min timeslice duration (us)"
+       default 1 # microseconds
+       help
+         Configures the default min timeslice duration between

multiple

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/xe/Kconfig.profile line 29

Quoted 6 lines
drivers/gpu/drm/xe/Kconfig.profile new file +6 -0
+         contexts by guc scheduling.
+config DRM_XE_PREEMPT_TIMEOUT_MAX
+       int "Default max  preempt timeout (us)"
+       default 10000000 # microseconds
+       help
+         Configures the default max preempt timeout after which

context

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

drivers/gpu/drm/xe/Kconfig.profile line 36

Quoted 7 lines
drivers/gpu/drm/xe/Kconfig.profile new file +7 -0
+         will be forcefully taken away and higher priority context will
+         run.
+config DRM_XE_PREEMPT_TIMEOUT_MIN
+       int "Default min  preempt timeout (us)"
+       default 1 # microseconds
+       help
+         Configures the default min preempt timeout after which

context

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

drivers/gpu/drm/xe/Kconfig.profile line 43

Quoted 7 lines
drivers/gpu/drm/xe/Kconfig.profile new file +7 -0
+         will be forcefully taken away and higher priority context will
+         run.
+config DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT
+       bool "Default configuration of limitation on scheduler timeout"
+       default y
+       help
+	 Configures the enablement of limitation on scheduler

timeout

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

drivers/gpu/drm/xe/Kconfig.profile line 45

Quoted 2 lines
drivers/gpu/drm/xe/Kconfig.profile new file +2 -0
+	 to apply to applicable user. For elevated user, all above MIN
+	 and MAX values will apply when this configuration is enable

to

Quoted 73 lines
Quoted 73 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
drivers/gpu/drm/xe/Kconfig.profile new file +1 -0
+	 apply limitation. By default limitation is applied.
(quoted diff) +0 -0

b/drivers/gpu/drm/xe/xe_engine.c index
9e167b113963..d934196eb79f
100644

drivers/gpu/drm/xe/xe_engine.c +0 -0
@@ -13,6 +13,7 @@
 
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/xe/xe_engine.c +1 -0
 #include "xe_device.h"
 #include "xe_gt.h"
+#include "xe_hw_engine_class_sysfs.h"
 #include "xe_hw_fence.h"
 #include "xe_lrc.h"
 #include "xe_macros.h"
@@ -191,8 +192,12 @@ static int engine_set_priority(struct

xe_device *xe, struct xe_engine *e, static int

engine_set_timeslice(struct xe_device *xe, struct xe_engine *e,

Quoted 15 lines
Quoted 15 lines

drivers/gpu/drm/xe/xe_engine.c

Quoted 6 lines
drivers/gpu/drm/xe/xe_engine.c +2 -2
 				u64 value, bool create)
 {
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	u32 min = e->hwe->eclass->sched_props.timeslice_min;
+	u32 max = e->hwe->eclass->sched_props.timeslice_max;

So I screwed this up in my last comment, sorry.

min = cap_nice ? KConfig option for min :
e->hwe->eclass->sched_props.timeslice_min;
same logic for max;

Probably add helper for this.

Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_engine.c

Quoted 3 lines
drivers/gpu/drm/xe/xe_engine.c +3 -0
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))

Then I think logic works too...

if cap nice && !Kconfig option to enfore limits
(enforce_schedule_limit

returns false):

Quoted 11 lines
Quoted 8 lines

user can do whatever
else if cap nice
user within Kconfig range
else
user within sysfs range

This is what we want in the end.

Matt, I think this is exactly what the previous revision of the patch was

doing.

Quoted 1 line

No... Previous version

min = Kconfig option to enfore limits ? KConfig option for min :
e->hwe-

Quoted 1 line

eclass->sched_props.timeslice_min

same for max

Results in:

if cap nice && !Kconfig option to enfore limits (enforce_schedule_limit returns false):
user can do whatever
else if cap_nice || Kconfig option to enfore limit
user within Kconfig range
else
user within sysfs range

Quoted 7 lines
Quoted 4 lines

!cap_nice && Kconfig option to enfore limits == user within Kconfig range
(previously) !cap_nice && Kconfig option to enfore limits == user within sysfs range (my suggestion)

In previous version we can achieve it by just adding one below check right? #if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT) &&

cap_nice

Quoted 8 lines
(quoted diff) +5 -0
+       u32 min = XE_HW_ENGINE_TIMESLICE_MIN;
+       u32 max = XE_HW_ENGINE_TIMESLICE_MAX; #else
+       u32 min = e->hwe->eclass->sched_props.timeslice_min;
+       u32 max = e->hwe->eclass->sched_props.timeslice_max;
+#endif

Please let me know!

Ah I see. Yah, it is a limits selection issue.
We can do,

u32 min = e->hwe->eclass->sched_props.timeslice_min; u32 max = e->hwe->eclass->sched_props.timeslice_max;

#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
         if (cap_nice) {
                 u32 min = XE_HW_ENGINE_TIMESLICE_MIN;
                 u32 max = XE_HW_ENGINE_TIMESLICE_MAX;
         }

#endif

Matt, Tejas
Also, looks like you missed my another comment below.

Niranjana

Quoted 10 lines
Quoted 10 lines

The logic is different and I believe we want what I'm suggesting.

Matt

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_engine.c +1 -0
+		return -EINVAL;
 
 	return e->ops->set_timeslice(e, value);  } @@ -201,8 +206,12

@@ static int engine_set_preemption_timeout(struct xe_device *xe,
struct xe_engine *e, u64

value,

Quoted 6 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

drivers/gpu/drm/xe/xe_engine.c

Quoted 5 lines
drivers/gpu/drm/xe/xe_engine.c +1 -2
 					 bool create)
 {
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	u32 min = e->hwe->eclass-

sched_props.preempt_timeout_min;

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_engine.c

Quoted 1 line
drivers/gpu/drm/xe/xe_engine.c +1 -0
+	u32 max = e->hwe->eclass-

sched_props.preempt_timeout_max;

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/xe/xe_engine.c

Quoted 6 lines
drivers/gpu/drm/xe/xe_engine.c +4 -0
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))
+		return -EINVAL;
 
 	return e->ops->set_preempt_timeout(e, value);  } @@ -

266,11

Quoted 28 lines
Quoted 28 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

+275,15 @@ static int engine_set_persistence(struct xe_device +*xe,
struct xe_engine *e, static int engine_set_job_timeout(struct xe_device

*xe, struct xe_engine *e,

Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
drivers/gpu/drm/xe/xe_engine.c +6 -2
 				  u64 value, bool create)
 {
+	u32 min = e->hwe->eclass->sched_props.job_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.job_timeout_max;
+
 	if (XE_IOCTL_DBG(xe, !create))
 		return -EINVAL;
 
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))
+		return -EINVAL;
 
 	return e->ops->set_job_timeout(e, value);  } diff --git

a/drivers/gpu/drm/xe/xe_hw_engine.c
b/drivers/gpu/drm/xe/xe_hw_engine.c
index afa7d25c3852..e601bffe3b13 100644

drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
@@ -364,8 +364,16 @@ static void hw_engine_init_early(struct
 xe_gt *gt, struct xe_hw_engine *hwe,
 
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct · line 367

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
 	if (!gt->eclass[hwe->class].sched_props.job_timeout_ms) {
 		gt->eclass[hwe->class].sched_props.job_timeout_ms

= HZ *

Quoted 8 lines
Quoted 2 lines

5;

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct · line 368

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+		gt->eclass[hwe-

class].sched_props.job_timeout_min =

Quoted 2 lines

XE_HW_ENGINE_JOB_TIMEOUT_MIN;

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct · line 369

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+		gt->eclass[hwe-

class].sched_props.job_timeout_max =

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+XE_HW_ENGINE_JOB_TIMEOUT_MAX;
 		gt->eclass[hwe->class].sched_props.timeslice_us = 1

* 1000;

Quoted 6 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct · line 372

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+		gt->eclass[hwe->class].sched_props.timeslice_min =

XE_HW_ENGINE_TIMESLICE_MIN;

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct · line 375

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine.c +2 -0
+		gt->eclass[hwe->class].sched_props.timeslice_max =
+XE_HW_ENGINE_TIMESLICE_MAX;
 		gt->eclass[hwe-

class].sched_props.preempt_timeout_us =

Quoted 31 lines
Quoted 3 lines

640 *

Quoted 2 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct · line 377

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
 1000;
+		gt->eclass[hwe-

class].sched_props.preempt_timeout_min =

Quoted 3 lines
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct · line 378

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+
	XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN;
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct · line 379

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+		gt->eclass[hwe-

class].sched_props.preempt_timeout_max =

Quoted 23 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

+

	XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX;
Quoted 11 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.c

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
 		/* Record default props */
 		gt->eclass[hwe->class].defaults = gt->eclass[hwe-

class].sched_props;

Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
 	}
drivers/gpu/drm/xe/xe_hw_engine.h +0 -0
index 7eca9d53c7b1..3d37d6d44261 100644
@@ -10,6 +10,37 @@
 
Quoted 4 lines
Quoted 4 lines

drivers/gpu/drm/xe/xe_hw_engine.h line 14

Quoted 4 lines
drivers/gpu/drm/xe/xe_hw_engine.h +2 -0
 struct drm_printer;
 
+#ifdef CONFIG_DRM_XE_JOB_TIMEOUT_MIN #define
+XE_HW_ENGINE_JOB_TIMEOUT_MIN

CONFIG_DRM_XE_JOB_TIMEOUT_MIN #else

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine.h line 17

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine.h +3 -0
+#define XE_HW_ENGINE_JOB_TIMEOUT_MIN 1 #endif #ifdef
+CONFIG_DRM_XE_JOB_TIMEOUT_MAX #define
+XE_HW_ENGINE_JOB_TIMEOUT_MAX

CONFIG_DRM_XE_JOB_TIMEOUT_MAX #else

Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.h +1 -0
+#define XE_HW_ENGINE_JOB_TIMEOUT_MAX (10 * 1000) #endif

#ifdef

Quoted 6 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine.h line 19

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.h +1 -0
+CONFIG_DRM_XE_TIMESLICE_MIN #define

XE_HW_ENGINE_TIMESLICE_MIN

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine.h line 22

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine.h +3 -0
+CONFIG_DRM_XE_TIMESLICE_MIN #else #define
+XE_HW_ENGINE_TIMESLICE_MIN 1 #endif #ifdef
+CONFIG_DRM_XE_TIMESLICE_MAX #define

XE_HW_ENGINE_TIMESLICE_MAX

Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines

drivers/gpu/drm/xe/xe_hw_engine.h line 32

Quoted 10 lines
drivers/gpu/drm/xe/xe_hw_engine.h +10 -0
+CONFIG_DRM_XE_TIMESLICE_MAX #else #define
+XE_HW_ENGINE_TIMESLICE_MAX (10 * 1000 * 1000) #endif #ifdef
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MIN
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MIN #else #define
+XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN 1 #endif #ifdef
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MAX
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MAX #else #define
+XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX (10 * 1000 * 1000)

#endif

Quoted 28 lines
Quoted 28 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
drivers/gpu/drm/xe/xe_hw_engine.h +1 -0
+
 int xe_hw_engines_init_early(struct xe_gt *gt);  int

xe_hw_engines_init(struct xe_gt *gt); void xe_hw_engine_handle_irq(struct xe_hw_engine *hwe, u16 intr_vec); 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 990bb675d1e0..2b7ac4e02db6 100644

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
@@ -11,6 +11,20 @@
 
 static int xe_add_hw_engine_class_defaults(struct kobject
 *parent);
 
Quoted 12 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +4 -0
+bool enforce_schedule_limit(void) { #if
+IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	return true;
+#else
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	return !capable(CAP_SYS_NICE); #endif }
+
+bool engine_timeout_in_range(u64 timeout, u64 min, u64 max) {
+	return timeout >= min && timeout <= max; }
+
 static void kobj_xe_hw_engine_release(struct kobject *kobj)  {
 	kfree(kobj);
@@ -39,11 +53,92 @@ kobj_xe_hw_engine_class(struct kobject

*parent, char *name)

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 59

Quoted 7 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +4 -0
 	return keclass;
 }
 
+static ssize_t job_timeout_max_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);

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	u32 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 72

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+		return err;
+
+	if (timeout < eclass->sched_props.job_timeout_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+

XE_HW_ENGINE_JOB_TIMEOUT_MIN,

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 73

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +1 -0
+

XE_HW_ENGINE_JOB_TIMEOUT_MAX))

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 76

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +3 -0
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.job_timeout_max,

timeout);

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 82

Quoted 6 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +6 -0
+
+	return count;
+}
+
+static ssize_t job_timeout_max_show(struct kobject *kobj,
+				    struct kobj_attribute *attr, char

*buf) {

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +7 -0
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n",
+eclass->sched_props.job_timeout_max);
+}
+
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 97

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+static struct kobj_attribute job_timeout_max_attr =
+__ATTR(job_timeout_max, 0644, job_timeout_max_show,
+job_timeout_max_store);
+
+static ssize_t job_timeout_min_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);

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	u32 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 110

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+		return err;
+
+	if (timeout > eclass->sched_props.job_timeout_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+

XE_HW_ENGINE_JOB_TIMEOUT_MIN,

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 111

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +1 -0
+

XE_HW_ENGINE_JOB_TIMEOUT_MAX))

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 114

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +3 -0
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.job_timeout_min,

timeout);

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 120

Quoted 6 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +6 -0
+
+	return count;
+}
+
+static ssize_t job_timeout_min_show(struct kobject *kobj,
+				    struct kobj_attribute *attr, char

*buf) {

Quoted 31 lines
Quoted 31 lines
Quoted 31 lines
Quoted 17 lines
Quoted 17 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +12 -0
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n",
+eclass->sched_props.job_timeout_min);
+}
+
+static struct kobj_attribute job_timeout_min_attr =
+__ATTR(job_timeout_min, 0644, job_timeout_min_show,
+job_timeout_min_store);
+
 static ssize_t job_timeout_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);
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
Quoted 9 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 142

Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	u32 min = XE_HW_ENGINE_JOB_TIMEOUT_MIN;
+	u32 max = XE_HW_ENGINE_JOB_TIMEOUT_MAX; #else
+	u32 min = e->hwe->eclass->sched_props.job_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.job_timeout_max;
+#endif

I don't think we need this, just make sure default is within min / max of the sched_props.

Shouldn't the sched_prop set through sysfs here which applies to all future user engines (xe_engine) has the same requirement as the sched_prop set directly to user engine (xe_engine) through set_properly

Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

ioctl?

Quoted 2 lines

ie., shoudln't the requirement be same in job_timeout_store() and engine_set_job_timeout()?

I also think it should apply same to sysfs calls as well. Unless we think sysfs should limit to compile configs only. Since sysfs min/max cab be changed.

Disagree, the min / max sysfs entries are subject to the Kconfig limits. So if you check the sysfs entry min / max here, the initial value will always be within the Kconfig limits plus any additional restrictions a user has imposed.

Matt

Quoted 409 lines

Thanks,
Tejas

Quoted 406 lines
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines

Niranjana

Quoted 7 lines

Matt

Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
 	u32 timeout;
 	int err;
@@ -51,6 +146,10 @@ static ssize_t job_timeout_store(struct

kobject

*kobj,

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +4 -0
 	if (err)
 		return err;
 
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout, min, max))
+		return -EINVAL;
+
 	WRITE_ONCE(eclass->sched_props.job_timeout_ms,

timeout);

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
 	return count;
@@ -78,11 +177,40 @@ 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);

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +2 -0
+static ssize_t job_timeout_min_default(struct kobject *kobj,
+				       struct kobj_attribute *attr, char

*buf) {

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +4 -0
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n",
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+eclass->defaults.job_timeout_min);
+}
+
+static struct kobj_attribute job_timeout_min_def =
+__ATTR(job_timeout_min, 0444, job_timeout_min_default, NULL);
+
+static ssize_t job_timeout_max_default(struct kobject *kobj,
+				       struct kobj_attribute *attr, char

*buf) {

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n",
+eclass->defaults.job_timeout_max);
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+}
+
+static struct kobj_attribute job_timeout_max_def =
+__ATTR(job_timeout_max, 0444, job_timeout_max_default, NULL);
+
 static ssize_t timeslice_duration_store(struct kobject *kobj,
 					struct kobj_attribute *attr,
 					const char *buf, size_t count)

{

Quoted 23 lines
Quoted 23 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

struct xe_hw_engine_class_intf *eclass =
kobj_to_eclass(kobj);

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +6 -0
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	u32 min = XE_HW_ENGINE_TIMESLICE_MIN;
+	u32 max = XE_HW_ENGINE_TIMESLICE_MAX; #else
+	u32 min = e->hwe->eclass->sched_props.timeslice_min;
+	u32 max = e->hwe->eclass->sched_props.timeslice_max;
+#endif
 	u32 duration;
 	int err;
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
@@ -90,11 +218,92 @@ static ssize_t

timeslice_duration_store(struct

kobject *kobj,

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +4 -0
 	if (err)
 		return err;
 
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(duration, min, max))
+		return -EINVAL;
+
 	WRITE_ONCE(eclass->sched_props.timeslice_us, duration);
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 6 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +3 -0
 	return count;
 }
 
+static ssize_t timeslice_duration_max_store(struct kobject *kobj,
+					    struct kobj_attribute *attr,
+					    const char *buf, size_t

count) {

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +1 -0
+	struct xe_hw_engine_class_intf *eclass =

kobj_to_eclass(kobj);

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +6 -0
+	u32 duration;
+	int err;
+
+	err = kstrtou32(buf, 0, &duration);
+	if (err)
+		return err;
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+
+	if (duration < eclass->sched_props.timeslice_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(duration,
+				     XE_HW_ENGINE_TIMESLICE_MIN,
+

XE_HW_ENGINE_TIMESLICE_MAX))

Quoted 21 lines
Quoted 21 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +12 -0
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.timeslice_max, duration);
+
+	return count;
+}
+
+static ssize_t timeslice_duration_max_show(struct kobject *kobj,
+					   struct kobj_attribute *attr,
+					   char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass =
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n",
+eclass->sched_props.timeslice_max);
+}
+
+static struct kobj_attribute timeslice_duration_max_attr =
+	__ATTR(timeslice_duration_max, 0644,

timeslice_duration_max_show,

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	       timeslice_duration_max_store);
+
+static ssize_t timeslice_duration_min_store(struct kobject *kobj,
+					    struct kobj_attribute *attr,
+					    const char *buf, size_t

count) {

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +1 -0
+	struct xe_hw_engine_class_intf *eclass =

kobj_to_eclass(kobj);

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +6 -0
+	u32 duration;
+	int err;
+
+	err = kstrtou32(buf, 0, &duration);
+	if (err)
+		return err;
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+
+	if (duration > eclass->sched_props.timeslice_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(duration,
+				     XE_HW_ENGINE_TIMESLICE_MIN,
+

XE_HW_ENGINE_TIMESLICE_MAX))

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 9 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +9 -0
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.timeslice_min, duration);
+
+	return count;
+}
+
+static ssize_t timeslice_duration_min_show(struct kobject *kobj,
+					   struct kobj_attribute *attr,

char

Quoted 19 lines
Quoted 19 lines

*buf) {

Quoted 9 lines
Quoted 9 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 9 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +9 -0
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n",
+eclass->sched_props.timeslice_min);
+}
+
+static struct kobj_attribute timeslice_duration_min_attr =
+	__ATTR(timeslice_duration_min, 0644,

timeslice_duration_min_show,

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +3 -0
+	       timeslice_duration_min_store);
+
 static ssize_t timeslice_duration_show(struct kobject *kobj,
 		struct kobj_attribute *attr, char *buf)  { @@ -118,11
+327,40 @@ static ssize_t timeslice_default(struct kobject

*kobj, static struct kobj_attribute timeslice_duration_def = __ATTR(timeslice_duration_us, 0444, timeslice_default, NULL);

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +2 -0
+static ssize_t timeslice_min_default(struct kobject *kobj,
+				     struct kobj_attribute *attr, char

*buf) {

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +4 -0
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.timeslice_min);
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+}
+
+static struct kobj_attribute timeslice_duration_min_def =
+__ATTR(timeslice_duration_min, 0444, timeslice_min_default,
+NULL);
+
+static ssize_t timeslice_max_default(struct kobject *kobj,
+				     struct kobj_attribute *attr, char

*buf) {

Quoted 29 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +10 -0
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.timeslice_max);
+}
+
+static struct kobj_attribute timeslice_duration_max_def =
+__ATTR(timeslice_duration_max, 0444, timeslice_max_default,
+NULL);
+
 static ssize_t preempt_timeout_store(struct kobject *kobj,
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
 				     struct kobj_attribute *attr,
 				     const char *buf, size_t count)  {
 	struct xe_hw_engine_class_intf *eclass =

kobj_to_eclass(kobj);

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +4 -0
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	u32 min = XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN;
+	u32 max = XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX; #else
+	u32 min = e->hwe->eclass-

sched_props.preempt_timeout_min;

Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +1 -0
+	u32 max = e->hwe->eclass-

sched_props.preempt_timeout_max;

Quoted 7 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +1 -0
+#endif
 	u32 timeout;
 	int err;
@@ -130,6 +368,10 @@ static ssize_t

preempt_timeout_store(struct

kobject *kobj,

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +4 -0
 	if (err)
 		return err;
 
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout, min, max))
+		return -EINVAL;
+
 	WRITE_ONCE(eclass->sched_props.preempt_timeout_us,

timeout);

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
 	return count;
@@ -158,17 +400,129 @@ static ssize_t

preempt_timeout_default(struct kobject *kobj, static struct kobj_attribute preempt_timeout_def = __ATTR(preempt_timeout_us, 0444, preempt_timeout_default, NULL);

Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+static ssize_t preempt_timeout_min_default(struct kobject *kobj,
+					   struct kobj_attribute *attr,
+					   char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass =
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n",
+eclass->defaults.preempt_timeout_min);
+}
+
+static struct kobj_attribute preempt_timeout_min_def =
+__ATTR(preempt_timeout_min, 0444,

preempt_timeout_min_default,

Quoted 16 lines
Quoted 16 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +7 -0
+NULL);
+
+static ssize_t preempt_timeout_max_default(struct kobject *kobj,
+					   struct kobj_attribute *attr,
+					   char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass =
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n",
+eclass->defaults.preempt_timeout_max);
+}
+
+static struct kobj_attribute preempt_timeout_max_def =
+__ATTR(preempt_timeout_max, 0444,

preempt_timeout_max_default,

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+NULL);
+
+static ssize_t preempt_timeout_max_store(struct kobject *kobj,
+					 struct kobj_attribute *attr,
+					 const char *buf, size_t count)

{

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +1 -0
+	struct xe_hw_engine_class_intf *eclass =

kobj_to_eclass(kobj);

Quoted 14 lines
Quoted 14 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	u32 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+		return err;
+
+	if (timeout < eclass->sched_props.preempt_timeout_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+

XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN,

Quoted 5 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

+

XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX))

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +3 -0
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.preempt_timeout_max,

timeout);

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 6 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +6 -0
+
+	return count;
+}
+
+static ssize_t preempt_timeout_max_show(struct kobject *kobj,
+					struct kobj_attribute *attr,

char *buf)

Quoted 10 lines
Quoted 10 lines

{

Quoted 9 lines
Quoted 9 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 9 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +9 -0
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n",
+eclass->sched_props.preempt_timeout_max);
+}
+
+static struct kobj_attribute preempt_timeout_max_attr =
+	__ATTR(preempt_timeout_max, 0644,

preempt_timeout_max_show,

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	       preempt_timeout_max_store);
+
+static ssize_t preempt_timeout_min_store(struct kobject *kobj,
+					 struct kobj_attribute *attr,
+					 const char *buf, size_t count)

{

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +1 -0
+	struct xe_hw_engine_class_intf *eclass =

kobj_to_eclass(kobj);

Quoted 14 lines
Quoted 14 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	u32 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+		return err;
+
+	if (timeout > eclass->sched_props.preempt_timeout_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+

XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN,

Quoted 5 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

+

XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX))

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +3 -0
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.preempt_timeout_min,

timeout);

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 6 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +6 -0
+
+	return count;
+}
+
+static ssize_t preempt_timeout_min_show(struct kobject *kobj,
+					struct kobj_attribute *attr,

char *buf)

Quoted 10 lines
Quoted 10 lines

{

Quoted 9 lines
Quoted 9 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c

Quoted 9 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +9 -0
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n",
+eclass->sched_props.preempt_timeout_min);
+}
+
+static struct kobj_attribute preempt_timeout_min_attr =
+	__ATTR(preempt_timeout_min, 0644,

preempt_timeout_min_show,

Quoted 46 lines
Quoted 46 lines
Quoted 46 lines
Quoted 46 lines
Quoted 46 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +14 -0
+	       preempt_timeout_min_store);
+
 static const struct attribute *defaults[] = {
 	&job_timeout_def.attr,
+	&job_timeout_min_def.attr,
+	&job_timeout_max_def.attr,
 	&timeslice_duration_def.attr,
+	&timeslice_duration_min_def.attr,
+	&timeslice_duration_max_def.attr,
 	&preempt_timeout_def.attr,
+	&preempt_timeout_min_def.attr,
+	&preempt_timeout_max_def.attr,
 	NULL
 };
 
 static const struct attribute *files[] = {
 	&job_timeout_attr.attr,
+	&job_timeout_min_attr.attr,
+	&job_timeout_max_attr.attr,
 	&timeslice_duration_attr.attr,
+	&timeslice_duration_min_attr.attr,
+	&timeslice_duration_max_attr.attr,
 	&preempt_timeout_attr.attr,
+	&preempt_timeout_min_attr.attr,
+	&preempt_timeout_max_attr.attr,
 	NULL
 };
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h +2 -0
index 757136614672..2e2ab351a991 100644
@@ -10,6 +10,8 @@
 
 #define MAX_ENGINE_CLASS_NAME_LEN    16
 int xe_hw_engine_class_sysfs_init(struct xe_gt *gt);
+bool enforce_schedule_limit(void); bool
+engine_timeout_in_range(u64 timeout, u64 min, u64 max);
 
 /**
  * struct kobj_eclass - A eclass's kobject struct that

connects the kobject and the
--
2.25.1

#20 lore raw

Re: [Intel-xe] [PATCH V9 6/6] drm/xe: Add min/max cap for engine scheduler properties

Quoted 569 lines

-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: Friday, July 28, 2023 7:54 PM
To: Upadhyay, Tejas <[email protected]>
Cc: Vishwanathapura, Niranjana <[email protected]>; [email protected]
Subject: Re: [PATCH V9 6/6] drm/xe: Add min/max cap for engine scheduler properties

Quoted 30 lines · Tejas
Quoted 30 lines

-----Original Message-----
From: Vishwanathapura, Niranjana <[email protected]>
Sent: Friday, July 28, 2023 11:56 AM
To: Upadhyay, Tejas <[email protected]>
Cc: Brost, Matthew <[email protected]>; intel- [email protected]
Subject: Re: [PATCH V9 6/6] drm/xe: Add min/max cap for engine scheduler properties

Quoted 6 lines · Tejas
Quoted 6 lines

-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: Friday, July 28, 2023 10:35 AM
To: Vishwanathapura, Niranjana

<[email protected]>

Quoted 10 lines
Quoted 10 lines

Cc: Upadhyay, Tejas <[email protected]>; intel- [email protected]
Subject: Re: [PATCH V9 6/6] drm/xe: Add min/max cap for engine scheduler properties

Quoted 2 lines · Niranjana Vishwanathapura
Quoted 1 line · Matthew Brost

On Thu, Jul 27, 2023 at 01:52:35PM +0530, Tejas Upadhyay wrote:

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

Add sysfs entries for the min, max, and defaults for each of engine scheduler controls for every hardware engine class.

Non-elevated user IOCTLs to set these controls must be within the min-max ranges of the sysfs entries, elevated user can set these controls to any value. However, introduced compile time CONFIG min-max values which restricts elevated user to be in compile time min-max range if at

all sysfs min/max are violated.

Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Sysfs entries examples are, DUT# cat

/sys/class/drm/cardX/device/tileN/gtN/engines/ccs/.defaults/

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

job_timeout_max job_timeout_ms

preempt_timeout_min

Quoted 9 lines
Quoted 9 lines
Quoted 2 lines
Quoted 2 lines

timeslice_duration_max timeslice_duration_us

Quoted 1 line
Quoted 1 line
Quoted 1 line

job_timeout_min preempt_timeout_max

preempt_timeout_us

Quoted 6 lines
Quoted 6 lines

timeslice_duration_min

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

DUT# cat /sys/class/drm/card1/device/tileN/gtN/engines/ccs/
.defaults/ job_timeout_min preempt_timeout_max

preempt_timeout_us timeslice_duration_min

Quoted 1 line
Quoted 1 line
Quoted 1 line

job_timeout_max job_timeout_ms

preempt_timeout_min

Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines

timeslice_duration_max timeslice_duration_us

Quoted 12 lines
Quoted 12 lines
Quoted 12 lines

V9 :
- Rebase to use s/xe_engine/xe_hw_engine/ - Matt
V8 :
- fix enforce_sched_limit and avoid code duplication - Niranjana
- Make sure min < max - Niranjana
V7 :
- Rebase to replace hw engine with eclass interface
- return EINVAL in place of EPERM
- Use some APIs to avoid code duplication
V6 :
- Rebase changes to reflect per engine class props interface -

MattB

Quoted 91 lines
Quoted 91 lines
Quoted 33 lines
Quoted 33 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines

- Use #if ENABLED - MattB
- Remove MAX_SCHED_TIMEOUT check as range validation is
enough
V5 :
- Rebase to resolve conflicts - CI
V4 :
- Rebase
- Update commit to reflect tile addition
- Use XE_HW macro directly as they are already filtered for CONFIG checks - Niranjana
- Add CONFIG for enable/disable min/max limitation on elevated user. Default is enable - Matt/Joonas
V3 :
- Resolve CI hooks warning for kernel-doc
V2 :
- Restric min/max setting to #define default min/max for elevated user - Himal
- Remove unrelated changes from patch - Niranjana

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
---
 drivers/gpu/drm/xe/Kconfig                    |   6 +
 drivers/gpu/drm/xe/Kconfig.profile            |  46 +++
 drivers/gpu/drm/xe/xe_engine.c                |  25 +-
 drivers/gpu/drm/xe/xe_hw_engine.c             |   8 +
 drivers/gpu/drm/xe/xe_hw_engine.h             |  31 ++
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 354

++++++++++++++++++

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h |   2 +
 7 files changed, 466 insertions(+), 6 deletions(-)  create

mode
100644 drivers/gpu/drm/xe/Kconfig.profile

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

drivers/gpu/drm/xe/Kconfig depends on DRM_XE depends on EXPERT

Quoted 7 lines
(quoted diff) +0 -0

b/drivers/gpu/drm/xe/Kconfig index
d44794f99338..0a4ea965645b
100644

drivers/gpu/drm/xe/Kconfig +0 -0
@@ -83,3 +83,9 @@ depends on DRM_XE  depends on EXPERT

source

Quoted 25 lines
Quoted 25 lines
Quoted 25 lines
Quoted 25 lines
Quoted 25 lines

"drivers/gpu/drm/xe/Kconfig.debug"
endmenu

drivers/gpu/drm/xe/Kconfig +6 -0
+
+menu "drm/xe Profile Guided Optimisation"
+	visible if EXPERT
+	depends on DRM_XE
+	source "drivers/gpu/drm/xe/Kconfig.profile"
+endmenu
drivers/gpu/drm/xe/Kconfig.profile new file +10 -0
new file mode 100644
index 000000000000..e72f15ec4bf6
@@ -0,0 +1,46 @@
+config DRM_XE_JOB_TIMEOUT_MAX
+       int "Default max job timeout (ms)"
+       default 10000 # milliseconds
+       help
+         Configures the default max job timeout after which job will
+         be forcefully taken away from scheduler.
+config DRM_XE_JOB_TIMEOUT_MIN
+       int "Default max job timeout (ms)"
+       default 1 # milliseconds
+       help
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/Kconfig.profile line 18

Quoted 8 lines
drivers/gpu/drm/xe/Kconfig.profile new file +8 -0
+         Configures the default min job timeout after which job will
+         be forcefully taken away from scheduler.
+config DRM_XE_TIMESLICE_MAX
+       int "Default max timeslice duration (us)"
+       default 10000000 # microseconds
+       help
+         Configures the default max timeslice duration
+between

multiple

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

drivers/gpu/drm/xe/Kconfig.profile line 25

Quoted 7 lines
drivers/gpu/drm/xe/Kconfig.profile new file +7 -0
+         contexts by guc scheduling.
+config DRM_XE_TIMESLICE_MIN
+       int "Default min timeslice duration (us)"
+       default 1 # microseconds
+       help
+         Configures the default min timeslice duration
+between

multiple

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

drivers/gpu/drm/xe/Kconfig.profile line 32

Quoted 7 lines
drivers/gpu/drm/xe/Kconfig.profile new file +7 -0
+         contexts by guc scheduling.
+config DRM_XE_PREEMPT_TIMEOUT_MAX
+       int "Default max  preempt timeout (us)"
+       default 10000000 # microseconds
+       help
+         Configures the default max preempt timeout after
+which

context

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/Kconfig.profile line 33

Quoted 1 line
drivers/gpu/drm/xe/Kconfig.profile new file +1 -0
+         will be forcefully taken away and higher priority context

will

Quoted 9 lines
Quoted 9 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

drivers/gpu/drm/xe/Kconfig.profile line 40

Quoted 7 lines
drivers/gpu/drm/xe/Kconfig.profile new file +7 -0
+         run.
+config DRM_XE_PREEMPT_TIMEOUT_MIN
+       int "Default min  preempt timeout (us)"
+       default 1 # microseconds
+       help
+         Configures the default min preempt timeout after
+which

context

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/gpu/drm/xe/Kconfig.profile new file +1 -0
+         will be forcefully taken away and higher priority context

will

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/Kconfig.profile line 44

Quoted 3 lines
drivers/gpu/drm/xe/Kconfig.profile new file +3 -0
+         run.
+config DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT
+       bool "Default configuration of limitation on scheduler

timeout"

Quoted 80 lines
Quoted 80 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/Kconfig.profile

Quoted 3 lines
drivers/gpu/drm/xe/Kconfig.profile new file +3 -0
+       default y
+       help
+	 Configures the enablement of limitation on scheduler

timeout

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/Kconfig.profile

Quoted 3 lines
drivers/gpu/drm/xe/Kconfig.profile new file +3 -0
+	 to apply to applicable user. For elevated user, all above MIN
+	 and MAX values will apply when this configuration is
+enable

to

Quoted 72 lines
Quoted 72 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
drivers/gpu/drm/xe/Kconfig.profile new file +1 -0
+	 apply limitation. By default limitation is applied.
(quoted diff) +0 -0

b/drivers/gpu/drm/xe/xe_engine.c index
9e167b113963..d934196eb79f
100644

drivers/gpu/drm/xe/xe_engine.c +0 -0
@@ -13,6 +13,7 @@
 
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/xe/xe_engine.c +1 -0
 #include "xe_device.h"
 #include "xe_gt.h"
+#include "xe_hw_engine_class_sysfs.h"
 #include "xe_hw_fence.h"
 #include "xe_lrc.h"
 #include "xe_macros.h"
@@ -191,8 +192,12 @@ static int engine_set_priority(struct

xe_device *xe, struct xe_engine *e, static int

engine_set_timeslice(struct xe_device *xe, struct xe_engine *e,

Quoted 14 lines
Quoted 14 lines

drivers/gpu/drm/xe/xe_engine.c

Quoted 5 lines
drivers/gpu/drm/xe/xe_engine.c +2 -2
 				u64 value, bool create)  {
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	u32 min = e->hwe->eclass->sched_props.timeslice_min;
+	u32 max = e->hwe->eclass->sched_props.timeslice_max;

So I screwed this up in my last comment, sorry.

min = cap_nice ? KConfig option for min :
e->hwe->eclass->sched_props.timeslice_min;
same logic for max;

Probably add helper for this.

Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_engine.c

Quoted 3 lines
drivers/gpu/drm/xe/xe_engine.c +3 -0
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))

Then I think logic works too...

if cap nice && !Kconfig option to enfore limits
(enforce_schedule_limit

returns false):

Quoted 11 lines
Quoted 8 lines

user can do whatever
else if cap nice
user within Kconfig range
else
user within sysfs range

This is what we want in the end.

Matt, I think this is exactly what the previous revision of the patch was

doing.

Quoted 1 line

No... Previous version

min = Kconfig option to enfore limits ? KConfig option for min :
e->hwe-

Quoted 1 line

eclass->sched_props.timeslice_min

same for max

Results in:

if cap nice && !Kconfig option to enfore limits (enforce_schedule_limit returns false):
user can do whatever
else if cap_nice || Kconfig option to enfore limit
user within Kconfig range
else
user within sysfs range

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines

!cap_nice && Kconfig option to enfore limits == user within Kconfig range
(previously) !cap_nice && Kconfig option to enfore limits == user within sysfs range (my suggestion)

In previous version we can achieve it by just adding one below check

right?

Quoted 30 lines
Quoted 30 lines
Quoted 1 line

#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT) &&

cap_nice

Quoted 8 lines
(quoted diff) +5 -0
+       u32 min = XE_HW_ENGINE_TIMESLICE_MIN;
+       u32 max = XE_HW_ENGINE_TIMESLICE_MAX; #else
+       u32 min = e->hwe->eclass->sched_props.timeslice_min;
+       u32 max = e->hwe->eclass->sched_props.timeslice_max;
+#endif

Please let me know!

Ah I see. Yah, it is a limits selection issue. We can do,

u32 min = e->hwe->eclass->sched_props.timeslice_min; u32 max = e->hwe->eclass->sched_props.timeslice_max;

#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
         if (cap_nice) {
                 u32 min = XE_HW_ENGINE_TIMESLICE_MIN;
                 u32 max = XE_HW_ENGINE_TIMESLICE_MAX;
         }

#endif

Matt, Tejas
Also, looks like you missed my another comment below.

Niranjana

Quoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

The logic is different and I believe we want what I'm suggesting.

Matt

Quoted 4 lines
Quoted 4 lines

drivers/gpu/drm/xe/xe_engine.c

Quoted 4 lines
drivers/gpu/drm/xe/xe_engine.c +2 -0
+		return -EINVAL;
 
 	return e->ops->set_timeslice(e, value);  } @@ -201,8
+206,12 @@ static int engine_set_preemption_timeout(struct

xe_device *xe,

Quoted 86 lines
Quoted 86 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

struct xe_engine *e, u64

value,

Quoted 6 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

drivers/gpu/drm/xe/xe_engine.c

Quoted 5 lines
drivers/gpu/drm/xe/xe_engine.c +1 -2
 					 bool create)
 {
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	u32 min = e->hwe->eclass-

sched_props.preempt_timeout_min;

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_engine.c

Quoted 1 line
drivers/gpu/drm/xe/xe_engine.c +1 -0
+	u32 max = e->hwe->eclass-

sched_props.preempt_timeout_max;

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/xe/xe_engine.c

Quoted 6 lines
drivers/gpu/drm/xe/xe_engine.c +4 -0
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))
+		return -EINVAL;
 
 	return e->ops->set_preempt_timeout(e, value);  } @@ -

266,11

Quoted 28 lines
Quoted 28 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

+275,15 @@ static int engine_set_persistence(struct +xe_device *xe,
struct xe_engine *e, static int engine_set_job_timeout(struct xe_device

*xe, struct xe_engine *e,

Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
drivers/gpu/drm/xe/xe_engine.c +6 -2
 				  u64 value, bool create)  {
+	u32 min = e->hwe->eclass->sched_props.job_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.job_timeout_max;
+
 	if (XE_IOCTL_DBG(xe, !create))
 		return -EINVAL;
 
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))
+		return -EINVAL;
 
 	return e->ops->set_job_timeout(e, value);  } diff --git

a/drivers/gpu/drm/xe/xe_hw_engine.c
b/drivers/gpu/drm/xe/xe_hw_engine.c
index afa7d25c3852..e601bffe3b13 100644

drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
@@ -364,8 +364,16 @@ static void

hw_engine_init_early(struct xe_gt *gt, struct xe_hw_engine *hwe,

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.c

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
 	if (!gt->eclass[hwe->class].sched_props.job_timeout_ms) {
 		gt->eclass[hwe->class].sched_props.job_timeout_ms

= HZ *

Quoted 8 lines
Quoted 2 lines

5;

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine.c

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+		gt->eclass[hwe-

class].sched_props.job_timeout_min =

Quoted 2 lines

XE_HW_ENGINE_JOB_TIMEOUT_MIN;

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine.c

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+		gt->eclass[hwe-

class].sched_props.job_timeout_max =

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+XE_HW_ENGINE_JOB_TIMEOUT_MAX;
 		gt->eclass[hwe->class].sched_props.timeslice_us = 1

* 1000;

Quoted 29 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine.c

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+		gt->eclass[hwe->class].sched_props.timeslice_min =

XE_HW_ENGINE_TIMESLICE_MIN;

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine.c

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine.c +2 -0
+		gt->eclass[hwe->class].sched_props.timeslice_max =
+XE_HW_ENGINE_TIMESLICE_MAX;
 		gt->eclass[hwe-

class].sched_props.preempt_timeout_us =

Quoted 3 lines

640 *

Quoted 2 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.c

Quoted 2 lines

1000;

drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+		gt->eclass[hwe-

class].sched_props.preempt_timeout_min =

Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

+

	XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN;
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine.c

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+		gt->eclass[hwe-

class].sched_props.preempt_timeout_max =

Quoted 15 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

+

	XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX;
Quoted 13 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.c

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
 		/* Record default props */
 		gt->eclass[hwe->class].defaults = gt->eclass[hwe-

class].sched_props;

Quoted 10 lines
Quoted 10 lines
drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
 	}
drivers/gpu/drm/xe/xe_hw_engine.h +0 -0
index 7eca9d53c7b1..3d37d6d44261 100644
@@ -10,6 +10,37 @@
 
 struct drm_printer;
 
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.h line 14

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.h +2 -0
+#ifdef CONFIG_DRM_XE_JOB_TIMEOUT_MIN #define
+XE_HW_ENGINE_JOB_TIMEOUT_MIN

CONFIG_DRM_XE_JOB_TIMEOUT_MIN #else

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine.h line 17

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine.h +3 -0
+#define XE_HW_ENGINE_JOB_TIMEOUT_MIN 1 #endif #ifdef
+CONFIG_DRM_XE_JOB_TIMEOUT_MAX #define
+XE_HW_ENGINE_JOB_TIMEOUT_MAX

CONFIG_DRM_XE_JOB_TIMEOUT_MAX #else

Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.h +1 -0
+#define XE_HW_ENGINE_JOB_TIMEOUT_MAX (10 * 1000)

#endif

Quoted 33 lines
Quoted 33 lines

#ifdef

Quoted 6 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine.h line 19

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.h +1 -0
+CONFIG_DRM_XE_TIMESLICE_MIN #define

XE_HW_ENGINE_TIMESLICE_MIN

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine.h line 22

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine.h +3 -0
+CONFIG_DRM_XE_TIMESLICE_MIN #else #define
+XE_HW_ENGINE_TIMESLICE_MIN 1 #endif #ifdef
+CONFIG_DRM_XE_TIMESLICE_MAX #define

XE_HW_ENGINE_TIMESLICE_MAX

Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines

drivers/gpu/drm/xe/xe_hw_engine.h line 32

Quoted 10 lines
drivers/gpu/drm/xe/xe_hw_engine.h +10 -0
+CONFIG_DRM_XE_TIMESLICE_MAX #else #define
+XE_HW_ENGINE_TIMESLICE_MAX (10 * 1000 * 1000) #endif
+#ifdef CONFIG_DRM_XE_PREEMPT_TIMEOUT_MIN #define
+XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MIN #else #define
+XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN 1 #endif #ifdef
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MAX
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MAX #else #define
+XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX (10 * 1000 * 1000)

#endif

Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
drivers/gpu/drm/xe/xe_hw_engine.h +1 -0
+
 int xe_hw_engines_init_early(struct xe_gt *gt);  int

xe_hw_engines_init(struct xe_gt *gt); void xe_hw_engine_handle_irq(struct xe_hw_engine *hwe, u16 intr_vec); 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 990bb675d1e0..2b7ac4e02db6 100644

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
@@ -11,6 +11,20 @@
 
 static int xe_add_hw_engine_class_defaults(struct kobject
 *parent);
 
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c line 21

Quoted 7 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +7 -0
+bool enforce_schedule_limit(void) { #if
+IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	return true;
+#else
+	return !capable(CAP_SYS_NICE); #endif }
+
+bool engine_timeout_in_range(u64 timeout, u64 min, u64 max)

{

Quoted 93 lines
Quoted 93 lines
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 5 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject

Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +2 -0
+	return timeout >= min && timeout <= max; }
+
 static void kobj_xe_hw_engine_release(struct kobject *kobj)  {
 	kfree(kobj);
@@ -39,11 +53,92 @@ kobj_xe_hw_engine_class(struct kobject

*parent, char *name)

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 59

Quoted 7 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +4 -0
 	return keclass;
 }
 
+static ssize_t job_timeout_max_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);

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	u32 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 72

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+		return err;
+
+	if (timeout < eclass->sched_props.job_timeout_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+

XE_HW_ENGINE_JOB_TIMEOUT_MIN,

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 73

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +1 -0
+

XE_HW_ENGINE_JOB_TIMEOUT_MAX))

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 76

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +3 -0
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.job_timeout_max,

timeout);

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 82

Quoted 6 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +6 -0
+
+	return count;
+}
+
+static ssize_t job_timeout_max_show(struct kobject *kobj,
+				    struct kobj_attribute *attr, char

*buf) {

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +7 -0
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n",
+eclass->sched_props.job_timeout_max);
+}
+
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 97

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+static struct kobj_attribute job_timeout_max_attr =
+__ATTR(job_timeout_max, 0644, job_timeout_max_show,
+job_timeout_max_store);
+
+static ssize_t job_timeout_min_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);

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	u32 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 110

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+		return err;
+
+	if (timeout > eclass->sched_props.job_timeout_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+

XE_HW_ENGINE_JOB_TIMEOUT_MIN,

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 111

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +1 -0
+

XE_HW_ENGINE_JOB_TIMEOUT_MAX))

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 114

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +3 -0
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.job_timeout_min,

timeout);

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 120

Quoted 6 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +6 -0
+
+	return count;
+}
+
+static ssize_t job_timeout_min_show(struct kobject *kobj,
+				    struct kobj_attribute *attr, char

*buf) {

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +9 -0
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n",
+eclass->sched_props.job_timeout_min);
+}
+
+static struct kobj_attribute job_timeout_min_attr =
+__ATTR(job_timeout_min, 0644, job_timeout_min_show,
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 137

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +3 -0
+job_timeout_min_store);
+
 static ssize_t job_timeout_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);
+#if

IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)

Quoted 18 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 10 lines
Quoted 9 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 142

Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	u32 min = XE_HW_ENGINE_JOB_TIMEOUT_MIN;
+	u32 max = XE_HW_ENGINE_JOB_TIMEOUT_MAX; #else
+	u32 min = e->hwe->eclass->sched_props.job_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.job_timeout_max;
+#endif

I don't think we need this, just make sure default is within min / max of the sched_props.

Quoted 4 lines

Shouldn't the sched_prop set through sysfs here which applies to all future user engines (xe_engine) has the same requirement as the sched_prop set directly to user engine (xe_engine) through set_properly

ioctl?

Quoted 2 lines

2 lines not shown · raw message

Quoted 7 lines

6 lines not shown · raw message

425 lines not shown · raw message

Part of this message is not shown here. View the raw message.

#21 lore raw

Re: [Intel-xe] [PATCH V9 6/6] drm/xe: Add min/max cap for engine scheduler properties

Quoted 570 lines · Tejas
Quoted 570 lines

-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: Friday, July 28, 2023 7:54 PM
To: Upadhyay, Tejas <[email protected]>
Cc: Vishwanathapura, Niranjana <[email protected]>; [email protected]
Subject: Re: [PATCH V9 6/6] drm/xe: Add min/max cap for engine scheduler properties

Quoted 30 lines · Tejas
Quoted 30 lines

-----Original Message-----
From: Vishwanathapura, Niranjana <[email protected]>
Sent: Friday, July 28, 2023 11:56 AM
To: Upadhyay, Tejas <[email protected]>
Cc: Brost, Matthew <[email protected]>; intel- [email protected]
Subject: Re: [PATCH V9 6/6] drm/xe: Add min/max cap for engine scheduler properties

Quoted 6 lines · Tejas
Quoted 6 lines

-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: Friday, July 28, 2023 10:35 AM
To: Vishwanathapura, Niranjana

<[email protected]>

Quoted 10 lines
Quoted 10 lines

Cc: Upadhyay, Tejas <[email protected]>; intel- [email protected]
Subject: Re: [PATCH V9 6/6] drm/xe: Add min/max cap for engine scheduler properties

Quoted 2 lines · Niranjana Vishwanathapura
Quoted 1 line · Matthew Brost

On Thu, Jul 27, 2023 at 01:52:35PM +0530, Tejas Upadhyay wrote:

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

Add sysfs entries for the min, max, and defaults for each of engine scheduler controls for every hardware engine class.

Non-elevated user IOCTLs to set these controls must be within the min-max ranges of the sysfs entries, elevated user can set these controls to any value. However, introduced compile time CONFIG min-max values which restricts elevated user to be in compile time min-max range if at

all sysfs min/max are violated.

Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Sysfs entries examples are, DUT# cat

/sys/class/drm/cardX/device/tileN/gtN/engines/ccs/.defaults/

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

job_timeout_max job_timeout_ms

preempt_timeout_min

Quoted 9 lines
Quoted 9 lines
Quoted 2 lines
Quoted 2 lines

timeslice_duration_max timeslice_duration_us

Quoted 1 line
Quoted 1 line
Quoted 1 line

job_timeout_min preempt_timeout_max

preempt_timeout_us

Quoted 6 lines
Quoted 6 lines

timeslice_duration_min

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

DUT# cat /sys/class/drm/card1/device/tileN/gtN/engines/ccs/
.defaults/ job_timeout_min preempt_timeout_max

preempt_timeout_us timeslice_duration_min

Quoted 1 line
Quoted 1 line
Quoted 1 line

job_timeout_max job_timeout_ms

preempt_timeout_min

Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines

timeslice_duration_max timeslice_duration_us

Quoted 12 lines
Quoted 12 lines
Quoted 12 lines

V9 :
- Rebase to use s/xe_engine/xe_hw_engine/ - Matt
V8 :
- fix enforce_sched_limit and avoid code duplication - Niranjana
- Make sure min < max - Niranjana
V7 :
- Rebase to replace hw engine with eclass interface
- return EINVAL in place of EPERM
- Use some APIs to avoid code duplication
V6 :
- Rebase changes to reflect per engine class props interface -

MattB

Quoted 91 lines
Quoted 91 lines
Quoted 33 lines
Quoted 33 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines

- Use #if ENABLED - MattB
- Remove MAX_SCHED_TIMEOUT check as range validation is
enough
V5 :
- Rebase to resolve conflicts - CI
V4 :
- Rebase
- Update commit to reflect tile addition
- Use XE_HW macro directly as they are already filtered for CONFIG checks - Niranjana
- Add CONFIG for enable/disable min/max limitation on elevated user. Default is enable - Matt/Joonas
V3 :
- Resolve CI hooks warning for kernel-doc
V2 :
- Restric min/max setting to #define default min/max for elevated user - Himal
- Remove unrelated changes from patch - Niranjana

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
---
 drivers/gpu/drm/xe/Kconfig                    |   6 +
 drivers/gpu/drm/xe/Kconfig.profile            |  46 +++
 drivers/gpu/drm/xe/xe_engine.c                |  25 +-
 drivers/gpu/drm/xe/xe_hw_engine.c             |   8 +
 drivers/gpu/drm/xe/xe_hw_engine.h             |  31 ++
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 354

++++++++++++++++++

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h |   2 +
 7 files changed, 466 insertions(+), 6 deletions(-)  create

mode
100644 drivers/gpu/drm/xe/Kconfig.profile

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

drivers/gpu/drm/xe/Kconfig depends on DRM_XE depends on EXPERT

Quoted 7 lines
(quoted diff) +0 -0

b/drivers/gpu/drm/xe/Kconfig index
d44794f99338..0a4ea965645b
100644

drivers/gpu/drm/xe/Kconfig +0 -0
@@ -83,3 +83,9 @@ depends on DRM_XE  depends on EXPERT

source

Quoted 25 lines
Quoted 25 lines
Quoted 25 lines
Quoted 25 lines
Quoted 25 lines

"drivers/gpu/drm/xe/Kconfig.debug"
endmenu

drivers/gpu/drm/xe/Kconfig +6 -0
+
+menu "drm/xe Profile Guided Optimisation"
+	visible if EXPERT
+	depends on DRM_XE
+	source "drivers/gpu/drm/xe/Kconfig.profile"
+endmenu
drivers/gpu/drm/xe/Kconfig.profile new file +10 -0
new file mode 100644
index 000000000000..e72f15ec4bf6
@@ -0,0 +1,46 @@
+config DRM_XE_JOB_TIMEOUT_MAX
+       int "Default max job timeout (ms)"
+       default 10000 # milliseconds
+       help
+         Configures the default max job timeout after which job will
+         be forcefully taken away from scheduler.
+config DRM_XE_JOB_TIMEOUT_MIN
+       int "Default max job timeout (ms)"
+       default 1 # milliseconds
+       help
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/Kconfig.profile line 18

Quoted 8 lines
drivers/gpu/drm/xe/Kconfig.profile new file +8 -0
+         Configures the default min job timeout after which job will
+         be forcefully taken away from scheduler.
+config DRM_XE_TIMESLICE_MAX
+       int "Default max timeslice duration (us)"
+       default 10000000 # microseconds
+       help
+         Configures the default max timeslice duration
+between

multiple

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

drivers/gpu/drm/xe/Kconfig.profile line 25

Quoted 7 lines
drivers/gpu/drm/xe/Kconfig.profile new file +7 -0
+         contexts by guc scheduling.
+config DRM_XE_TIMESLICE_MIN
+       int "Default min timeslice duration (us)"
+       default 1 # microseconds
+       help
+         Configures the default min timeslice duration
+between

multiple

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

drivers/gpu/drm/xe/Kconfig.profile line 32

Quoted 7 lines
drivers/gpu/drm/xe/Kconfig.profile new file +7 -0
+         contexts by guc scheduling.
+config DRM_XE_PREEMPT_TIMEOUT_MAX
+       int "Default max  preempt timeout (us)"
+       default 10000000 # microseconds
+       help
+         Configures the default max preempt timeout after
+which

context

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/Kconfig.profile line 33

Quoted 1 line
drivers/gpu/drm/xe/Kconfig.profile new file +1 -0
+         will be forcefully taken away and higher priority context

will

Quoted 9 lines
Quoted 9 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

drivers/gpu/drm/xe/Kconfig.profile line 40

Quoted 7 lines
drivers/gpu/drm/xe/Kconfig.profile new file +7 -0
+         run.
+config DRM_XE_PREEMPT_TIMEOUT_MIN
+       int "Default min  preempt timeout (us)"
+       default 1 # microseconds
+       help
+         Configures the default min preempt timeout after
+which

context

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/gpu/drm/xe/Kconfig.profile new file +1 -0
+         will be forcefully taken away and higher priority context

will

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/Kconfig.profile line 44

Quoted 3 lines
drivers/gpu/drm/xe/Kconfig.profile new file +3 -0
+         run.
+config DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT
+       bool "Default configuration of limitation on scheduler

timeout"

Quoted 80 lines
Quoted 80 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/Kconfig.profile

Quoted 3 lines
drivers/gpu/drm/xe/Kconfig.profile new file +3 -0
+       default y
+       help
+	 Configures the enablement of limitation on scheduler

timeout

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/Kconfig.profile

Quoted 3 lines
drivers/gpu/drm/xe/Kconfig.profile new file +3 -0
+	 to apply to applicable user. For elevated user, all above MIN
+	 and MAX values will apply when this configuration is
+enable

to

Quoted 72 lines
Quoted 72 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
drivers/gpu/drm/xe/Kconfig.profile new file +1 -0
+	 apply limitation. By default limitation is applied.
(quoted diff) +0 -0

b/drivers/gpu/drm/xe/xe_engine.c index
9e167b113963..d934196eb79f
100644

drivers/gpu/drm/xe/xe_engine.c +0 -0
@@ -13,6 +13,7 @@
 
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/xe/xe_engine.c +1 -0
 #include "xe_device.h"
 #include "xe_gt.h"
+#include "xe_hw_engine_class_sysfs.h"
 #include "xe_hw_fence.h"
 #include "xe_lrc.h"
 #include "xe_macros.h"
@@ -191,8 +192,12 @@ static int engine_set_priority(struct

xe_device *xe, struct xe_engine *e, static int

engine_set_timeslice(struct xe_device *xe, struct xe_engine *e,

Quoted 14 lines
Quoted 14 lines

drivers/gpu/drm/xe/xe_engine.c

Quoted 5 lines
drivers/gpu/drm/xe/xe_engine.c +2 -2
 				u64 value, bool create)  {
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	u32 min = e->hwe->eclass->sched_props.timeslice_min;
+	u32 max = e->hwe->eclass->sched_props.timeslice_max;

So I screwed this up in my last comment, sorry.

min = cap_nice ? KConfig option for min :
e->hwe->eclass->sched_props.timeslice_min;
same logic for max;

Probably add helper for this.

Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_engine.c

Quoted 3 lines
drivers/gpu/drm/xe/xe_engine.c +3 -0
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))

Then I think logic works too...

if cap nice && !Kconfig option to enfore limits
(enforce_schedule_limit

returns false):

Quoted 11 lines
Quoted 8 lines

user can do whatever
else if cap nice
user within Kconfig range
else
user within sysfs range

This is what we want in the end.

Matt, I think this is exactly what the previous revision of the patch was

doing.

Quoted 1 line

No... Previous version

min = Kconfig option to enfore limits ? KConfig option for min :
e->hwe-

Quoted 1 line

eclass->sched_props.timeslice_min

same for max

Results in:

if cap nice && !Kconfig option to enfore limits (enforce_schedule_limit returns false):
user can do whatever
else if cap_nice || Kconfig option to enfore limit
user within Kconfig range
else
user within sysfs range

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines

!cap_nice && Kconfig option to enfore limits == user within Kconfig range
(previously) !cap_nice && Kconfig option to enfore limits == user within sysfs range (my suggestion)

In previous version we can achieve it by just adding one below check

right?

Quoted 30 lines
Quoted 30 lines
Quoted 1 line

#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT) &&

cap_nice

Quoted 8 lines
(quoted diff) +5 -0
+       u32 min = XE_HW_ENGINE_TIMESLICE_MIN;
+       u32 max = XE_HW_ENGINE_TIMESLICE_MAX; #else
+       u32 min = e->hwe->eclass->sched_props.timeslice_min;
+       u32 max = e->hwe->eclass->sched_props.timeslice_max;
+#endif

Please let me know!

Ah I see. Yah, it is a limits selection issue. We can do,

u32 min = e->hwe->eclass->sched_props.timeslice_min; u32 max = e->hwe->eclass->sched_props.timeslice_max;

#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
         if (cap_nice) {
                 u32 min = XE_HW_ENGINE_TIMESLICE_MIN;
                 u32 max = XE_HW_ENGINE_TIMESLICE_MAX;
         }

#endif

Matt, Tejas
Also, looks like you missed my another comment below.

Niranjana

Quoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

The logic is different and I believe we want what I'm suggesting.

Matt

Quoted 4 lines
Quoted 4 lines

drivers/gpu/drm/xe/xe_engine.c

Quoted 4 lines
drivers/gpu/drm/xe/xe_engine.c +2 -0
+		return -EINVAL;
 
 	return e->ops->set_timeslice(e, value);  } @@ -201,8
+206,12 @@ static int engine_set_preemption_timeout(struct

xe_device *xe,

Quoted 86 lines
Quoted 86 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

struct xe_engine *e, u64

value,

Quoted 6 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

drivers/gpu/drm/xe/xe_engine.c

Quoted 5 lines
drivers/gpu/drm/xe/xe_engine.c +1 -2
 					 bool create)
 {
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	u32 min = e->hwe->eclass-

sched_props.preempt_timeout_min;

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_engine.c

Quoted 1 line
drivers/gpu/drm/xe/xe_engine.c +1 -0
+	u32 max = e->hwe->eclass-

sched_props.preempt_timeout_max;

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/xe/xe_engine.c

Quoted 6 lines
drivers/gpu/drm/xe/xe_engine.c +4 -0
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))
+		return -EINVAL;
 
 	return e->ops->set_preempt_timeout(e, value);  } @@ -

266,11

Quoted 28 lines
Quoted 28 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

+275,15 @@ static int engine_set_persistence(struct +xe_device *xe,
struct xe_engine *e, static int engine_set_job_timeout(struct xe_device

*xe, struct xe_engine *e,

Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
drivers/gpu/drm/xe/xe_engine.c +6 -2
 				  u64 value, bool create)  {
+	u32 min = e->hwe->eclass->sched_props.job_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.job_timeout_max;
+
 	if (XE_IOCTL_DBG(xe, !create))
 		return -EINVAL;
 
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))
+		return -EINVAL;
 
 	return e->ops->set_job_timeout(e, value);  } diff --git

a/drivers/gpu/drm/xe/xe_hw_engine.c
b/drivers/gpu/drm/xe/xe_hw_engine.c
index afa7d25c3852..e601bffe3b13 100644

drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
@@ -364,8 +364,16 @@ static void

hw_engine_init_early(struct xe_gt *gt, struct xe_hw_engine *hwe,

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.c

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
 	if (!gt->eclass[hwe->class].sched_props.job_timeout_ms) {
 		gt->eclass[hwe->class].sched_props.job_timeout_ms

= HZ *

Quoted 8 lines
Quoted 2 lines

5;

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine.c

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+		gt->eclass[hwe-

class].sched_props.job_timeout_min =

Quoted 2 lines

XE_HW_ENGINE_JOB_TIMEOUT_MIN;

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine.c

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+		gt->eclass[hwe-

class].sched_props.job_timeout_max =

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+XE_HW_ENGINE_JOB_TIMEOUT_MAX;
 		gt->eclass[hwe->class].sched_props.timeslice_us = 1

* 1000;

Quoted 29 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine.c

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+		gt->eclass[hwe->class].sched_props.timeslice_min =

XE_HW_ENGINE_TIMESLICE_MIN;

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine.c

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine.c +2 -0
+		gt->eclass[hwe->class].sched_props.timeslice_max =
+XE_HW_ENGINE_TIMESLICE_MAX;
 		gt->eclass[hwe-

class].sched_props.preempt_timeout_us =

Quoted 3 lines

640 *

Quoted 2 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.c

Quoted 2 lines

1000;

drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+		gt->eclass[hwe-

class].sched_props.preempt_timeout_min =

Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

+

	XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN;
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine.c

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+		gt->eclass[hwe-

class].sched_props.preempt_timeout_max =

Quoted 15 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

+

	XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX;
Quoted 13 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.c

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
 		/* Record default props */
 		gt->eclass[hwe->class].defaults = gt->eclass[hwe-

class].sched_props;

Quoted 10 lines
Quoted 10 lines
drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
 	}
drivers/gpu/drm/xe/xe_hw_engine.h +0 -0
index 7eca9d53c7b1..3d37d6d44261 100644
@@ -10,6 +10,37 @@
 
 struct drm_printer;
 
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.h line 14

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.h +2 -0
+#ifdef CONFIG_DRM_XE_JOB_TIMEOUT_MIN #define
+XE_HW_ENGINE_JOB_TIMEOUT_MIN

CONFIG_DRM_XE_JOB_TIMEOUT_MIN #else

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine.h line 17

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine.h +3 -0
+#define XE_HW_ENGINE_JOB_TIMEOUT_MIN 1 #endif #ifdef
+CONFIG_DRM_XE_JOB_TIMEOUT_MAX #define
+XE_HW_ENGINE_JOB_TIMEOUT_MAX

CONFIG_DRM_XE_JOB_TIMEOUT_MAX #else

Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.h +1 -0
+#define XE_HW_ENGINE_JOB_TIMEOUT_MAX (10 * 1000)

#endif

Quoted 33 lines
Quoted 33 lines

#ifdef

Quoted 6 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine.h line 19

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.h +1 -0
+CONFIG_DRM_XE_TIMESLICE_MIN #define

XE_HW_ENGINE_TIMESLICE_MIN

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine.h line 22

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine.h +3 -0
+CONFIG_DRM_XE_TIMESLICE_MIN #else #define
+XE_HW_ENGINE_TIMESLICE_MIN 1 #endif #ifdef
+CONFIG_DRM_XE_TIMESLICE_MAX #define

XE_HW_ENGINE_TIMESLICE_MAX

Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines

drivers/gpu/drm/xe/xe_hw_engine.h line 32

Quoted 10 lines
drivers/gpu/drm/xe/xe_hw_engine.h +10 -0
+CONFIG_DRM_XE_TIMESLICE_MAX #else #define
+XE_HW_ENGINE_TIMESLICE_MAX (10 * 1000 * 1000) #endif
+#ifdef CONFIG_DRM_XE_PREEMPT_TIMEOUT_MIN #define
+XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MIN #else #define
+XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN 1 #endif #ifdef
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MAX
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MAX #else #define
+XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX (10 * 1000 * 1000)

#endif

Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
drivers/gpu/drm/xe/xe_hw_engine.h +1 -0
+
 int xe_hw_engines_init_early(struct xe_gt *gt);  int

xe_hw_engines_init(struct xe_gt *gt); void xe_hw_engine_handle_irq(struct xe_hw_engine *hwe, u16 intr_vec); 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 990bb675d1e0..2b7ac4e02db6 100644

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
@@ -11,6 +11,20 @@
 
 static int xe_add_hw_engine_class_defaults(struct kobject
 *parent);
 
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c line 21

Quoted 7 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +7 -0
+bool enforce_schedule_limit(void) { #if
+IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	return true;
+#else
+	return !capable(CAP_SYS_NICE); #endif }
+
+bool engine_timeout_in_range(u64 timeout, u64 min, u64 max)

{

Quoted 93 lines
Quoted 93 lines
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 5 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject

Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +2 -0
+	return timeout >= min && timeout <= max; }
+
 static void kobj_xe_hw_engine_release(struct kobject *kobj)  {
 	kfree(kobj);
@@ -39,11 +53,92 @@ kobj_xe_hw_engine_class(struct kobject

*parent, char *name)

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 59

Quoted 7 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +4 -0
 	return keclass;
 }
 
+static ssize_t job_timeout_max_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);

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	u32 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 72

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+		return err;
+
+	if (timeout < eclass->sched_props.job_timeout_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+

XE_HW_ENGINE_JOB_TIMEOUT_MIN,

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 73

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +1 -0
+

XE_HW_ENGINE_JOB_TIMEOUT_MAX))

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 76

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +3 -0
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.job_timeout_max,

timeout);

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 82

Quoted 6 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +6 -0
+
+	return count;
+}
+
+static ssize_t job_timeout_max_show(struct kobject *kobj,
+				    struct kobj_attribute *attr, char

*buf) {

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +7 -0
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n",
+eclass->sched_props.job_timeout_max);
+}
+
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 97

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+static struct kobj_attribute job_timeout_max_attr =
+__ATTR(job_timeout_max, 0644, job_timeout_max_show,
+job_timeout_max_store);
+
+static ssize_t job_timeout_min_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);

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	u32 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 110

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+		return err;
+
+	if (timeout > eclass->sched_props.job_timeout_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+

XE_HW_ENGINE_JOB_TIMEOUT_MIN,

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 111

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +1 -0
+

XE_HW_ENGINE_JOB_TIMEOUT_MAX))

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 114

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +3 -0
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.job_timeout_min,

timeout);

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 120

Quoted 6 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +6 -0
+
+	return count;
+}
+
+static ssize_t job_timeout_min_show(struct kobject *kobj,
+				    struct kobj_attribute *attr, char

*buf) {

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +9 -0
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n",
+eclass->sched_props.job_timeout_min);
+}
+
+static struct kobj_attribute job_timeout_min_attr =
+__ATTR(job_timeout_min, 0644, job_timeout_min_show,
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 137

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +3 -0
+job_timeout_min_store);
+
 static ssize_t job_timeout_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);
+#if

IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)

Quoted 19 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 9 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject · line 142

Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	u32 min = XE_HW_ENGINE_JOB_TIMEOUT_MIN;
+	u32 max = XE_HW_ENGINE_JOB_TIMEOUT_MAX; #else
+	u32 min = e->hwe->eclass->sched_props.job_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.job_timeout_max;
+#endif

I don't think we need this, just make sure default is within min / max of the sched_props.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines

Shouldn't the sched_prop set through sysfs here which applies to all future user engines (xe_engine) has the same requirement as the sched_prop set directly to user engine (xe_engine) through set_properly

ioctl?

Quoted 2 lines

ie., shoudln't the requirement be same in job_timeout_store() and engine_set_job_timeout()?

I also think it should apply same to sysfs calls as well. Unless we think sysfs

Quoted 9 lines

7 lines not shown · raw message

428 lines not shown · raw message

Part of this message is not shown here. View the raw message.

maintainer
#22 lore raw

Re: [Intel-xe] [PATCH V9 6/6] drm/xe: Add min/max cap for engine scheduler properties

In reply to Niranjana Vishwanathapura
Quoted 242 lines · Niranjana Vishwanathapura
Quoted 227 lines · Tejas
Quoted 214 lines

-----Original Message-----
From: Brost, Matthew <[email protected]>
Sent: Friday, July 28, 2023 10:35 AM
To: Vishwanathapura, Niranjana <[email protected]>
Cc: Upadhyay, Tejas <[email protected]>; intel- [email protected]
Subject: Re: [PATCH V9 6/6] drm/xe: Add min/max cap for engine scheduler properties

Quoted 11 lines · Niranjana Vishwanathapura
Quoted 10 lines · Matthew Brost
Quoted 9 lines · Tejas Upadhyay

Add sysfs entries for the min, max, and defaults for each of engine scheduler controls for every hardware engine class.

Non-elevated user IOCTLs to set these controls must be within the min-max ranges of the sysfs entries, elevated user can set these controls to any value. However, introduced compile time CONFIG min-max values which restricts elevated user to be in compile time min-max range if at all sysfs min/max are violated.

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Sysfs entries examples are,
DUT# cat /sys/class/drm/cardX/device/tileN/gtN/engines/ccs/.defaults/
job_timeout_max job_timeout_ms preempt_timeout_min

timeslice_duration_max timeslice_duration_us

Quoted 1 line
Quoted 1 line
Quoted 1 line

job_timeout_min preempt_timeout_max preempt_timeout_us

timeslice_duration_min

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

DUT# cat /sys/class/drm/card1/device/tileN/gtN/engines/ccs/
.defaults/ job_timeout_min preempt_timeout_max

preempt_timeout_us timeslice_duration_min

Quoted 1 line
Quoted 1 line
Quoted 1 line

job_timeout_max job_timeout_ms preempt_timeout_min

timeslice_duration_max timeslice_duration_us

Quoted 30 lines
Quoted 30 lines
Quoted 30 lines

V9 :
- Rebase to use s/xe_engine/xe_hw_engine/ - Matt
V8 :
- fix enforce_sched_limit and avoid code duplication - Niranjana
- Make sure min < max - Niranjana
V7 :
- Rebase to replace hw engine with eclass interface
- return EINVAL in place of EPERM
- Use some APIs to avoid code duplication
V6 :
- Rebase changes to reflect per engine class props interface - MattB
- Use #if ENABLED - MattB
- Remove MAX_SCHED_TIMEOUT check as range validation is enough
V5 :
- Rebase to resolve conflicts - CI
V4 :
- Rebase
- Update commit to reflect tile addition
- Use XE_HW macro directly as they are already filtered for CONFIG checks - Niranjana
- Add CONFIG for enable/disable min/max limitation
on elevated user. Default is enable - Matt/Joonas
V3 :
- Resolve CI hooks warning for kernel-doc
V2 :
- Restric min/max setting to #define default min/max for elevated user - Himal
- Remove unrelated changes from patch - Niranjana

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
---
 drivers/gpu/drm/xe/Kconfig                    |   6 +
 drivers/gpu/drm/xe/Kconfig.profile            |  46 +++
 drivers/gpu/drm/xe/xe_engine.c                |  25 +-
 drivers/gpu/drm/xe/xe_hw_engine.c             |   8 +
 drivers/gpu/drm/xe/xe_hw_engine.h             |  31 ++
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 354

++++++++++++++++++

Quoted 78 lines
Quoted 78 lines
Quoted 78 lines
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h |   2 +
 7 files changed, 466 insertions(+), 6 deletions(-)  create mode

100644 drivers/gpu/drm/xe/Kconfig.profile

(quoted diff) +0 -0

b/drivers/gpu/drm/xe/Kconfig index d44794f99338..0a4ea965645b 100644

drivers/gpu/drm/xe/Kconfig +0 -0
@@ -83,3 +83,9 @@ depends on DRM_XE  depends on EXPERT  source

"drivers/gpu/drm/xe/Kconfig.debug"
endmenu

drivers/gpu/drm/xe/Kconfig +6 -0
+
+menu "drm/xe Profile Guided Optimisation"
+	visible if EXPERT
+	depends on DRM_XE
+	source "drivers/gpu/drm/xe/Kconfig.profile"
+endmenu
drivers/gpu/drm/xe/Kconfig.profile new file +46 -0
new file mode 100644
index 000000000000..e72f15ec4bf6
@@ -0,0 +1,46 @@
+config DRM_XE_JOB_TIMEOUT_MAX
+       int "Default max job timeout (ms)"
+       default 10000 # milliseconds
+       help
+         Configures the default max job timeout after which job will
+         be forcefully taken away from scheduler.
+config DRM_XE_JOB_TIMEOUT_MIN
+       int "Default max job timeout (ms)"
+       default 1 # milliseconds
+       help
+         Configures the default min job timeout after which job will
+         be forcefully taken away from scheduler.
+config DRM_XE_TIMESLICE_MAX
+       int "Default max timeslice duration (us)"
+       default 10000000 # microseconds
+       help
+         Configures the default max timeslice duration between multiple
+         contexts by guc scheduling.
+config DRM_XE_TIMESLICE_MIN
+       int "Default min timeslice duration (us)"
+       default 1 # microseconds
+       help
+         Configures the default min timeslice duration between multiple
+         contexts by guc scheduling.
+config DRM_XE_PREEMPT_TIMEOUT_MAX
+       int "Default max  preempt timeout (us)"
+       default 10000000 # microseconds
+       help
+         Configures the default max preempt timeout after which context
+         will be forcefully taken away and higher priority context will
+         run.
+config DRM_XE_PREEMPT_TIMEOUT_MIN
+       int "Default min  preempt timeout (us)"
+       default 1 # microseconds
+       help
+         Configures the default min preempt timeout after which context
+         will be forcefully taken away and higher priority context will
+         run.
+config DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT
+       bool "Default configuration of limitation on scheduler timeout"
+       default y
+       help
+	 Configures the enablement of limitation on scheduler timeout
+	 to apply to applicable user. For elevated user, all above MIN
+	 and MAX values will apply when this configuration is enable to
+	 apply limitation. By default limitation is applied.
(quoted diff) +0 -0

b/drivers/gpu/drm/xe/xe_engine.c index 9e167b113963..d934196eb79f 100644

drivers/gpu/drm/xe/xe_engine.c +0 -0
@@ -13,6 +13,7 @@
 
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/xe/xe_engine.c +1 -0
 #include "xe_device.h"
 #include "xe_gt.h"
+#include "xe_hw_engine_class_sysfs.h"
 #include "xe_hw_fence.h"
 #include "xe_lrc.h"
 #include "xe_macros.h"
@@ -191,8 +192,12 @@ static int engine_set_priority(struct

xe_device *xe, struct xe_engine *e, static int

engine_set_timeslice(struct xe_device *xe, struct xe_engine *e,

Quoted 15 lines
Quoted 15 lines

drivers/gpu/drm/xe/xe_engine.c static int engine_set_priority(struct xe_device *xe, struct xe_engine *e, · line 196

Quoted 6 lines
drivers/gpu/drm/xe/xe_engine.c +2 -2
 				u64 value, bool create)
 {
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	u32 min = e->hwe->eclass->sched_props.timeslice_min;
+	u32 max = e->hwe->eclass->sched_props.timeslice_max;

So I screwed this up in my last comment, sorry.

min = cap_nice ? KConfig option for min :
e->hwe->eclass->sched_props.timeslice_min;
same logic for max;

Probably add helper for this.

Quoted 7 lines
Quoted 7 lines

drivers/gpu/drm/xe/xe_engine.c static int engine_set_priority(struct xe_device *xe, struct xe_engine *e, · line 199

Quoted 3 lines
drivers/gpu/drm/xe/xe_engine.c +3 -0
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))

Then I think logic works too...

if cap nice && !Kconfig option to enfore limits (enforce_schedule_limit

returns false):

Quoted 10 lines
Quoted 8 lines

user can do whatever
else if cap nice
user within Kconfig range
else
user within sysfs range

This is what we want in the end.

Matt, I think this is exactly what the previous revision of the patch was

doing.

Quoted 1 line

No... Previous version

min = Kconfig option to enfore limits ? KConfig option for min : e->hwe-

Quoted 1 line

eclass->sched_props.timeslice_min

same for max

Results in:

if cap nice && !Kconfig option to enfore limits (enforce_schedule_limit returns false):
user can do whatever
else if cap_nice || Kconfig option to enfore limit
user within Kconfig range
else
user within sysfs range

Quoted 3 lines

!cap_nice && Kconfig option to enfore limits == user within Kconfig range (previously) !cap_nice && Kconfig option to enfore limits == user within sysfs range (my suggestion)

In previous version we can achieve it by just adding one below check right? #if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT) && cap_nice

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +6 -0
+       u32 min = XE_HW_ENGINE_TIMESLICE_MIN;
+       u32 max = XE_HW_ENGINE_TIMESLICE_MAX;
+#else
+       u32 min = e->hwe->eclass->sched_props.timeslice_min;
+       u32 max = e->hwe->eclass->sched_props.timeslice_max;
+#endif
Quoted 2 lines

Please let me know!

Ah I see. Yah, it is a limits selection issue.
We can do,

u32 min = e->hwe->eclass->sched_props.timeslice_min; u32 max = e->hwe->eclass->sched_props.timeslice_max;

#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
        if (cap_nice) {
                u32 min = XE_HW_ENGINE_TIMESLICE_MIN;
                u32 max = XE_HW_ENGINE_TIMESLICE_MAX;
        }
Quoted 5 lines

#endif

Matt, Tejas
Also, looks like you missed my another comment below.

Yea but what I suggest works too unless XE_HW_ENGINE_TIMESLICE_MIN can be undefined. Same logic so either way.

Matt

Quoted 598 lines

Niranjana

Quoted 596 lines
Quoted 596 lines

The logic is different and I believe we want what I'm suggesting.

Matt

Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
drivers/gpu/drm/xe/xe_engine.c +1 -0
+		return -EINVAL;
 
 	return e->ops->set_timeslice(e, value);  } @@ -201,8 +206,12 @@

static int engine_set_preemption_timeout(struct xe_device *xe,

drivers/gpu/drm/xe/xe_engine.c +6 -2
 					 struct xe_engine *e, u64 value,
 					 bool create)
 {
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	u32 min = e->hwe->eclass->sched_props.preempt_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.preempt_timeout_max;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))
+		return -EINVAL;
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

return e->ops->set_preempt_timeout(e, value); } @@ -266,11
+275,15 @@ static int engine_set_persistence(struct xe_device *xe, struct xe_engine *e, static int engine_set_job_timeout(struct xe_device

*xe, struct xe_engine *e,

Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
drivers/gpu/drm/xe/xe_engine.c +6 -2
 				  u64 value, bool create)
 {
+	u32 min = e->hwe->eclass->sched_props.job_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.job_timeout_max;
+
 	if (XE_IOCTL_DBG(xe, !create))
 		return -EINVAL;
 
-	if (!capable(CAP_SYS_NICE))
-		return -EPERM;
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(value, min, max))
+		return -EINVAL;
 
 	return e->ops->set_job_timeout(e, value);  } diff --git

a/drivers/gpu/drm/xe/xe_hw_engine.c
b/drivers/gpu/drm/xe/xe_hw_engine.c
index afa7d25c3852..e601bffe3b13 100644

drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
@@ -364,8 +364,16 @@ static void hw_engine_init_early(struct xe_gt
 *gt, struct xe_hw_engine *hwe,
 
Quoted 2 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct xe_gt · line 367

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
 	if (!gt->eclass[hwe->class].sched_props.job_timeout_ms) {
 		gt->eclass[hwe->class].sched_props.job_timeout_ms = HZ *

5;

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct xe_gt · line 368

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine.c +1 -0
+		gt->eclass[hwe->class].sched_props.job_timeout_min =

XE_HW_ENGINE_JOB_TIMEOUT_MIN;

Quoted 4 lines
Quoted 4 lines

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct xe_gt · line 372

Quoted 4 lines
drivers/gpu/drm/xe/xe_hw_engine.c +3 -0
+		gt->eclass[hwe->class].sched_props.job_timeout_max =
+XE_HW_ENGINE_JOB_TIMEOUT_MAX;
 		gt->eclass[hwe->class].sched_props.timeslice_us = 1 * 1000;
+		gt->eclass[hwe->class].sched_props.timeslice_min =

XE_HW_ENGINE_TIMESLICE_MIN;

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct xe_gt · line 375

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine.c +2 -0
+		gt->eclass[hwe->class].sched_props.timeslice_max =
+XE_HW_ENGINE_TIMESLICE_MAX;
 		gt->eclass[hwe->class].sched_props.preempt_timeout_us =

640 *

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct xe_gt · line 378

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine.c +2 -0
 1000;
+		gt->eclass[hwe->class].sched_props.preempt_timeout_min =
+
	XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN;
Quoted 2 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.c static void hw_engine_init_early(struct xe_gt

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.c +2 -0
+		gt->eclass[hwe->class].sched_props.preempt_timeout_max =
+
	XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX;
Quoted 11 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.c

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
 		/* Record default props */
 		gt->eclass[hwe->class].defaults = gt->eclass[hwe-

class].sched_props;

Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine.c +0 -0
 	}
drivers/gpu/drm/xe/xe_hw_engine.h +0 -0
index 7eca9d53c7b1..3d37d6d44261 100644
@@ -10,6 +10,37 @@
 
Quoted 4 lines
Quoted 4 lines

drivers/gpu/drm/xe/xe_hw_engine.h

Quoted 4 lines
drivers/gpu/drm/xe/xe_hw_engine.h +2 -0
 struct drm_printer;
 
+#ifdef CONFIG_DRM_XE_JOB_TIMEOUT_MIN #define
+XE_HW_ENGINE_JOB_TIMEOUT_MIN

CONFIG_DRM_XE_JOB_TIMEOUT_MIN #else

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine.h line 17

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine.h +3 -0
+#define XE_HW_ENGINE_JOB_TIMEOUT_MIN 1 #endif #ifdef
+CONFIG_DRM_XE_JOB_TIMEOUT_MAX #define
+XE_HW_ENGINE_JOB_TIMEOUT_MAX

CONFIG_DRM_XE_JOB_TIMEOUT_MAX #else

Quoted 2 lines
Quoted 2 lines

drivers/gpu/drm/xe/xe_hw_engine.h line 19

Quoted 2 lines
drivers/gpu/drm/xe/xe_hw_engine.h +2 -0
+#define XE_HW_ENGINE_JOB_TIMEOUT_MAX (10 * 1000) #endif #ifdef
+CONFIG_DRM_XE_TIMESLICE_MIN #define

XE_HW_ENGINE_TIMESLICE_MIN

Quoted 3 lines
Quoted 3 lines

drivers/gpu/drm/xe/xe_hw_engine.h line 22

Quoted 3 lines
drivers/gpu/drm/xe/xe_hw_engine.h +3 -0
+CONFIG_DRM_XE_TIMESLICE_MIN #else #define
+XE_HW_ENGINE_TIMESLICE_MIN 1 #endif #ifdef
+CONFIG_DRM_XE_TIMESLICE_MAX #define

XE_HW_ENGINE_TIMESLICE_MAX

Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
drivers/gpu/drm/xe/xe_hw_engine.h +11 -0
+CONFIG_DRM_XE_TIMESLICE_MAX #else #define
+XE_HW_ENGINE_TIMESLICE_MAX (10 * 1000 * 1000) #endif #ifdef
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MIN
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MIN #else #define
+XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN 1 #endif #ifdef
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MAX
+#define XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX
+CONFIG_DRM_XE_PREEMPT_TIMEOUT_MAX #else #define
+XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX (10 * 1000 * 1000) #endif
+
 int xe_hw_engines_init_early(struct xe_gt *gt);  int

xe_hw_engines_init(struct xe_gt *gt); void xe_hw_engine_handle_irq(struct xe_hw_engine *hwe, u16 intr_vec);

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
index 990bb675d1e0..2b7ac4e02db6 100644
@@ -11,6 +11,20 @@
 
 static int xe_add_hw_engine_class_defaults(struct kobject
 *parent);
 
Quoted 14 lines
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +6 -0
+bool enforce_schedule_limit(void) { #if
+IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	return true;
+#else
+	return !capable(CAP_SYS_NICE);
+#endif
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+}
+
+bool engine_timeout_in_range(u64 timeout, u64 min, u64 max) {
+	return timeout >= min && timeout <= max; }
+
 static void kobj_xe_hw_engine_release(struct kobject *kobj)  {
 	kfree(kobj);
@@ -39,11 +53,92 @@ kobj_xe_hw_engine_class(struct kobject

*parent, char *name)

Quoted 92 lines
Quoted 82 lines
Quoted 82 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +75 -0
 	return keclass;
 }
 
+static ssize_t job_timeout_max_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
+		return err;
+
+	if (timeout < eclass->sched_props.job_timeout_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+				     XE_HW_ENGINE_JOB_TIMEOUT_MIN,
+				     XE_HW_ENGINE_JOB_TIMEOUT_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.job_timeout_max, timeout);
+
+	return count;
+}
+
+static ssize_t job_timeout_max_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.job_timeout_max);
+}
+
+static struct kobj_attribute job_timeout_max_attr =
+__ATTR(job_timeout_max, 0644, job_timeout_max_show,
+job_timeout_max_store);
+
+static ssize_t job_timeout_min_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
+		return err;
+
+	if (timeout > eclass->sched_props.job_timeout_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+				     XE_HW_ENGINE_JOB_TIMEOUT_MIN,
+				     XE_HW_ENGINE_JOB_TIMEOUT_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.job_timeout_min, timeout);
+
+	return count;
+}
+
+static ssize_t job_timeout_min_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.job_timeout_min);
+}
+
+static struct kobj_attribute job_timeout_min_attr =
+__ATTR(job_timeout_min, 0644, job_timeout_min_show,
+job_timeout_min_store);
+
 static ssize_t job_timeout_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);
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
Quoted 9 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c kobj_xe_hw_engine_class(struct kobject *parent, char *name) · line 141

Quoted 5 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +5 -0
+	u32 min = XE_HW_ENGINE_JOB_TIMEOUT_MIN;
+	u32 max = XE_HW_ENGINE_JOB_TIMEOUT_MAX; #else
+	u32 min = e->hwe->eclass->sched_props.job_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.job_timeout_max;
+#endif

I don't think we need this, just make sure default is within min / max of the sched_props.

Quoted 3 lines

Shouldn't the sched_prop set through sysfs here which applies to all future user engines (xe_engine) has the same requirement as the sched_prop set directly to user engine (xe_engine) through set_properly

ioctl?

Quoted 11 lines

ie., shoudln't the requirement be same in job_timeout_store() and engine_set_job_timeout()?

Niranjana

Quoted 6 lines

Matt

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t job_timeout_store(struct kobject

Quoted 4 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
 	u32 timeout;
 	int err;
 
@@ -51,6 +146,10 @@ static ssize_t job_timeout_store(struct kobject

*kobj,

Quoted 49 lines
Quoted 49 lines
Quoted 49 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +4 -0
 	if (err)
 		return err;
 
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout, min, max))
+		return -EINVAL;
+
 	WRITE_ONCE(eclass->sched_props.job_timeout_ms, timeout);
 
 	return count;
@@ -78,11 +177,40 @@ 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);

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +28 -0
+static ssize_t job_timeout_min_default(struct kobject *kobj,
+				       struct kobj_attribute *attr, char *buf) {
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.job_timeout_min);
+}
+
+static struct kobj_attribute job_timeout_min_def =
+__ATTR(job_timeout_min, 0444, job_timeout_min_default, NULL);
+
+static ssize_t job_timeout_max_default(struct kobject *kobj,
+				       struct kobj_attribute *attr, char *buf) {
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.job_timeout_max);
+}
+
+static struct kobj_attribute job_timeout_max_def =
+__ATTR(job_timeout_max, 0444, job_timeout_max_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);
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	u32 min = XE_HW_ENGINE_TIMESLICE_MIN;
+	u32 max = XE_HW_ENGINE_TIMESLICE_MAX; #else
+	u32 min = e->hwe->eclass->sched_props.timeslice_min;
+	u32 max = e->hwe->eclass->sched_props.timeslice_max;
+#endif
 	u32 duration;
 	int err;
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t timeslice_duration_store(struct

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
@@ -90,11 +218,92 @@ static ssize_t timeslice_duration_store(struct

kobject *kobj,

Quoted 40 lines
Quoted 40 lines
Quoted 40 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +32 -0
 	if (err)
 		return err;
 
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(duration, min, max))
+		return -EINVAL;
+
 	WRITE_ONCE(eclass->sched_props.timeslice_us, duration);
 
 	return count;
 }
 
+static ssize_t timeslice_duration_max_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;
+
+	if (duration < eclass->sched_props.timeslice_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(duration,
+				     XE_HW_ENGINE_TIMESLICE_MIN,
+				     XE_HW_ENGINE_TIMESLICE_MAX))
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.timeslice_max, duration);
+
+	return count;
+}
+
+static ssize_t timeslice_duration_max_show(struct kobject *kobj,
+					   struct kobj_attribute *attr,
+					   char *buf)
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t timeslice_duration_store(struct kobject *kobj,

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+{
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n", eclass->sched_props.timeslice_max);
+}
+
+static struct kobj_attribute timeslice_duration_max_attr =
+	__ATTR(timeslice_duration_max, 0644,

timeslice_duration_max_show,

Quoted 21 lines
Quoted 21 lines
Quoted 21 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +21 -0
+	       timeslice_duration_max_store);
+
+static ssize_t timeslice_duration_min_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;
+
+	if (duration > eclass->sched_props.timeslice_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(duration,
+				     XE_HW_ENGINE_TIMESLICE_MIN,
+				     XE_HW_ENGINE_TIMESLICE_MAX))
+		return -EINVAL;
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t timeslice_duration_store(struct kobject *kobj,

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+
+	WRITE_ONCE(eclass->sched_props.timeslice_min, duration);
+
+	return count;
+}
+
+static ssize_t timeslice_duration_min_show(struct kobject *kobj,
+					   struct kobj_attribute *attr, char

*buf) {

Quoted 7 lines
Quoted 7 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t timeslice_duration_store(struct kobject *kobj,

Quoted 7 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +7 -0
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n", eclass->sched_props.timeslice_min);
+}
+
+static struct kobj_attribute timeslice_duration_min_attr =
+	__ATTR(timeslice_duration_min, 0644,

timeslice_duration_min_show,

Quoted 43 lines
Quoted 43 lines
Quoted 43 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +2 -0
+	       timeslice_duration_min_store);
+
 static ssize_t timeslice_duration_show(struct kobject *kobj,
 		struct kobj_attribute *attr, char *buf)  { @@ -118,11 +327,40

@@ static ssize_t timeslice_default(struct kobject *kobj, static struct kobj_attribute timeslice_duration_def = __ATTR(timeslice_duration_us, 0444, timeslice_default, NULL);

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +28 -0
+static ssize_t timeslice_min_default(struct kobject *kobj,
+				     struct kobj_attribute *attr, char *buf) {
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.timeslice_min); }
+
+static struct kobj_attribute timeslice_duration_min_def =
+__ATTR(timeslice_duration_min, 0444, timeslice_min_default,
+NULL);
+
+static ssize_t timeslice_max_default(struct kobject *kobj,
+				     struct kobj_attribute *attr, char *buf) {
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n", eclass->defaults.timeslice_max); }
+
+static struct kobj_attribute timeslice_duration_max_def =
+__ATTR(timeslice_duration_max, 0444, timeslice_max_default,
+NULL);
+
 static ssize_t preempt_timeout_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);
+#if IS_ENABLED(CONFIG_DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT)
+	u32 min = XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN;
+	u32 max = XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX; #else
+	u32 min = e->hwe->eclass->sched_props.preempt_timeout_min;
+	u32 max = e->hwe->eclass->sched_props.preempt_timeout_max;
+#endif
 	u32 timeout;
 	int err;
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_store(struct

Quoted 1 line
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +0 -0
@@ -130,6 +368,10 @@ static ssize_t preempt_timeout_store(struct

kobject *kobj,

Quoted 35 lines
Quoted 35 lines
Quoted 35 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +4 -0
 	if (err)
 		return err;
 
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout, min, max))
+		return -EINVAL;
+
 	WRITE_ONCE(eclass->sched_props.preempt_timeout_us, timeout);
 
 	return count;
@@ -158,17 +400,129 @@ static ssize_t

preempt_timeout_default(struct kobject *kobj, static struct kobj_attribute preempt_timeout_def = __ATTR(preempt_timeout_us, 0444, preempt_timeout_default, NULL);

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +20 -0
+static ssize_t preempt_timeout_min_default(struct kobject *kobj,
+					   struct kobj_attribute *attr,
+					   char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass =
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n",
+eclass->defaults.preempt_timeout_min);
+}
+
+static struct kobj_attribute preempt_timeout_min_def =
+__ATTR(preempt_timeout_min, 0444, preempt_timeout_min_default,
+NULL);
+
+static ssize_t preempt_timeout_max_default(struct kobject *kobj,
+					   struct kobj_attribute *attr,
+					   char *buf)
+{
+	struct xe_hw_engine_class_intf *eclass =
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_default(struct kobject *kobj,

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+kobj_to_eclass(kobj->parent);
+
+	return sprintf(buf, "%u\n",
+eclass->defaults.preempt_timeout_max);
+}
+
+static struct kobj_attribute preempt_timeout_max_def =
+__ATTR(preempt_timeout_max, 0444,

preempt_timeout_max_default,

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +11 -0
+NULL);
+
+static ssize_t preempt_timeout_max_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_default(struct kobject *kobj, · line 447

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+		return err;
+
+	if (timeout < eclass->sched_props.preempt_timeout_min)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+

XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN,

Quoted 1 line
Quoted 1 line
Quoted 1 line

+

XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX))

Quoted 9 lines
Quoted 9 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_default(struct kobject *kobj, · line 454

Quoted 9 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +9 -0
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.preempt_timeout_max, timeout);
+
+	return count;
+}
+
+static ssize_t preempt_timeout_max_show(struct kobject *kobj,
+					struct kobj_attribute *attr, char *buf)

{

Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +19 -0
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n",
+eclass->sched_props.preempt_timeout_max);
+}
+
+static struct kobj_attribute preempt_timeout_max_attr =
+	__ATTR(preempt_timeout_max, 0644, preempt_timeout_max_show,
+	       preempt_timeout_max_store);
+
+static ssize_t preempt_timeout_min_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 timeout;
+	int err;
+
+	err = kstrtou32(buf, 0, &timeout);
+	if (err)
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_default(struct kobject *kobj, · line 485

Quoted 8 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +8 -0
+		return err;
+
+	if (timeout > eclass->sched_props.preempt_timeout_max)
+		return -EINVAL;
+
+	if (enforce_schedule_limit() &&
+	    !engine_timeout_in_range(timeout,
+

XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN,

Quoted 1 line
Quoted 1 line
Quoted 1 line

+

XE_HW_ENGINE_PREEMPT_TIMEOUT_MAX))

Quoted 9 lines
Quoted 9 lines

drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c static ssize_t preempt_timeout_default(struct kobject *kobj, · line 492

Quoted 9 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +9 -0
+		return -EINVAL;
+
+	WRITE_ONCE(eclass->sched_props.preempt_timeout_min, timeout);
+
+	return count;
+}
+
+static ssize_t preempt_timeout_min_show(struct kobject *kobj,
+					struct kobj_attribute *attr, char *buf)

{

Quoted 54 lines
Quoted 54 lines
Quoted 54 lines
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c +22 -0
+	struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj);
+
+	return sprintf(buf, "%u\n",
+eclass->sched_props.preempt_timeout_min);
+}
+
+static struct kobj_attribute preempt_timeout_min_attr =
+	__ATTR(preempt_timeout_min, 0644, preempt_timeout_min_show,
+	       preempt_timeout_min_store);
+
 static const struct attribute *defaults[] = {
 	&job_timeout_def.attr,
+	&job_timeout_min_def.attr,
+	&job_timeout_max_def.attr,
 	&timeslice_duration_def.attr,
+	&timeslice_duration_min_def.attr,
+	&timeslice_duration_max_def.attr,
 	&preempt_timeout_def.attr,
+	&preempt_timeout_min_def.attr,
+	&preempt_timeout_max_def.attr,
 	NULL
 };
 
 static const struct attribute *files[] = {
 	&job_timeout_attr.attr,
+	&job_timeout_min_attr.attr,
+	&job_timeout_max_attr.attr,
 	&timeslice_duration_attr.attr,
+	&timeslice_duration_min_attr.attr,
+	&timeslice_duration_max_attr.attr,
 	&preempt_timeout_attr.attr,
+	&preempt_timeout_min_attr.attr,
+	&preempt_timeout_max_attr.attr,
 	NULL
 };
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h +2 -0
index 757136614672..2e2ab351a991 100644
@@ -10,6 +10,8 @@
 
 #define MAX_ENGINE_CLASS_NAME_LEN    16
 int xe_hw_engine_class_sysfs_init(struct xe_gt *gt);
+bool enforce_schedule_limit(void); bool
+engine_timeout_in_range(u64 timeout, u64 min, u64 max);
 
 /**
  * struct kobj_eclass - A eclass's kobject struct that connects

the kobject and the
--
2.25.1

#23 lore raw

[Intel-xe] ✓ CI.Patch_applied: success for drm/xe: Add engine scheduler control interface (rev9)

In reply to Tejas Upadhyay
== Series Details ==

== Series Details ==

Series: drm/xe: Add engine scheduler control interface (rev9)
URL : https://patchwork.freedesktop.org/series/119392/
State : success

== Summary ==

=== Applying kernel patches on branch 'drm-xe-next' with base: === Base commit: 20a2578d3 drm/xe/engine: add missing rpm for bind engines === git am output follows ===
Applying: drm/xe: Add sysfs entries for engines under its GT
Applying: drm/xe: Add sysfs for default engine scheduler properties
Applying: drm/xe: Add job timeout engine property to sysfs
Applying: drm/xe: Add timeslice duration engine property to sysfs
Applying: drm/xe: Add sysfs for preempt reset timeout
Applying: drm/xe: Add min/max cap for engine scheduler properties

#24 lore raw

[Intel-xe] ✗ CI.checkpatch: warning for drm/xe: Add engine scheduler control interface (rev9)

In reply to Tejas Upadhyay
== Series Details ==

== Series Details ==

Series: drm/xe: Add engine scheduler control interface (rev9)
URL : https://patchwork.freedesktop.org/series/119392/
State : warning

== Summary ==

+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master c7d32770e3cd31d9fc134ce41f329b10aa33ee15
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit b57496f27c8bfc9d9fc1b208ce9b5de8cc536ca6

Author: Tejas Upadhyay <[email protected]>
Date:   Thu Jul 27 13:52:35 2023 +0530

drm/xe: Add min/max cap for engine scheduler properties

Add sysfs entries for the min, max, and defaults for each of engine scheduler controls for every hardware engine class.

Non-elevated user IOCTLs to set these controls must be within the min-max ranges of the sysfs entries, elevated user can set these controls to any value. However, introduced compile time CONFIG min-max values which restricts elevated user to be in compile time min-max range if at all sysfs min/max are violated.

Sysfs entries examples are,
DUT# cat /sys/class/drm/cardX/device/tileN/gtN/engines/ccs/.defaults/
job_timeout_max job_timeout_ms preempt_timeout_min timeslice_duration_max timeslice_duration_us
job_timeout_min preempt_timeout_max preempt_timeout_us timeslice_duration_min

DUT# cat /sys/class/drm/card1/device/tileN/gtN/engines/ccs/
.defaults/ job_timeout_min preempt_timeout_max preempt_timeout_us timeslice_duration_min
job_timeout_max job_timeout_ms preempt_timeout_min timeslice_duration_max timeslice_duration_us

V9 :
- Rebase to use s/xe_engine/xe_hw_engine/ - Matt
V8 :
- fix enforce_sched_limit and avoid code duplication - Niranjana
- Make sure min < max - Niranjana
V7 :
- Rebase to replace hw engine with eclass interface
- return EINVAL in place of EPERM
- Use some APIs to avoid code duplication
V6 :
- Rebase changes to reflect per engine class props interface - MattB
- Use #if ENABLED - MattB
- Remove MAX_SCHED_TIMEOUT check as range validation is enough
V5 :
- Rebase to resolve conflicts - CI
V4 :
- Rebase
- Update commit to reflect tile addition
- Use XE_HW macro directly as they are already filtered for CONFIG checks - Niranjana
- Add CONFIG for enable/disable min/max limitation
on elevated user. Default is enable - Matt/Joonas
V3 :
- Resolve CI hooks warning for kernel-doc
V2 :
- Restric min/max setting to #define default min/max for elevated user - Himal
- Remove unrelated changes from patch - Niranjana

+ /mt/dim checkpatch 20a2578d3a889f6e1dd4a6514924661557c2f9f6 drm-intel
3463737cf drm/xe: Add sysfs entries for engines under its GT
Traceback (most recent call last):
File "scripts/spdxcheck.py", line 6, in <module>
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
Traceback (most recent call last):
File "scripts/spdxcheck.py", line 6, in <module>
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
-:65: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #65:
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 150 lines checked
fce2387a4 drm/xe: Add sysfs for default engine scheduler properties
-:33: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #33:
- Scheduling props should apply per class engine not per hardware engine - Matt

total: 0 errors, 1 warnings, 0 checks, 274 lines checked ac638a9fe drm/xe: Add job timeout engine property to sysfs db2968de7 drm/xe: Add timeslice duration engine property to sysfs -:56: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #56: FILE: drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c:99:
+static ssize_t timeslice_duration_show(struct kobject *kobj,
+ struct kobj_attribute *attr, char *buf)

total: 0 errors, 0 warnings, 1 checks, 42 lines checked
39b6f67a5 drm/xe: Add sysfs for preempt reset timeout
b57496f27 drm/xe: Add min/max cap for engine scheduler properties
-:17: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #17:
job_timeout_max job_timeout_ms preempt_timeout_min timeslice_duration_max timeslice_duration_us

-:67: WARNING:EMBEDDED_FILENAME: It's generally not useful to have the filename in the file #67: FILE: drivers/gpu/drm/xe/Kconfig:90:
+ source "drivers/gpu/drm/xe/Kconfig.profile"

-:70: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #70:
new file mode 100644

total: 0 errors, 3 warnings, 0 checks, 601 lines checked

#25 lore raw

[Intel-xe] ✓ CI.KUnit: success for drm/xe: Add engine scheduler control interface (rev9)

In reply to Tejas Upadhyay
== Series Details ==

== Series Details ==

Series: drm/xe: Add engine scheduler control interface (rev9)
URL : https://patchwork.freedesktop.org/series/119392/
State : success

== Summary ==

+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig
stty: 'standard input': Inappropriate ioctl for device
[09:00:13] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[09:00:17] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make ARCH=um O=.kunit --jobs=48
[09:00:37] Starting KUnit Kernel (1/1)...
[09:00:37] ============================================================
[09:00:37] ==================== xe_bo (2 subtests) ====================
[09:00:37] [SKIPPED] xe_ccs_migrate_kunit
[09:00:37] [SKIPPED] xe_bo_evict_kunit
[09:00:37] ===================== [SKIPPED] xe_bo ======================
[09:00:37] ================== xe_dma_buf (1 subtest) ==================
[09:00:37] [SKIPPED] xe_dma_buf_kunit
[09:00:37] =================== [SKIPPED] xe_dma_buf ===================
[09:00:37] ================== xe_migrate (1 subtest) ==================
[09:00:37] [SKIPPED] xe_migrate_sanity_kunit
[09:00:37] =================== [SKIPPED] xe_migrate ===================
[09:00:37] =================== xe_pci (2 subtests) ====================
[09:00:37] [PASSED] xe_gmdid_graphics_ip
[09:00:37] [PASSED] xe_gmdid_media_ip
[09:00:37] ===================== [PASSED] xe_pci ======================
[09:00:37] ==================== xe_rtp (1 subtest) ====================
[09:00:37] ================== xe_rtp_process_tests  ===================
[09:00:37] [PASSED] coalesce-same-reg
[09:00:37] [PASSED] no-match-no-add
[09:00:37] [PASSED] no-match-no-add-multiple-rules
[09:00:37] [PASSED] two-regs-two-entries
[09:00:37] [PASSED] clr-one-set-other
[09:00:37] [PASSED] set-field
[09:00:37] [PASSED] conflict-duplicate
[09:00:37] [PASSED] conflict-not-disjoint
[09:00:37] [PASSED] conflict-reg-type
[09:00:37] ============== [PASSED] xe_rtp_process_tests ===============
[09:00:37] ===================== [PASSED] xe_rtp ======================
[09:00:37] ==================== xe_wa (1 subtest) =====================
[09:00:37] ======================== xe_wa_gt  =========================
[09:00:37] [PASSED] TIGERLAKE (B0)
[09:00:37] [PASSED] DG1 (A0)
[09:00:37] [PASSED] DG1 (B0)
[09:00:37] [PASSED] ALDERLAKE_S (A0)
[09:00:37] [PASSED] ALDERLAKE_S (B0)
[09:00:37] [PASSED] ALDERLAKE_S (C0)
[09:00:37] [PASSED] ALDERLAKE_S (D0)
[09:00:37] [PASSED] ALDERLAKE_P (A0)
[09:00:37] [PASSED] ALDERLAKE_P (B0)
[09:00:37] [PASSED] ALDERLAKE_P (C0)
[09:00:37] [PASSED] DG2_G10 (A0)
[09:00:37] [PASSED] DG2_G10 (A1)
[09:00:37] [PASSED] DG2_G10 (B0)
[09:00:37] [PASSED] DG2_G10 (C0)
[09:00:37] [PASSED] DG2_G11 (A0)
[09:00:37] [PASSED] DG2_G11 (B0)
[09:00:37] [PASSED] DG2_G11 (B1)
[09:00:37] [PASSED] DG2_G12 (A0)
[09:00:37] [PASSED] DG2_G12 (A1)
[09:00:37] [PASSED] PVC (B0)
[09:00:37] [PASSED] PVC (B1)
[09:00:37] [PASSED] PVC (C0)
[09:00:37] ==================== [PASSED] xe_wa_gt =====================
[09:00:37] ====================== [PASSED] xe_wa ======================
[09:00:37] ============================================================
[09:00:37] Testing complete. Ran 37 tests: passed: 33, skipped: 4
[09:00:37] Elapsed time: 23.603s total, 4.211s configuring, 19.272s building, 0.096s running

+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig [09:00:37] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[09:00:38] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make ARCH=um O=.kunit --jobs=48
[09:00:57] Starting KUnit Kernel (1/1)...
[09:00:57] ============================================================
[09:00:57] ============ drm_test_pick_cmdline (2 subtests) ============
[09:00:57] [PASSED] drm_test_pick_cmdline_res_1920_1080_60
[09:00:57] =============== drm_test_pick_cmdline_named  ===============
[09:00:57] [PASSED] NTSC
[09:00:57] [PASSED] NTSC-J
[09:00:57] [PASSED] PAL
[09:00:57] [PASSED] PAL-M
[09:00:57] =========== [PASSED] drm_test_pick_cmdline_named ===========
[09:00:57] ============== [PASSED] drm_test_pick_cmdline ==============
[09:00:57] ================== drm_buddy (6 subtests) ==================
[09:00:57] [PASSED] drm_test_buddy_alloc_limit
[09:00:57] [PASSED] drm_test_buddy_alloc_range
[09:00:57] [PASSED] drm_test_buddy_alloc_optimistic
[09:00:57] [PASSED] drm_test_buddy_alloc_pessimistic
[09:00:57] [PASSED] drm_test_buddy_alloc_smoke
[09:00:57] [PASSED] drm_test_buddy_alloc_pathological
[09:00:57] ==================== [PASSED] drm_buddy ====================
[09:00:57] ============= drm_cmdline_parser (40 subtests) =============
[09:00:57] [PASSED] drm_test_cmdline_force_d_only
[09:00:57] [PASSED] drm_test_cmdline_force_D_only_dvi
[09:00:57] [PASSED] drm_test_cmdline_force_D_only_hdmi
[09:00:57] [PASSED] drm_test_cmdline_force_D_only_not_digital
[09:00:57] [PASSED] drm_test_cmdline_force_e_only
[09:00:57] [PASSED] drm_test_cmdline_res
[09:00:57] [PASSED] drm_test_cmdline_res_vesa
[09:00:57] [PASSED] drm_test_cmdline_res_vesa_rblank
[09:00:57] [PASSED] drm_test_cmdline_res_rblank
[09:00:57] [PASSED] drm_test_cmdline_res_bpp
[09:00:57] [PASSED] drm_test_cmdline_res_refresh
[09:00:57] [PASSED] drm_test_cmdline_res_bpp_refresh
[09:00:57] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced
[09:00:57] [PASSED] drm_test_cmdline_res_bpp_refresh_margins
[09:00:57] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off
[09:00:57] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on
[09:00:57] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog
[09:00:57] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital
[09:00:57] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on
[09:00:57] [PASSED] drm_test_cmdline_res_margins_force_on
[09:00:57] [PASSED] drm_test_cmdline_res_vesa_margins
[09:00:57] [PASSED] drm_test_cmdline_name
[09:00:57] [PASSED] drm_test_cmdline_name_bpp
[09:00:57] [PASSED] drm_test_cmdline_name_option
[09:00:57] [PASSED] drm_test_cmdline_name_bpp_option
[09:00:57] [PASSED] drm_test_cmdline_rotate_0
[09:00:57] [PASSED] drm_test_cmdline_rotate_90
[09:00:57] [PASSED] drm_test_cmdline_rotate_180
[09:00:57] [PASSED] drm_test_cmdline_rotate_270
[09:00:57] [PASSED] drm_test_cmdline_hmirror
[09:00:57] [PASSED] drm_test_cmdline_vmirror
[09:00:57] [PASSED] drm_test_cmdline_margin_options
[09:00:57] [PASSED] drm_test_cmdline_multiple_options
[09:00:57] [PASSED] drm_test_cmdline_bpp_extra_and_option
[09:00:57] [PASSED] drm_test_cmdline_extra_and_option
[09:00:57] [PASSED] drm_test_cmdline_freestanding_options
[09:00:57] [PASSED] drm_test_cmdline_freestanding_force_e_and_options
[09:00:57] [PASSED] drm_test_cmdline_panel_orientation
[09:00:57] ================ drm_test_cmdline_invalid  =================
[09:00:57] [PASSED] margin_only
[09:00:57] [PASSED] interlace_only
[09:00:57] [PASSED] res_missing_x
[09:00:57] [PASSED] res_missing_y
[09:00:57] [PASSED] res_bad_y
[09:00:57] [PASSED] res_missing_y_bpp
[09:00:57] [PASSED] res_bad_bpp
[09:00:57] [PASSED] res_bad_refresh
[09:00:57] [PASSED] res_bpp_refresh_force_on_off
[09:00:57] [PASSED] res_invalid_mode
[09:00:57] [PASSED] res_bpp_wrong_place_mode
[09:00:57] [PASSED] name_bpp_refresh
[09:00:57] [PASSED] name_refresh
[09:00:57] [PASSED] name_refresh_wrong_mode
[09:00:57] [PASSED] name_refresh_invalid_mode
[09:00:57] [PASSED] rotate_multiple
[09:00:57] [PASSED] rotate_invalid_val
[09:00:57] [PASSED] rotate_truncated
[09:00:57] [PASSED] invalid_option
[09:00:57] [PASSED] invalid_tv_option
[09:00:57] [PASSED] truncated_tv_option
[09:00:57] ============ [PASSED] drm_test_cmdline_invalid =============
[09:00:57] =============== drm_test_cmdline_tv_options  ===============
[09:00:57] [PASSED] NTSC
[09:00:57] [PASSED] NTSC_443
[09:00:57] [PASSED] NTSC_J
[09:00:57] [PASSED] PAL
[09:00:57] [PASSED] PAL_M
[09:00:57] [PASSED] PAL_N
[09:00:57] [PASSED] SECAM
[09:00:57] =========== [PASSED] drm_test_cmdline_tv_options ===========
[09:00:57] =============== [PASSED] drm_cmdline_parser ================
[09:00:57] ========== drm_get_tv_mode_from_name (2 subtests) ==========
[09:00:57] ========== drm_test_get_tv_mode_from_name_valid  ===========
[09:00:57] [PASSED] NTSC
[09:00:57] [PASSED] NTSC-443
[09:00:57] [PASSED] NTSC-J
[09:00:57] [PASSED] PAL
[09:00:57] [PASSED] PAL-M
[09:00:57] [PASSED] PAL-N
[09:00:57] [PASSED] SECAM
[09:00:57] ====== [PASSED] drm_test_get_tv_mode_from_name_valid =======
[09:00:57] [PASSED] drm_test_get_tv_mode_from_name_truncated
[09:00:57] ============ [PASSED] drm_get_tv_mode_from_name ============
[09:00:57] ============= drm_damage_helper (21 subtests) ==============
[09:00:57] [PASSED] drm_test_damage_iter_no_damage
[09:00:57] [PASSED] drm_test_damage_iter_no_damage_fractional_src
[09:00:57] [PASSED] drm_test_damage_iter_no_damage_src_moved
[09:00:57] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved
[09:00:57] [PASSED] drm_test_damage_iter_no_damage_not_visible
[09:00:57] [PASSED] drm_test_damage_iter_no_damage_no_crtc
[09:00:57] [PASSED] drm_test_damage_iter_no_damage_no_fb
[09:00:57] [PASSED] drm_test_damage_iter_simple_damage
[09:00:57] [PASSED] drm_test_damage_iter_single_damage
[09:00:57] [PASSED] drm_test_damage_iter_single_damage_intersect_src
[09:00:57] [PASSED] drm_test_damage_iter_single_damage_outside_src
[09:00:57] [PASSED] drm_test_damage_iter_single_damage_fractional_src
[09:00:57] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src
[09:00:57] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src
[09:00:57] [PASSED] drm_test_damage_iter_single_damage_src_moved
[09:00:57] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved
[09:00:57] [PASSED] drm_test_damage_iter_damage
[09:00:57] [PASSED] drm_test_damage_iter_damage_one_intersect
[09:00:57] [PASSED] drm_test_damage_iter_damage_one_outside
[09:00:57] [PASSED] drm_test_damage_iter_damage_src_moved
[09:00:57] [PASSED] drm_test_damage_iter_damage_not_visible
[09:00:57] ================ [PASSED] drm_damage_helper ================
[09:00:57] ============== drm_dp_mst_helper (2 subtests) ==============
[09:00:57] ============== drm_test_dp_mst_calc_pbn_mode  ==============
[09:00:57] [PASSED] Clock 154000 BPP 30 DSC disabled
[09:00:57] [PASSED] Clock 234000 BPP 30 DSC disabled
[09:00:57] [PASSED] Clock 297000 BPP 24 DSC disabled
[09:00:57] [PASSED] Clock 332880 BPP 24 DSC enabled
[09:00:57] [PASSED] Clock 324540 BPP 24 DSC enabled
[09:00:57] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ==========
[09:00:57] ========= drm_test_dp_mst_sideband_msg_req_decode  =========
[09:00:57] [PASSED] DP_ENUM_PATH_RESOURCES with port number
[09:00:57] [PASSED] DP_POWER_UP_PHY with port number
[09:00:57] [PASSED] DP_POWER_DOWN_PHY with port number
[09:00:57] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks
[09:00:57] [PASSED] DP_ALLOCATE_PAYLOAD with port number
[09:00:57] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI
[09:00:57] [PASSED] DP_ALLOCATE_PAYLOAD with PBN
[09:00:57] [PASSED] DP_QUERY_PAYLOAD with port number
[09:00:57] [PASSED] DP_QUERY_PAYLOAD with VCPI
[09:00:57] [PASSED] DP_REMOTE_DPCD_READ with port number
[09:00:57] [PASSED] DP_REMOTE_DPCD_READ with DPCD address
[09:00:57] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes
[09:00:57] [PASSED] DP_REMOTE_DPCD_WRITE with port number
[09:00:57] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address
[09:00:57] [PASSED] DP_REMOTE_DPCD_WRITE with data array
[09:00:57] [PASSED] DP_REMOTE_I2C_READ with port number
[09:00:57] [PASSED] DP_REMOTE_I2C_READ with I2C device ID
[09:00:57] [PASSED] DP_REMOTE_I2C_READ with transactions array
[09:00:57] [PASSED] DP_REMOTE_I2C_WRITE with port number
[09:00:57] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID
[09:00:57] [PASSED] DP_REMOTE_I2C_WRITE with data array
[09:00:57] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID
[09:00:57] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID
[09:00:57] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event
[09:00:57] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event
[09:00:57] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior
[09:00:57] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior
[09:00:57] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode =====
[09:00:57] ================ [PASSED] drm_dp_mst_helper ================
[09:00:57] =========== drm_format_helper_test (11 subtests) ===========
[09:00:57] ============== drm_test_fb_xrgb8888_to_gray8  ==============
[09:00:57] [PASSED] single_pixel_source_buffer
[09:00:57] [PASSED] single_pixel_clip_rectangle
[09:00:57] [PASSED] well_known_colors
[09:00:57] [PASSED] destination_pitch
[09:00:57] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ==========
[09:00:57] ============= drm_test_fb_xrgb8888_to_rgb332  ==============
[09:00:57] [PASSED] single_pixel_source_buffer
[09:00:57] [PASSED] single_pixel_clip_rectangle
[09:00:57] [PASSED] well_known_colors
[09:00:57] [PASSED] destination_pitch
[09:00:57] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ==========
[09:00:57] ============= drm_test_fb_xrgb8888_to_rgb565  ==============
[09:00:57] [PASSED] single_pixel_source_buffer
[09:00:57] [PASSED] single_pixel_clip_rectangle
[09:00:57] [PASSED] well_known_colors
[09:00:57] [PASSED] destination_pitch
[09:00:57] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ==========
[09:00:57] ============ drm_test_fb_xrgb8888_to_xrgb1555  =============
[09:00:57] [PASSED] single_pixel_source_buffer
[09:00:57] [PASSED] single_pixel_clip_rectangle
[09:00:57] [PASSED] well_known_colors
[09:00:57] [PASSED] destination_pitch
[09:00:57] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 =========
[09:00:57] ============ drm_test_fb_xrgb8888_to_argb1555  =============
[09:00:57] [PASSED] single_pixel_source_buffer
[09:00:57] [PASSED] single_pixel_clip_rectangle
[09:00:57] [PASSED] well_known_colors
[09:00:57] [PASSED] destination_pitch
[09:00:57] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 =========
[09:00:57] ============ drm_test_fb_xrgb8888_to_rgba5551  =============
[09:00:57] [PASSED] single_pixel_source_buffer
[09:00:57] [PASSED] single_pixel_clip_rectangle
[09:00:57] [PASSED] well_known_colors
[09:00:57] [PASSED] destination_pitch
[09:00:57] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 =========
[09:00:57] ============= drm_test_fb_xrgb8888_to_rgb888  ==============
[09:00:57] [PASSED] single_pixel_source_buffer
[09:00:57] [PASSED] single_pixel_clip_rectangle
[09:00:57] [PASSED] well_known_colors
[09:00:57] [PASSED] destination_pitch
[09:00:57] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ==========
[09:00:57] ============ drm_test_fb_xrgb8888_to_argb8888  =============
[09:00:57] [PASSED] single_pixel_source_buffer
[09:00:57] [PASSED] single_pixel_clip_rectangle
[09:00:57] [PASSED] well_known_colors
[09:00:57] [PASSED] destination_pitch
[09:00:57] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 =========
[09:00:57] =========== drm_test_fb_xrgb8888_to_xrgb2101010  ===========
[09:00:57] [PASSED] single_pixel_source_buffer
[09:00:57] [PASSED] single_pixel_clip_rectangle
[09:00:57] [PASSED] well_known_colors
[09:00:57] [PASSED] destination_pitch
[09:00:57] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 =======
[09:00:57] =========== drm_test_fb_xrgb8888_to_argb2101010  ===========
[09:00:57] [PASSED] single_pixel_source_buffer
[09:00:57] [PASSED] single_pixel_clip_rectangle
[09:00:57] [PASSED] well_known_colors
[09:00:57] [PASSED] destination_pitch
[09:00:57] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 =======
[09:00:57] ============== drm_test_fb_xrgb8888_to_mono  ===============
[09:00:57] [PASSED] single_pixel_source_buffer
[09:00:57] [PASSED] single_pixel_clip_rectangle
[09:00:57] [PASSED] well_known_colors
[09:00:57] [PASSED] destination_pitch
[09:00:57] ========== [PASSED] drm_test_fb_xrgb8888_to_mono ===========
[09:00:57] ============= [PASSED] drm_format_helper_test ==============
[09:00:57] ================= drm_format (18 subtests) =================
[09:00:57] [PASSED] drm_test_format_block_width_invalid
[09:00:57] [PASSED] drm_test_format_block_width_one_plane
[09:00:57] [PASSED] drm_test_format_block_width_two_plane
[09:00:57] [PASSED] drm_test_format_block_width_three_plane
[09:00:57] [PASSED] drm_test_format_block_width_tiled
[09:00:57] [PASSED] drm_test_format_block_height_invalid
[09:00:57] [PASSED] drm_test_format_block_height_one_plane
[09:00:57] [PASSED] drm_test_format_block_height_two_plane
[09:00:57] [PASSED] drm_test_format_block_height_three_plane
[09:00:57] [PASSED] drm_test_format_block_height_tiled
[09:00:57] [PASSED] drm_test_format_min_pitch_invalid
[09:00:57] [PASSED] drm_test_format_min_pitch_one_plane_8bpp
[09:00:57] [PASSED] drm_test_format_min_pitch_one_plane_16bpp
[09:00:57] [PASSED] drm_test_format_min_pitch_one_plane_24bpp
[09:00:57] [PASSED] drm_test_format_min_pitch_one_plane_32bpp
[09:00:57] [PASSED] drm_test_format_min_pitch_two_plane
[09:00:57] [PASSED] drm_test_format_min_pitch_three_plane_8bpp
[09:00:57] [PASSED] drm_test_format_min_pitch_tiled
[09:00:57] =================== [PASSED] drm_format ====================
[09:00:57] =============== drm_framebuffer (1 subtest) ================
[09:00:57] =============== drm_test_framebuffer_create  ===============
[09:00:57] [PASSED] ABGR8888 normal sizes
[09:00:57] [PASSED] ABGR8888 max sizes
[09:00:57] [PASSED] ABGR8888 pitch greater than min required
[09:00:57] [PASSED] ABGR8888 pitch less than min required
[09:00:57] [PASSED] ABGR8888 Invalid width
[09:00:57] [PASSED] ABGR8888 Invalid buffer handle
[09:00:57] [PASSED] No pixel format
[09:00:57] [PASSED] ABGR8888 Width 0
[09:00:57] [PASSED] ABGR8888 Height 0
[09:00:57] [PASSED] ABGR8888 Out of bound height * pitch combination
[09:00:57] [PASSED] ABGR8888 Large buffer offset
[09:00:57] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers
[09:00:57] [PASSED] ABGR8888 Valid buffer modifier
[09:00:57] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE)
[09:00:57] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS
[09:00:57] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS
[09:00:57] [PASSED] NV12 Normal sizes
[09:00:57] [PASSED] NV12 Max sizes
[09:00:57] [PASSED] NV12 Invalid pitch
[09:00:57] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag
[09:00:57] [PASSED] NV12 different  modifier per-plane
[09:00:57] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE
[09:00:57] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS
[09:00:57] [PASSED] NV12 Modifier for inexistent plane
[09:00:57] [PASSED] NV12 Handle for inexistent plane
[09:00:57] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS
[09:00:57] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier
[09:00:57] [PASSED] YVU420 Normal sizes
[09:00:57] [PASSED] YVU420 Max sizes
[09:00:57] [PASSED] YVU420 Invalid pitch
[09:00:57] [PASSED] YVU420 Different pitches
[09:00:57] [PASSED] YVU420 Different buffer offsets/pitches
[09:00:57] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS
[09:00:57] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS
[09:00:57] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS
[09:00:57] [PASSED] YVU420 Valid modifier
[09:00:57] [PASSED] YVU420 Different modifiers per plane
[09:00:57] [PASSED] YVU420 Modifier for inexistent plane
[09:00:57] [PASSED] X0L2 Normal sizes
[09:00:57] [PASSED] X0L2 Max sizes
[09:00:57] [PASSED] X0L2 Invalid pitch
[09:00:57] [PASSED] X0L2 Pitch greater than minimum required
stty: 'standard input': Inappropriate ioctl for device
[09:00:57] [PASSED] X0L2 Handle for inexistent plane
[09:00:57] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set
[09:00:57] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set
[09:00:57] [PASSED] X0L2 Valid modifier
[09:00:57] [PASSED] X0L2 Modifier for inexistent plane
[09:00:57] =========== [PASSED] drm_test_framebuffer_create ===========
[09:00:57] ================= [PASSED] drm_framebuffer =================
[09:00:57] =============== drm-test-managed (1 subtest) ===============
[09:00:57] [PASSED] drm_test_managed_run_action
[09:00:57] ================ [PASSED] drm-test-managed =================
[09:00:57] =================== drm_mm (19 subtests) ===================
[09:00:57] [PASSED] drm_test_mm_init
[09:00:57] [PASSED] drm_test_mm_debug
[09:01:07] [PASSED] drm_test_mm_reserve
[09:01:17] [PASSED] drm_test_mm_insert
[09:01:17] [PASSED] drm_test_mm_replace
[09:01:17] [PASSED] drm_test_mm_insert_range
[09:01:17] [PASSED] drm_test_mm_frag
[09:01:17] [PASSED] drm_test_mm_align
[09:01:17] [PASSED] drm_test_mm_align32
[09:01:18] [PASSED] drm_test_mm_align64
[09:01:18] [PASSED] drm_test_mm_evict
[09:01:18] [PASSED] drm_test_mm_evict_range
[09:01:18] [PASSED] drm_test_mm_topdown
[09:01:18] [PASSED] drm_test_mm_bottomup
[09:01:18] [PASSED] drm_test_mm_lowest
[09:01:18] [PASSED] drm_test_mm_highest
[09:01:19] [PASSED] drm_test_mm_color
[09:01:19] [PASSED] drm_test_mm_color_evict
[09:01:19] [PASSED] drm_test_mm_color_evict_range
[09:01:19] ===================== [PASSED] drm_mm ======================
[09:01:19] ============= drm_modes_analog_tv (4 subtests) =============
[09:01:19] [PASSED] drm_test_modes_analog_tv_ntsc_480i
[09:01:19] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined
[09:01:19] [PASSED] drm_test_modes_analog_tv_pal_576i
[09:01:19] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined
[09:01:19] =============== [PASSED] drm_modes_analog_tv ===============
[09:01:19] ============== drm_plane_helper (2 subtests) ===============
[09:01:19] =============== drm_test_check_plane_state  ================
[09:01:19] [PASSED] clipping_simple
[09:01:19] [PASSED] clipping_rotate_reflect
[09:01:19] [PASSED] positioning_simple
[09:01:19] [PASSED] upscaling
[09:01:19] [PASSED] downscaling
[09:01:19] [PASSED] rounding1
[09:01:19] [PASSED] rounding2
[09:01:19] [PASSED] rounding3
[09:01:19] [PASSED] rounding4
[09:01:19] =========== [PASSED] drm_test_check_plane_state ============
[09:01:19] =========== drm_test_check_invalid_plane_state  ============
[09:01:19] [PASSED] positioning_invalid
[09:01:19] [PASSED] upscaling_invalid
[09:01:19] [PASSED] downscaling_invalid
[09:01:19] ======= [PASSED] drm_test_check_invalid_plane_state ========
[09:01:19] ================ [PASSED] drm_plane_helper =================
[09:01:19] ====== drm_connector_helper_tv_get_modes (1 subtest) =======
[09:01:19] ====== drm_test_connector_helper_tv_get_modes_check  =======
[09:01:19] [PASSED] None
[09:01:19] [PASSED] PAL
[09:01:19] [PASSED] NTSC
[09:01:19] [PASSED] Both, NTSC Default
[09:01:19] [PASSED] Both, PAL Default
[09:01:19] [PASSED] Both, NTSC Default, with PAL on command-line
[09:01:19] [PASSED] Both, PAL Default, with NTSC on command-line
[09:01:19] == [PASSED] drm_test_connector_helper_tv_get_modes_check ===
[09:01:19] ======== [PASSED] drm_connector_helper_tv_get_modes ========
[09:01:19] ================== drm_rect (9 subtests) ===================
[09:01:19] [PASSED] drm_test_rect_clip_scaled_div_by_zero
[09:01:19] [PASSED] drm_test_rect_clip_scaled_not_clipped
[09:01:19] [PASSED] drm_test_rect_clip_scaled_clipped
[09:01:19] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned
[09:01:19] ================= drm_test_rect_intersect  =================
[09:01:19] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0
[09:01:19] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1
[09:01:19] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0
[09:01:19] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1
[09:01:19] [PASSED] right x left: 2x1+0+0 x 3x1+1+0
[09:01:19] [PASSED] left x right: 3x1+1+0 x 2x1+0+0
[09:01:19] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1
[09:01:19] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0
[09:01:19] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1
[09:01:19] [PASSED] touching side: 1x1+0+0 x 1x1+1+0
[09:01:19] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0
[09:01:19] [PASSED] inside another: 2x2+0+0 x 1x1+1+1
[09:01:19] [PASSED] far away: 1x1+0+0 x 1x1+3+6
[09:01:19] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10
[09:01:19] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10
[09:01:19] ============= [PASSED] drm_test_rect_intersect =============
[09:01:19] ================ drm_test_rect_calc_hscale  ================
[09:01:19] [PASSED] normal use
[09:01:19] [PASSED] out of max range
[09:01:19] [PASSED] out of min range
[09:01:19] [PASSED] zero dst
[09:01:19] [PASSED] negative src
[09:01:19] [PASSED] negative dst
[09:01:19] ============ [PASSED] drm_test_rect_calc_hscale ============
[09:01:19] ================ drm_test_rect_calc_vscale  ================
[09:01:19] [PASSED] normal use
[09:01:19] [PASSED] out of max range
[09:01:19] [PASSED] out of min range
[09:01:19] [PASSED] zero dst
[09:01:19] [PASSED] negative src
[09:01:19] [PASSED] negative dst
[09:01:19] ============ [PASSED] drm_test_rect_calc_vscale ============
[09:01:19] ================== drm_test_rect_rotate  ===================
[09:01:19] [PASSED] reflect-x
[09:01:19] [PASSED] reflect-y
[09:01:19] [PASSED] rotate-0
[09:01:19] [PASSED] rotate-90
[09:01:19] [PASSED] rotate-180
[09:01:19] [PASSED] rotate-270
[09:01:19] ============== [PASSED] drm_test_rect_rotate ===============
[09:01:19] ================ drm_test_rect_rotate_inv  =================
[09:01:19] [PASSED] reflect-x
[09:01:19] [PASSED] reflect-y
[09:01:19] [PASSED] rotate-0
[09:01:19] [PASSED] rotate-90
[09:01:19] [PASSED] rotate-180
[09:01:19] [PASSED] rotate-270
[09:01:19] ============ [PASSED] drm_test_rect_rotate_inv =============
[09:01:19] ==================== [PASSED] drm_rect =====================
[09:01:19] ============================================================
[09:01:19] Testing complete. Ran 333 tests: passed: 333
[09:01:19] Elapsed time: 42.744s total, 1.723s configuring, 18.343s building, 22.663s running

+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel

#26 lore raw

[Intel-xe] ✓ CI.Build: success for drm/xe: Add engine scheduler control interface (rev9)

In reply to Tejas Upadhyay
== Series Details ==

== Series Details ==

Series: drm/xe: Add engine scheduler control interface (rev9)
URL : https://patchwork.freedesktop.org/series/119392/
State : success

== Summary ==

+ trap cleanup EXIT
+ cd /kernel
+ git clone https://gitlab.freedesktop.org/drm/xe/ci.git .ci
Cloning into '.ci'...
++ date +%s
+ echo -e '\e[0Ksection_start:1690448489:build_x86_64[collapsed=true]\r\e[0KBuild x86-64'
+ mkdir -p build64 section_start:1690448489:build_x86_64[collapsed=true]
Build x86-64
+ cat .ci/kernel/kconfig
+ make O=build64 olddefconfig
make[1]: Entering directory '/kernel/build64'

  GEN     Makefile
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/confdata.o
  HOSTCC  scripts/kconfig/expr.o
  LEX     scripts/kconfig/lexer.lex.c
  YACC    scripts/kconfig/parser.tab.[ch]
  HOSTCC  scripts/kconfig/lexer.lex.o
  HOSTCC  scripts/kconfig/menu.o
  HOSTCC  scripts/kconfig/parser.tab.o
  HOSTCC  scripts/kconfig/preprocess.o
  HOSTCC  scripts/kconfig/symbol.o
  HOSTCC  scripts/kconfig/util.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
make[1]: Leaving directory '/kernel/build64'
++ nproc
+ make O=build64 -j48
make[1]: Entering directory '/kernel/build64'
  GEN     Makefile
  WRAP    arch/x86/include/generated/uapi/asm/bpf_perf_event.h
  WRAP    arch/x86/include/generated/uapi/asm/errno.h
  WRAP    arch/x86/include/generated/uapi/asm/fcntl.h
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_32.h
  WRAP    arch/x86/include/generated/uapi/asm/ioctl.h
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_x32.h
  GEN     arch/x86/include/generated/asm/orc_hash.h
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_64.h
  WRAP    arch/x86/include/generated/uapi/asm/ioctls.h
  SYSTBL  arch/x86/include/generated/asm/syscalls_32.h
  WRAP    arch/x86/include/generated/uapi/asm/ipcbuf.h
  SYSHDR  arch/x86/include/generated/asm/unistd_32_ia32.h
  WRAP    arch/x86/include/generated/uapi/asm/param.h
  SYSHDR  arch/x86/include/generated/asm/unistd_64_x32.h
  SYSTBL  arch/x86/include/generated/asm/syscalls_64.h
  WRAP    arch/x86/include/generated/uapi/asm/poll.h
  WRAP    arch/x86/include/generated/uapi/asm/resource.h
  WRAP    arch/x86/include/generated/uapi/asm/socket.h
  WRAP    arch/x86/include/generated/uapi/asm/sockios.h
  WRAP    arch/x86/include/generated/uapi/asm/termbits.h
  WRAP    arch/x86/include/generated/uapi/asm/termios.h
  WRAP    arch/x86/include/generated/uapi/asm/types.h
  HOSTCC  arch/x86/tools/relocs_32.o
  HOSTCC  arch/x86/tools/relocs_64.o
  HOSTCC  arch/x86/tools/relocs_common.o
  WRAP    arch/x86/include/generated/asm/export.h
  WRAP    arch/x86/include/generated/asm/early_ioremap.h
  WRAP    arch/x86/include/generated/asm/mcs_spinlock.h
  WRAP    arch/x86/include/generated/asm/irq_regs.h
  WRAP    arch/x86/include/generated/asm/kmap_size.h
  WRAP    arch/x86/include/generated/asm/local64.h
  WRAP    arch/x86/include/generated/asm/mmiowb.h
  WRAP    arch/x86/include/generated/asm/module.lds.h
  WRAP    arch/x86/include/generated/asm/rwonce.h
  WRAP    arch/x86/include/generated/asm/unaligned.h
  UPD     include/generated/uapi/linux/version.h
  UPD     include/config/kernel.release
  UPD     include/generated/compile.h
  HOSTCC  scripts/unifdef
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/sorttable
  UPD     include/generated/utsrelease.h
  HOSTCC  scripts/asn1_compiler
  DESCEND objtool
  HOSTCC  /kernel/build64/tools/objtool/fixdep.o
  HOSTLD  /kernel/build64/tools/objtool/fixdep-in.o
  LINK    /kernel/build64/tools/objtool/fixdep
  HOSTLD  arch/x86/tools/relocs
  INSTALL /kernel/build64/tools/objtool/libsubcmd/include/subcmd/exec-cmd.h
  INSTALL /kernel/build64/tools/objtool/libsubcmd/include/subcmd/help.h
  INSTALL /kernel/build64/tools/objtool/libsubcmd/include/subcmd/pager.h
  INSTALL /kernel/build64/tools/objtool/libsubcmd/include/subcmd/parse-options.h
  INSTALL /kernel/build64/tools/objtool/libsubcmd/include/subcmd/run-command.h
  CC      /kernel/build64/tools/objtool/libsubcmd/exec-cmd.o
  CC      /kernel/build64/tools/objtool/libsubcmd/help.o
  CC      /kernel/build64/tools/objtool/libsubcmd/pager.o
  INSTALL libsubcmd_headers
  CC      /kernel/build64/tools/objtool/libsubcmd/parse-options.o
  CC      /kernel/build64/tools/objtool/libsubcmd/run-command.o
  CC      /kernel/build64/tools/objtool/libsubcmd/sigchain.o
  CC      /kernel/build64/tools/objtool/libsubcmd/subcmd-config.o
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
  CC      scripts/mod/devicetable-offsets.s
  HDRINST usr/include/video/edid.h
  HDRINST usr/include/video/uvesafb.h
  HDRINST usr/include/video/sisfb.h
  HDRINST usr/include/drm/amdgpu_drm.h
  HDRINST usr/include/drm/qaic_accel.h
  HDRINST usr/include/drm/i915_drm.h
  HDRINST usr/include/drm/vgem_drm.h
  HDRINST usr/include/drm/xe_drm.h
  HDRINST usr/include/drm/virtgpu_drm.h
  HDRINST usr/include/drm/omap_drm.h
  HDRINST usr/include/drm/radeon_drm.h
  HDRINST usr/include/drm/tegra_drm.h
  HDRINST usr/include/drm/drm_mode.h
  HDRINST usr/include/drm/ivpu_accel.h
  HDRINST usr/include/drm/exynos_drm.h
  HDRINST usr/include/drm/drm_sarea.h
  HDRINST usr/include/drm/qxl_drm.h
  HDRINST usr/include/drm/v3d_drm.h
  HDRINST usr/include/drm/nouveau_drm.h
  HDRINST usr/include/drm/drm_fourcc.h
  HDRINST usr/include/drm/habanalabs_accel.h
  HDRINST usr/include/drm/vmwgfx_drm.h
  HDRINST usr/include/drm/msm_drm.h
  HDRINST usr/include/drm/etnaviv_drm.h
  HDRINST usr/include/drm/vc4_drm.h
  HDRINST usr/include/drm/panfrost_drm.h
  HDRINST usr/include/drm/lima_drm.h
  HDRINST usr/include/drm/drm.h
  HDRINST usr/include/drm/armada_drm.h
  HDRINST usr/include/mtd/inftl-user.h
  HDRINST usr/include/mtd/nftl-user.h
  HDRINST usr/include/mtd/mtd-user.h
  HDRINST usr/include/mtd/ubi-user.h
  HDRINST usr/include/mtd/mtd-abi.h
  HDRINST usr/include/xen/gntalloc.h
  HDRINST usr/include/xen/gntdev.h
  HDRINST usr/include/xen/evtchn.h
  HDRINST usr/include/xen/privcmd.h
  HDRINST usr/include/asm-generic/auxvec.h
  HDRINST usr/include/asm-generic/bitsperlong.h
  HDRINST usr/include/asm-generic/posix_types.h
  HDRINST usr/include/asm-generic/ioctls.h
  HDRINST usr/include/asm-generic/mman.h
  HDRINST usr/include/asm-generic/shmbuf.h
  HDRINST usr/include/asm-generic/bpf_perf_event.h
  HDRINST usr/include/asm-generic/types.h
  HDRINST usr/include/asm-generic/poll.h
  HDRINST usr/include/asm-generic/msgbuf.h
  HDRINST usr/include/asm-generic/swab.h
  HDRINST usr/include/asm-generic/statfs.h
  HDRINST usr/include/asm-generic/unistd.h
  HDRINST usr/include/asm-generic/hugetlb_encode.h
  HDRINST usr/include/asm-generic/resource.h
  HDRINST usr/include/asm-generic/param.h
  HDRINST usr/include/asm-generic/termbits-common.h
  HDRINST usr/include/asm-generic/sockios.h
  HDRINST usr/include/asm-generic/kvm_para.h
  HDRINST usr/include/asm-generic/errno.h
  HDRINST usr/include/asm-generic/termios.h
  HDRINST usr/include/asm-generic/mman-common.h
  HDRINST usr/include/asm-generic/ioctl.h
  HDRINST usr/include/asm-generic/socket.h
  HDRINST usr/include/asm-generic/signal-defs.h
  HDRINST usr/include/asm-generic/termbits.h
  HDRINST usr/include/asm-generic/int-ll64.h
  HDRINST usr/include/asm-generic/signal.h
  HDRINST usr/include/asm-generic/siginfo.h
  HDRINST usr/include/asm-generic/stat.h
  HDRINST usr/include/asm-generic/int-l64.h
  HDRINST usr/include/asm-generic/errno-base.h
  HDRINST usr/include/asm-generic/fcntl.h
  HDRINST usr/include/asm-generic/setup.h
  HDRINST usr/include/asm-generic/ipcbuf.h
  HDRINST usr/include/asm-generic/sembuf.h
  HDRINST usr/include/asm-generic/ucontext.h
  HDRINST usr/include/rdma/mlx5_user_ioctl_cmds.h
  HDRINST usr/include/rdma/irdma-abi.h
  HDRINST usr/include/rdma/mana-abi.h
  HDRINST usr/include/rdma/hfi/hfi1_user.h
  HDRINST usr/include/rdma/hfi/hfi1_ioctl.h
  HDRINST usr/include/rdma/rdma_user_rxe.h
  HDRINST usr/include/rdma/rdma_user_ioctl.h
  HDRINST usr/include/rdma/mlx5_user_ioctl_verbs.h
  HDRINST usr/include/rdma/bnxt_re-abi.h
  HDRINST usr/include/rdma/hns-abi.h
  HDRINST usr/include/rdma/qedr-abi.h
  HDRINST usr/include/rdma/ib_user_ioctl_cmds.h
  HDRINST usr/include/rdma/vmw_pvrdma-abi.h
  HDRINST usr/include/rdma/ib_user_sa.h
  HDRINST usr/include/rdma/ib_user_ioctl_verbs.h
  HDRINST usr/include/rdma/rvt-abi.h
  HDRINST usr/include/rdma/mlx5-abi.h
  HDRINST usr/include/rdma/rdma_netlink.h
  HDRINST usr/include/rdma/erdma-abi.h
  HDRINST usr/include/rdma/rdma_user_ioctl_cmds.h
  HDRINST usr/include/rdma/rdma_user_cm.h
  HDRINST usr/include/rdma/ib_user_verbs.h
  HDRINST usr/include/rdma/efa-abi.h
  HDRINST usr/include/rdma/siw-abi.h
  HDRINST usr/include/rdma/mlx4-abi.h
  HDRINST usr/include/rdma/mthca-abi.h
  HDRINST usr/include/rdma/ib_user_mad.h
  HDRINST usr/include/rdma/ocrdma-abi.h
  HDRINST usr/include/rdma/cxgb4-abi.h
  HDRINST usr/include/misc/xilinx_sdfec.h
  HDRINST usr/include/misc/uacce/hisi_qm.h
  HDRINST usr/include/misc/uacce/uacce.h
  HDRINST usr/include/misc/cxl.h
  HDRINST usr/include/misc/ocxl.h
  HDRINST usr/include/misc/fastrpc.h
  HDRINST usr/include/misc/pvpanic.h
  HDRINST usr/include/linux/i8k.h
  HDRINST usr/include/linux/acct.h
  HDRINST usr/include/linux/atmmpc.h
  HDRINST usr/include/linux/fs.h
  HDRINST usr/include/linux/cifs/cifs_mount.h
  HDRINST usr/include/linux/cifs/cifs_netlink.h
  HDRINST usr/include/linux/if_packet.h
  HDRINST usr/include/linux/route.h
  HDRINST usr/include/linux/patchkey.h
  HDRINST usr/include/linux/tc_ematch/tc_em_cmp.h
  HDRINST usr/include/linux/tc_ematch/tc_em_ipt.h
  HDRINST usr/include/linux/tc_ematch/tc_em_meta.h
  HDRINST usr/include/linux/tc_ematch/tc_em_nbyte.h
  HDRINST usr/include/linux/tc_ematch/tc_em_text.h
  HDRINST usr/include/linux/virtio_pmem.h
  HDRINST usr/include/linux/rkisp1-config.h
  HDRINST usr/include/linux/vhost.h
  HDRINST usr/include/linux/cec-funcs.h
  HDRINST usr/include/linux/ppdev.h
  HDRINST usr/include/linux/isdn/capicmd.h
  HDRINST usr/include/linux/virtio_fs.h
  HDRINST usr/include/linux/netfilter_ipv6.h
  HDRINST usr/include/linux/lirc.h
  HDRINST usr/include/linux/mroute6.h
  HDRINST usr/include/linux/nl80211-vnd-intel.h
  HDRINST usr/include/linux/ivtvfb.h
  UPD     scripts/mod/devicetable-offsets.h
  HDRINST usr/include/linux/auxvec.h
  HDRINST usr/include/linux/dm-log-userspace.h
  HDRINST usr/include/linux/dccp.h
  HDRINST usr/include/linux/virtio_scmi.h
  HDRINST usr/include/linux/atmarp.h
  HDRINST usr/include/linux/arcfb.h
  HDRINST usr/include/linux/nbd-netlink.h
  HDRINST usr/include/linux/sched/types.h
  HDRINST usr/include/linux/tcp.h
  HDRINST usr/include/linux/neighbour.h
  HDRINST usr/include/linux/dlm_device.h
  HDRINST usr/include/linux/wmi.h
  HDRINST usr/include/linux/btrfs_tree.h
  HDRINST usr/include/linux/virtio_crypto.h
  HDRINST usr/include/linux/vbox_err.h
  HDRINST usr/include/linux/edd.h
  HDRINST usr/include/linux/loop.h
  HDRINST usr/include/linux/nvme_ioctl.h
  HDRINST usr/include/linux/mmtimer.h
  HDRINST usr/include/linux/if_pppol2tp.h
  HDRINST usr/include/linux/mtio.h
  HDRINST usr/include/linux/if_arcnet.h
  HDRINST usr/include/linux/romfs_fs.h
  HDRINST usr/include/linux/posix_types.h
  HDRINST usr/include/linux/rtc.h
  HDRINST usr/include/linux/landlock.h
  HDRINST usr/include/linux/gpio.h
  HDRINST usr/include/linux/selinux_netlink.h
  HDRINST usr/include/linux/pps.h
  HDRINST usr/include/linux/ndctl.h
  HDRINST usr/include/linux/virtio_gpu.h
  HDRINST usr/include/linux/android/binderfs.h
  HDRINST usr/include/linux/android/binder.h
  HDRINST usr/include/linux/virtio_vsock.h
  HDRINST usr/include/linux/sound.h
  HDRINST usr/include/linux/vtpm_proxy.h
  HDRINST usr/include/linux/nfs_fs.h
  HDRINST usr/include/linux/elf-fdpic.h
  HDRINST usr/include/linux/adfs_fs.h
  HDRINST usr/include/linux/target_core_user.h
  HDRINST usr/include/linux/netlink_diag.h
  HDRINST usr/include/linux/const.h
  HDRINST usr/include/linux/firewire-cdev.h
  HDRINST usr/include/linux/vdpa.h
  HDRINST usr/include/linux/if_infiniband.h
  HDRINST usr/include/linux/serial.h
  MKELF   scripts/mod/elfconfig.h
  HDRINST usr/include/linux/iio/types.h
  HDRINST usr/include/linux/iio/buffer.h
  HDRINST usr/include/linux/iio/events.h
  HDRINST usr/include/linux/baycom.h
  HDRINST usr/include/linux/major.h
  HDRINST usr/include/linux/atmppp.h
  HDRINST usr/include/linux/ipv6_route.h
  HOSTCC  scripts/mod/modpost.o
  HDRINST usr/include/linux/spi/spidev.h
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/mod/sumversion.o
  HDRINST usr/include/linux/spi/spi.h
  HDRINST usr/include/linux/virtio_ring.h
  HDRINST usr/include/linux/hdlc/ioctl.h
  HDRINST usr/include/linux/remoteproc_cdev.h
  HDRINST usr/include/linux/hyperv.h
  HDRINST usr/include/linux/rpl_iptunnel.h
  HDRINST usr/include/linux/sync_file.h
  HDRINST usr/include/linux/igmp.h
  HDRINST usr/include/linux/v4l2-dv-timings.h
  HDRINST usr/include/linux/virtio_i2c.h
  HDRINST usr/include/linux/xfrm.h
  HDRINST usr/include/linux/capability.h
  HDRINST usr/include/linux/gtp.h
  HDRINST usr/include/linux/xdp_diag.h
  HDRINST usr/include/linux/pkt_cls.h
  HDRINST usr/include/linux/suspend_ioctls.h
  HDRINST usr/include/linux/vt.h
  HDRINST usr/include/linux/loadpin.h
  HDRINST usr/include/linux/dlm_plock.h
  HDRINST usr/include/linux/fb.h
  HDRINST usr/include/linux/max2175.h
  HDRINST usr/include/linux/sunrpc/debug.h
  HDRINST usr/include/linux/gsmmux.h
  HDRINST usr/include/linux/watchdog.h
  HDRINST usr/include/linux/vhost_types.h
  HDRINST usr/include/linux/vduse.h
  HDRINST usr/include/linux/ila.h
  HDRINST usr/include/linux/tdx-guest.h
  HDRINST usr/include/linux/close_range.h
  HDRINST usr/include/linux/ivtv.h
  HDRINST usr/include/linux/cryptouser.h
  HDRINST usr/include/linux/netfilter/xt_string.h
  HDRINST usr/include/linux/netfilter/nfnetlink_compat.h
  HDRINST usr/include/linux/netfilter/nf_nat.h
  HDRINST usr/include/linux/netfilter/xt_recent.h
  HDRINST usr/include/linux/netfilter/xt_addrtype.h
  HDRINST usr/include/linux/netfilter/nf_conntrack_tcp.h
  HDRINST usr/include/linux/netfilter/xt_MARK.h
  HDRINST usr/include/linux/netfilter/xt_SYNPROXY.h
  HDRINST usr/include/linux/netfilter/xt_multiport.h
  HDRINST usr/include/linux/netfilter/nfnetlink.h
  HDRINST usr/include/linux/netfilter/xt_cgroup.h
  HDRINST usr/include/linux/netfilter/nf_synproxy.h
  HDRINST usr/include/linux/netfilter/xt_TCPOPTSTRIP.h
  HDRINST usr/include/linux/netfilter/nfnetlink_log.h
  HDRINST usr/include/linux/netfilter/xt_TPROXY.h
  HDRINST usr/include/linux/netfilter/xt_u32.h
  HDRINST usr/include/linux/netfilter/nfnetlink_osf.h
  HDRINST usr/include/linux/netfilter/xt_ecn.h
  HDRINST usr/include/linux/netfilter/xt_esp.h
  HDRINST usr/include/linux/netfilter/nfnetlink_hook.h
  HDRINST usr/include/linux/netfilter/xt_mac.h
  HDRINST usr/include/linux/netfilter/xt_comment.h
  HDRINST usr/include/linux/netfilter/xt_NFQUEUE.h
  HDRINST usr/include/linux/netfilter/xt_osf.h
  HDRINST usr/include/linux/netfilter/xt_hashlimit.h
  HDRINST usr/include/linux/netfilter/nf_conntrack_sctp.h
  HDRINST usr/include/linux/netfilter/xt_socket.h
  HDRINST usr/include/linux/netfilter/xt_connmark.h
  HDRINST usr/include/linux/netfilter/xt_sctp.h
  HDRINST usr/include/linux/netfilter/xt_tcpudp.h
  HDRINST usr/include/linux/netfilter/xt_DSCP.h
  HDRINST usr/include/linux/netfilter/xt_time.h
  HDRINST usr/include/linux/netfilter/xt_IDLETIMER.h
  HDRINST usr/include/linux/netfilter/xt_policy.h
  HDRINST usr/include/linux/netfilter/xt_rpfilter.h
  HDRINST usr/include/linux/netfilter/xt_nfacct.h
  HDRINST usr/include/linux/netfilter/xt_SECMARK.h
  HDRINST usr/include/linux/netfilter/xt_length.h
  HDRINST usr/include/linux/netfilter/nfnetlink_cthelper.h
  HDRINST usr/include/linux/netfilter/xt_quota.h
  HDRINST usr/include/linux/netfilter/xt_CLASSIFY.h
  HDRINST usr/include/linux/netfilter/xt_ipcomp.h
  HDRINST usr/include/linux/netfilter/xt_iprange.h
  HDRINST usr/include/linux/netfilter/xt_bpf.h
  HDRINST usr/include/linux/netfilter/xt_LOG.h
  HDRINST usr/include/linux/netfilter/xt_rateest.h
  HDRINST usr/include/linux/netfilter/xt_CONNSECMARK.h
  HDRINST usr/include/linux/netfilter/xt_HMARK.h
  HDRINST usr/include/linux/netfilter/xt_CONNMARK.h
  HDRINST usr/include/linux/netfilter/xt_pkttype.h
  HDRINST usr/include/linux/netfilter/xt_ipvs.h
  HDRINST usr/include/linux/netfilter/xt_devgroup.h
  HDRINST usr/include/linux/netfilter/xt_AUDIT.h
  HDRINST usr/include/linux/netfilter/xt_realm.h
  HDRINST usr/include/linux/netfilter/nf_conntrack_common.h
  HDRINST usr/include/linux/netfilter/xt_set.h
  HDRINST usr/include/linux/netfilter/xt_LED.h
  HDRINST usr/include/linux/netfilter/xt_connlabel.h
  HDRINST usr/include/linux/netfilter/xt_owner.h
  HDRINST usr/include/linux/netfilter/xt_dccp.h
  HDRINST usr/include/linux/netfilter/xt_limit.h
  HDRINST usr/include/linux/netfilter/xt_conntrack.h
  HDRINST usr/include/linux/netfilter/xt_TEE.h
  HDRINST usr/include/linux/netfilter/xt_RATEEST.h
  HDRINST usr/include/linux/netfilter/xt_connlimit.h
  HDRINST usr/include/linux/netfilter/ipset/ip_set.h
  HDRINST usr/include/linux/netfilter/ipset/ip_set_list.h
  HDRINST usr/include/linux/netfilter/ipset/ip_set_hash.h
  HDRINST usr/include/linux/netfilter/ipset/ip_set_bitmap.h
  HDRINST usr/include/linux/netfilter/x_tables.h
  HDRINST usr/include/linux/netfilter/xt_dscp.h
  HDRINST usr/include/linux/netfilter/xt_cluster.h
  HDRINST usr/include/linux/netfilter/nf_conntrack_ftp.h
  HDRINST usr/include/linux/netfilter/nf_conntrack_tuple_common.h
  HDRINST usr/include/linux/netfilter/nf_log.h
  HDRINST usr/include/linux/netfilter/xt_tcpmss.h
  HDRINST usr/include/linux/netfilter/xt_NFLOG.h
  HDRINST usr/include/linux/netfilter/xt_l2tp.h
  HDRINST usr/include/linux/netfilter/xt_helper.h
  HDRINST usr/include/linux/netfilter/xt_statistic.h
  HDRINST usr/include/linux/netfilter/nfnetlink_queue.h
  HDRINST usr/include/linux/netfilter/nfnetlink_cttimeout.h
  HDRINST usr/include/linux/netfilter/xt_CT.h
  HDRINST usr/include/linux/netfilter/xt_CHECKSUM.h
  HDRINST usr/include/linux/netfilter/xt_connbytes.h
  HDRINST usr/include/linux/netfilter/xt_state.h
  HDRINST usr/include/linux/netfilter/nf_tables.h
  HDRINST usr/include/linux/netfilter/xt_mark.h
  HDRINST usr/include/linux/netfilter/xt_cpu.h
  HDRINST usr/include/linux/netfilter/nf_tables_compat.h
  HDRINST usr/include/linux/netfilter/xt_physdev.h
  HDRINST usr/include/linux/netfilter/nfnetlink_conntrack.h
  HDRINST usr/include/linux/netfilter/nfnetlink_acct.h
  HDRINST usr/include/linux/netfilter/xt_TCPMSS.h
  HDRINST usr/include/linux/tty_flags.h
  HDRINST usr/include/linux/if_phonet.h
  HDRINST usr/include/linux/elf-em.h
  HDRINST usr/include/linux/vm_sockets.h
  HDRINST usr/include/linux/dlmconstants.h
  HDRINST usr/include/linux/bsg.h
  HDRINST usr/include/linux/matroxfb.h
  HDRINST usr/include/linux/sysctl.h
  HDRINST usr/include/linux/unix_diag.h
  HDRINST usr/include/linux/pcitest.h
  HDRINST usr/include/linux/mman.h
  HDRINST usr/include/linux/if_plip.h
  HDRINST usr/include/linux/virtio_balloon.h
  HDRINST usr/include/linux/pidfd.h
  HDRINST usr/include/linux/f2fs.h
  HDRINST usr/include/linux/x25.h
  HDRINST usr/include/linux/if_cablemodem.h
  HDRINST usr/include/linux/utsname.h
  HDRINST usr/include/linux/counter.h
  HDRINST usr/include/linux/atm_tcp.h
  HDRINST usr/include/linux/atalk.h
  HDRINST usr/include/linux/virtio_rng.h
  HDRINST usr/include/linux/vboxguest.h
  HDRINST usr/include/linux/bpf_perf_event.h
  HDRINST usr/include/linux/ipmi_ssif_bmc.h
  HDRINST usr/include/linux/nfs_mount.h
  HDRINST usr/include/linux/sonet.h
  HDRINST usr/include/linux/netfilter.h
  HDRINST usr/include/linux/keyctl.h
  HDRINST usr/include/linux/nl80211.h
  HDRINST usr/include/linux/misc/bcm_vk.h
  HDRINST usr/include/linux/audit.h
  HDRINST usr/include/linux/tipc_config.h
  HDRINST usr/include/linux/tipc_sockets_diag.h
  HDRINST usr/include/linux/futex.h
  HDRINST usr/include/linux/sev-guest.h
  HDRINST usr/include/linux/ublk_cmd.h
  HDRINST usr/include/linux/types.h
  HDRINST usr/include/linux/virtio_input.h
  HDRINST usr/include/linux/if_slip.h
  HDRINST usr/include/linux/personality.h
  HDRINST usr/include/linux/openat2.h
  HDRINST usr/include/linux/poll.h
  HDRINST usr/include/linux/posix_acl.h
  HDRINST usr/include/linux/smc_diag.h
  HDRINST usr/include/linux/snmp.h
  HDRINST usr/include/linux/errqueue.h
  HDRINST usr/include/linux/if_tunnel.h
  HDRINST usr/include/linux/fanotify.h
  HDRINST usr/include/linux/kernel.h
  HDRINST usr/include/linux/rtnetlink.h
  HDRINST usr/include/linux/rpl.h
  HDRINST usr/include/linux/memfd.h
  HDRINST usr/include/linux/serial_core.h
  HDRINST usr/include/linux/dns_resolver.h
  HDRINST usr/include/linux/pr.h
  HDRINST usr/include/linux/atm_eni.h
  HDRINST usr/include/linux/lp.h
  HDRINST usr/include/linux/virtio_mem.h
  HDRINST usr/include/linux/ultrasound.h
  HDRINST usr/include/linux/sctp.h
  HDRINST usr/include/linux/uio.h
  HDRINST usr/include/linux/tcp_metrics.h
  HDRINST usr/include/linux/wwan.h
  HDRINST usr/include/linux/atmbr2684.h
  HDRINST usr/include/linux/in_route.h
  HDRINST usr/include/linux/qemu_fw_cfg.h
  HDRINST usr/include/linux/if_macsec.h
  HDRINST usr/include/linux/usb/charger.h
  HDRINST usr/include/linux/usb/g_uvc.h
  HDRINST usr/include/linux/usb/gadgetfs.h
  HDRINST usr/include/linux/usb/raw_gadget.h
  HDRINST usr/include/linux/usb/cdc-wdm.h
  HDRINST usr/include/linux/usb/g_printer.h
  HDRINST usr/include/linux/usb/midi.h
  HDRINST usr/include/linux/usb/tmc.h
  HDRINST usr/include/linux/usb/video.h
  HDRINST usr/include/linux/usb/functionfs.h
  HDRINST usr/include/linux/usb/audio.h
  HDRINST usr/include/linux/usb/ch11.h
  HDRINST usr/include/linux/usb/ch9.h
  HDRINST usr/include/linux/usb/cdc.h
  HDRINST usr/include/linux/jffs2.h
  HDRINST usr/include/linux/ax25.h
  HDRINST usr/include/linux/auto_fs.h
  HDRINST usr/include/linux/tiocl.h
  HDRINST usr/include/linux/scc.h
  HDRINST usr/include/linux/psci.h
  HDRINST usr/include/linux/swab.h
  HDRINST usr/include/linux/cec.h
  HDRINST usr/include/linux/kfd_ioctl.h
  HDRINST usr/include/linux/smc.h
  HDRINST usr/include/linux/qrtr.h
  HDRINST usr/include/linux/screen_info.h
  HDRINST usr/include/linux/nfsacl.h
  HDRINST usr/include/linux/seg6_hmac.h
  HDRINST usr/include/linux/gameport.h
  HDRINST usr/include/linux/wireless.h
  HDRINST usr/include/linux/fdreg.h
  HDRINST usr/include/linux/cciss_defs.h
  HDRINST usr/include/linux/serial_reg.h
  HDRINST usr/include/linux/perf_event.h
  HDRINST usr/include/linux/in6.h
  HDRINST usr/include/linux/hid.h
  HDRINST usr/include/linux/netlink.h
  HDRINST usr/include/linux/fuse.h
  HDRINST usr/include/linux/magic.h
  HDRINST usr/include/linux/ioam6_iptunnel.h
  HDRINST usr/include/linux/stm.h
  HDRINST usr/include/linux/vsockmon.h
  HDRINST usr/include/linux/seg6.h
  HDRINST usr/include/linux/idxd.h
  HDRINST usr/include/linux/nitro_enclaves.h
  HDRINST usr/include/linux/ptrace.h
  HDRINST usr/include/linux/ioam6_genl.h
  HDRINST usr/include/linux/qnx4_fs.h
  HDRINST usr/include/linux/fsl_mc.h
  HDRINST usr/include/linux/net_tstamp.h
  HDRINST usr/include/linux/msg.h
  HDRINST usr/include/linux/netfilter_ipv4/ipt_TTL.h
  HDRINST usr/include/linux/netfilter_ipv4/ipt_ttl.h
  HDRINST usr/include/linux/netfilter_ipv4/ipt_ah.h
  HDRINST usr/include/linux/netfilter_ipv4/ipt_ECN.h
  HDRINST usr/include/linux/netfilter_ipv4/ip_tables.h
  HDRINST usr/include/linux/netfilter_ipv4/ipt_ecn.h
  HDRINST usr/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h
  HDRINST usr/include/linux/netfilter_ipv4/ipt_REJECT.h
  HDRINST usr/include/linux/netfilter_ipv4/ipt_LOG.h
  HDRINST usr/include/linux/sem.h
  HDRINST usr/include/linux/net_namespace.h
  HDRINST usr/include/linux/radeonfb.h
  HDRINST usr/include/linux/tee.h
  HDRINST usr/include/linux/udp.h
  HDRINST usr/include/linux/virtio_bt.h
  HDRINST usr/include/linux/v4l2-subdev.h
  HDRINST usr/include/linux/posix_acl_xattr.h
  HDRINST usr/include/linux/v4l2-mediabus.h
  HDRINST usr/include/linux/atmapi.h
  HDRINST usr/include/linux/raid/md_p.h
  HDRINST usr/include/linux/raid/md_u.h
  HDRINST usr/include/linux/zorro_ids.h
  HDRINST usr/include/linux/nbd.h
  HDRINST usr/include/linux/isst_if.h
  HDRINST usr/include/linux/rxrpc.h
  HDRINST usr/include/linux/unistd.h
  HDRINST usr/include/linux/if_arp.h
  HDRINST usr/include/linux/atm_zatm.h
  HDRINST usr/include/linux/io_uring.h
  HDRINST usr/include/linux/if_fddi.h
  HDRINST usr/include/linux/bpqether.h
  HDRINST usr/include/linux/sysinfo.h
  HDRINST usr/include/linux/auto_dev-ioctl.h
  HDRINST usr/include/linux/nfs4_mount.h
  HDRINST usr/include/linux/keyboard.h
  HDRINST usr/include/linux/virtio_mmio.h
  HDRINST usr/include/linux/input.h
  HDRINST usr/include/linux/qnxtypes.h
  HDRINST usr/include/linux/mdio.h
  HDRINST usr/include/linux/lwtunnel.h
  HDRINST usr/include/linux/gfs2_ondisk.h
  HDRINST usr/include/linux/nfs4.h
  HDRINST usr/include/linux/ptp_clock.h
  HDRINST usr/include/linux/nubus.h
  HDRINST usr/include/linux/if_bonding.h
  HDRINST usr/include/linux/kcov.h
  HDRINST usr/include/linux/fadvise.h
  HDRINST usr/include/linux/taskstats.h
  HDRINST usr/include/linux/veth.h
  HDRINST usr/include/linux/atm.h
  HDRINST usr/include/linux/ipmi.h
  HDRINST usr/include/linux/kdev_t.h
  HDRINST usr/include/linux/mount.h
  HDRINST usr/include/linux/shm.h
  HDRINST usr/include/linux/resource.h
  HDRINST usr/include/linux/prctl.h
  HDRINST usr/include/linux/watch_queue.h
  HDRINST usr/include/linux/sched.h
  HDRINST usr/include/linux/phonet.h
  HDRINST usr/include/linux/random.h
  HDRINST usr/include/linux/tty.h
  HDRINST usr/include/linux/apm_bios.h
  HDRINST usr/include/linux/fd.h
  HDRINST usr/include/linux/um_timetravel.h
  HDRINST usr/include/linux/tls.h
  HDRINST usr/include/linux/rpmsg_types.h
  HDRINST usr/include/linux/pfrut.h
  HDRINST usr/include/linux/mei.h
  HDRINST usr/include/linux/fsi.h
  HDRINST usr/include/linux/rds.h
  HDRINST usr/include/linux/if_x25.h
  HDRINST usr/include/linux/param.h
  HDRINST usr/include/linux/netdevice.h
  HDRINST usr/include/linux/binfmts.h
  HDRINST usr/include/linux/if_pppox.h
  HDRINST usr/include/linux/sockios.h
  HDRINST usr/include/linux/kcm.h
  HDRINST usr/include/linux/virtio_9p.h
  HDRINST usr/include/linux/genwqe/genwqe_card.h
  HDRINST usr/include/linux/if_tun.h
  HDRINST usr/include/linux/ext4.h
  HDRINST usr/include/linux/if_ether.h
  HDRINST usr/include/linux/kvm_para.h
  HDRINST usr/include/linux/kernel-page-flags.h
  HDRINST usr/include/linux/cdrom.h
  HDRINST usr/include/linux/un.h
  HDRINST usr/include/linux/module.h
  HDRINST usr/include/linux/mqueue.h
  HDRINST usr/include/linux/a.out.h
  HDRINST usr/include/linux/input-event-codes.h
  HDRINST usr/include/linux/coda.h
  HDRINST usr/include/linux/rio_mport_cdev.h
  HDRINST usr/include/linux/ipsec.h
  HDRINST usr/include/linux/blkpg.h
  HDRINST usr/include/linux/blkzoned.h
  HDRINST usr/include/linux/netfilter_bridge/ebt_arpreply.h
  HDRINST usr/include/linux/netfilter_bridge/ebt_redirect.h
  HDRINST usr/include/linux/netfilter_bridge/ebt_nflog.h
  HDRINST usr/include/linux/netfilter_bridge/ebt_802_3.h
  HDRINST usr/include/linux/netfilter_bridge/ebt_nat.h
  HDRINST usr/include/linux/netfilter_bridge/ebt_mark_m.h
  HDRINST usr/include/linux/netfilter_bridge/ebtables.h
  HDRINST usr/include/linux/netfilter_bridge/ebt_vlan.h
  HDRINST usr/include/linux/netfilter_bridge/ebt_limit.h
  HDRINST usr/include/linux/netfilter_bridge/ebt_log.h
  HDRINST usr/include/linux/netfilter_bridge/ebt_stp.h
  HDRINST usr/include/linux/netfilter_bridge/ebt_pkttype.h
  HDRINST usr/include/linux/netfilter_bridge/ebt_ip.h
  HDRINST usr/include/linux/netfilter_bridge/ebt_ip6.h
  HDRINST usr/include/linux/netfilter_bridge/ebt_arp.h
  HDRINST usr/include/linux/netfilter_bridge/ebt_mark_t.h
  HDRINST usr/include/linux/netfilter_bridge/ebt_among.h
  HDRINST usr/include/linux/reiserfs_fs.h
  HDRINST usr/include/linux/cciss_ioctl.h
  HDRINST usr/include/linux/fsmap.h
  HDRINST usr/include/linux/smiapp.h
  HDRINST usr/include/linux/switchtec_ioctl.h
  HDRINST usr/include/linux/atmdev.h
  HDRINST usr/include/linux/hpet.h
  HDRINST usr/include/linux/virtio_config.h
  HDRINST usr/include/linux/string.h
  HDRINST usr/include/linux/kfd_sysfs.h
  HDRINST usr/include/linux/inet_diag.h
  HDRINST usr/include/linux/netdev.h
  LD      /kernel/build64/tools/objtool/libsubcmd/libsubcmd-in.o
  HDRINST usr/include/linux/xattr.h
  HDRINST usr/include/linux/iommufd.h
  HDRINST usr/include/linux/user_events.h
  HDRINST usr/include/linux/errno.h
  HDRINST usr/include/linux/icmp.h
  HDRINST usr/include/linux/i2o-dev.h
  HDRINST usr/include/linux/pg.h
  HDRINST usr/include/linux/if_bridge.h
  HDRINST usr/include/linux/thermal.h
  HDRINST usr/include/linux/uinput.h
  HDRINST usr/include/linux/handshake.h
  HDRINST usr/include/linux/dqblk_xfs.h
  HDRINST usr/include/linux/v4l2-common.h
  HDRINST usr/include/linux/nvram.h
  HDRINST usr/include/linux/if_vlan.h
  HDRINST usr/include/linux/uhid.h
  HDRINST usr/include/linux/omap3isp.h
  HDRINST usr/include/linux/rose.h
  HDRINST usr/include/linux/phantom.h
  HDRINST usr/include/linux/ipmi_msgdefs.h
  HDRINST usr/include/linux/bcm933xx_hcs.h
  HDRINST usr/include/linux/bpf.h
  HDRINST usr/include/linux/mempolicy.h
  HDRINST usr/include/linux/efs_fs_sb.h
  HDRINST usr/include/linux/nexthop.h
  HDRINST usr/include/linux/net_dropmon.h
  HDRINST usr/include/linux/surface_aggregator/cdev.h
  HDRINST usr/include/linux/surface_aggregator/dtx.h
  HDRINST usr/include/linux/net.h
  AR      /kernel/build64/tools/objtool/libsubcmd/libsubcmd.a
  HDRINST usr/include/linux/mii.h
  HDRINST usr/include/linux/virtio_pcidev.h
  HDRINST usr/include/linux/termios.h
  HDRINST usr/include/linux/cgroupstats.h
  HDRINST usr/include/linux/mpls.h
  HDRINST usr/include/linux/iommu.h
  HDRINST usr/include/linux/toshiba.h
  HDRINST usr/include/linux/virtio_scsi.h
  HDRINST usr/include/linux/zorro.h
  HDRINST usr/include/linux/chio.h
  HDRINST usr/include/linux/pkt_sched.h
  HDRINST usr/include/linux/cramfs_fs.h
  HDRINST usr/include/linux/nfs3.h
  HDRINST usr/include/linux/vfio_ccw.h
  HDRINST usr/include/linux/atm_nicstar.h
  HDRINST usr/include/linux/ncsi.h
  HDRINST usr/include/linux/virtio_net.h
  HDRINST usr/include/linux/ioctl.h
  HDRINST usr/include/linux/stddef.h
  HDRINST usr/include/linux/limits.h
  HDRINST usr/include/linux/ipmi_bmc.h
  HDRINST usr/include/linux/netfilter_arp.h
  HDRINST usr/include/linux/if_addr.h
  HDRINST usr/include/linux/rpmsg.h
  HDRINST usr/include/linux/media-bus-format.h
  HDRINST usr/include/linux/kernelcapi.h
  HDRINST usr/include/linux/ppp_defs.h
  HDRINST usr/include/linux/ethtool.h
  HDRINST usr/include/linux/aspeed-video.h
  HDRINST usr/include/linux/hdlc.h
  HDRINST usr/include/linux/fscrypt.h
  HDRINST usr/include/linux/batadv_packet.h
  HDRINST usr/include/linux/uuid.h
  HDRINST usr/include/linux/capi.h
  HDRINST usr/include/linux/mptcp.h
  HDRINST usr/include/linux/hidraw.h
  HDRINST usr/include/linux/virtio_console.h
  HDRINST usr/include/linux/irqnr.h
  HDRINST usr/include/linux/coresight-stm.h
  HDRINST usr/include/linux/cxl_mem.h
  HDRINST usr/include/linux/iso_fs.h
  HDRINST usr/include/linux/virtio_blk.h
  HDRINST usr/include/linux/udf_fs_i.h
  HDRINST usr/include/linux/coff.h
  HDRINST usr/include/linux/dma-buf.h
  HDRINST usr/include/linux/ife.h
  HDRINST usr/include/linux/agpgart.h
  HDRINST usr/include/linux/socket.h
  HDRINST usr/include/linux/nilfs2_ondisk.h
  HDRINST usr/include/linux/connector.h
  HDRINST usr/include/linux/auto_fs4.h
  HDRINST usr/include/linux/bt-bmc.h
  HDRINST usr/include/linux/map_to_7segment.h
  HDRINST usr/include/linux/tc_act/tc_skbedit.h
  HDRINST usr/include/linux/tc_act/tc_ctinfo.h
  HDRINST usr/include/linux/tc_act/tc_defact.h
  HDRINST usr/include/linux/tc_act/tc_gact.h
  HDRINST usr/include/linux/tc_act/tc_vlan.h
  HDRINST usr/include/linux/tc_act/tc_skbmod.h
  HDRINST usr/include/linux/tc_act/tc_sample.h
  HDRINST usr/include/linux/tc_act/tc_tunnel_key.h
  HDRINST usr/include/linux/tc_act/tc_gate.h
  HDRINST usr/include/linux/tc_act/tc_mirred.h
  HDRINST usr/include/linux/tc_act/tc_nat.h
  HDRINST usr/include/linux/tc_act/tc_csum.h
  HDRINST usr/include/linux/tc_act/tc_connmark.h
  HDRINST usr/include/linux/tc_act/tc_ife.h
  HDRINST usr/include/linux/tc_act/tc_mpls.h
  HDRINST usr/include/linux/tc_act/tc_ct.h
  HDRINST usr/include/linux/tc_act/tc_pedit.h
  HDRINST usr/include/linux/tc_act/tc_bpf.h
  CC      /kernel/build64/tools/objtool/weak.o
  HDRINST usr/include/linux/tc_act/tc_ipt.h
  HDRINST usr/include/linux/netrom.h
  HDRINST usr/include/linux/joystick.h
  CC      /kernel/build64/tools/objtool/check.o
  HDRINST usr/include/linux/falloc.h
  CC      /kernel/build64/tools/objtool/special.o
  HDRINST usr/include/linux/cycx_cfm.h
  HDRINST usr/include/linux/omapfb.h
  CC      /kernel/build64/tools/objtool/builtin-check.o
  HDRINST usr/include/linux/msdos_fs.h
  HDRINST usr/include/linux/virtio_types.h
  CC      /kernel/build64/tools/objtool/elf.o
  HDRINST usr/include/linux/mroute.h
  MKDIR   /kernel/build64/tools/objtool/arch/x86/
  HDRINST usr/include/linux/psample.h
  CC      /kernel/build64/tools/objtool/objtool.o
  HDRINST usr/include/linux/ipv6.h
  HDRINST usr/include/linux/dw100.h
  CC      /kernel/build64/tools/objtool/orc_gen.o
  HDRINST usr/include/linux/psp-sev.h
  HDRINST usr/include/linux/vfio.h
  MKDIR   /kernel/build64/tools/objtool/arch/x86/lib/
  CC      /kernel/build64/tools/objtool/orc_dump.o
  CC      /kernel/build64/tools/objtool/arch/x86/special.o
  CC      /kernel/build64/tools/objtool/libstring.o
  HDRINST usr/include/linux/if_ppp.h
  CC      /kernel/build64/tools/objtool/libctype.o
  HDRINST usr/include/linux/byteorder/big_endian.h
  GEN     /kernel/build64/tools/objtool/arch/x86/lib/inat-tables.c
  CC      /kernel/build64/tools/objtool/str_error_r.o
  CC      /kernel/build64/tools/objtool/librbtree.o
  HDRINST usr/include/linux/byteorder/little_endian.h
  HDRINST usr/include/linux/comedi.h
  HDRINST usr/include/linux/scif_ioctl.h
  HDRINST usr/include/linux/timerfd.h
  HDRINST usr/include/linux/time_types.h
  HDRINST usr/include/linux/firewire-constants.h
  HDRINST usr/include/linux/virtio_snd.h
  HDRINST usr/include/linux/ppp-ioctl.h
  HDRINST usr/include/linux/fib_rules.h
  HDRINST usr/include/linux/gen_stats.h
  HDRINST usr/include/linux/virtio_iommu.h
  HDRINST usr/include/linux/genetlink.h
  HDRINST usr/include/linux/uvcvideo.h
  HDRINST usr/include/linux/pfkeyv2.h
  HDRINST usr/include/linux/soundcard.h
  HDRINST usr/include/linux/times.h
  HDRINST usr/include/linux/nfc.h
  HDRINST usr/include/linux/affs_hardblocks.h
  HDRINST usr/include/linux/nilfs2_api.h
  HDRINST usr/include/linux/rseq.h
  HDRINST usr/include/linux/caif/caif_socket.h
  HDRINST usr/include/linux/caif/if_caif.h
  HDRINST usr/include/linux/i2c-dev.h
  HDRINST usr/include/linux/cuda.h
  HDRINST usr/include/linux/mei_uuid.h
  HDRINST usr/include/linux/cn_proc.h
  HDRINST usr/include/linux/parport.h
  HDRINST usr/include/linux/v4l2-controls.h
  HDRINST usr/include/linux/hsi/cs-protocol.h
  HDRINST usr/include/linux/hsi/hsi_char.h
  HDRINST usr/include/linux/seg6_genl.h
  HDRINST usr/include/linux/am437x-vpfe.h
  HDRINST usr/include/linux/amt.h
  HDRINST usr/include/linux/netconf.h
  HDRINST usr/include/linux/erspan.h
  HDRINST usr/include/linux/nsfs.h
  HDRINST usr/include/linux/xilinx-v4l2-controls.h
  HDRINST usr/include/linux/aspeed-p2a-ctrl.h
  HDRINST usr/include/linux/vfio_zdev.h
  HDRINST usr/include/linux/serio.h
  HDRINST usr/include/linux/acrn.h
  HDRINST usr/include/linux/nfs2.h
  HDRINST usr/include/linux/virtio_pci.h
  HDRINST usr/include/linux/ipc.h
  HDRINST usr/include/linux/ethtool_netlink.h
  HDRINST usr/include/linux/kd.h
  HDRINST usr/include/linux/elf.h
  HDRINST usr/include/linux/videodev2.h
  HDRINST usr/include/linux/if_alg.h
  HDRINST usr/include/linux/sonypi.h
  HDRINST usr/include/linux/fsverity.h
  HDRINST usr/include/linux/if.h
  HDRINST usr/include/linux/btrfs.h
  HDRINST usr/include/linux/vm_sockets_diag.h
  HDRINST usr/include/linux/netfilter_bridge.h
  HDRINST usr/include/linux/packet_diag.h
  HDRINST usr/include/linux/netfilter_ipv4.h
  HDRINST usr/include/linux/kvm.h
  HDRINST usr/include/linux/pci.h
  HDRINST usr/include/linux/if_addrlabel.h
  HDRINST usr/include/linux/hdlcdrv.h
  HDRINST usr/include/linux/cfm_bridge.h
  HDRINST usr/include/linux/fiemap.h
  HDRINST usr/include/linux/dm-ioctl.h
  HDRINST usr/include/linux/aspeed-lpc-ctrl.h
  HDRINST usr/include/linux/atmioc.h
  HDRINST usr/include/linux/dlm.h
  HDRINST usr/include/linux/pci_regs.h
  HDRINST usr/include/linux/cachefiles.h
  HDRINST usr/include/linux/membarrier.h
  HDRINST usr/include/linux/nfs_idmap.h
  HDRINST usr/include/linux/ip.h
  HDRINST usr/include/linux/atm_he.h
  HDRINST usr/include/linux/nfsd/export.h
  HDRINST usr/include/linux/nfsd/stats.h
  HDRINST usr/include/linux/nfsd/debug.h
  HDRINST usr/include/linux/nfsd/cld.h
  HDRINST usr/include/linux/ip_vs.h
  HDRINST usr/include/linux/vmcore.h
  HDRINST usr/include/linux/vbox_vmmdev_types.h
  HDRINST usr/include/linux/dvb/osd.h
  CC      /kernel/build64/tools/objtool/arch/x86/decode.o
  HDRINST usr/include/linux/dvb/dmx.h
  HDRINST usr/include/linux/dvb/net.h
  HDRINST usr/include/linux/dvb/frontend.h
  HDRINST usr/include/linux/dvb/ca.h
  HDRINST usr/include/linux/dvb/version.h
  HDRINST usr/include/linux/dvb/video.h
  HDRINST usr/include/linux/dvb/audio.h
  HDRINST usr/include/linux/nfs.h
  HDRINST usr/include/linux/if_link.h
  HDRINST usr/include/linux/wait.h
  HDRINST usr/include/linux/icmpv6.h
  HDRINST usr/include/linux/media.h
  HDRINST usr/include/linux/seg6_local.h
  HDRINST usr/include/linux/openvswitch.h
  HDRINST usr/include/linux/atmsap.h
  HDRINST usr/include/linux/bpfilter.h
  HDRINST usr/include/linux/fpga-dfl.h
  HDRINST usr/include/linux/userio.h
  HDRINST usr/include/linux/signal.h
  HDRINST usr/include/linux/map_to_14segment.h
  HDRINST usr/include/linux/hdreg.h
  HDRINST usr/include/linux/utime.h
  HDRINST usr/include/linux/usbdevice_fs.h
  HDRINST usr/include/linux/timex.h
  HDRINST usr/include/linux/if_fc.h
  HDRINST usr/include/linux/reiserfs_xattr.h
  HDRINST usr/include/linux/hw_breakpoint.h
  HDRINST usr/include/linux/quota.h
  HDRINST usr/include/linux/ioprio.h
  HDRINST usr/include/linux/eventpoll.h
  HDRINST usr/include/linux/atmclip.h
  HDRINST usr/include/linux/can.h
  HDRINST usr/include/linux/if_team.h
  HDRINST usr/include/linux/usbip.h
  HDRINST usr/include/linux/stat.h
  HDRINST usr/include/linux/fou.h
  HDRINST usr/include/linux/hash_info.h
  HDRINST usr/include/linux/ppp-comp.h
  HDRINST usr/include/linux/ip6_tunnel.h
  HDRINST usr/include/linux/tipc_netlink.h
  HDRINST usr/include/linux/in.h
  HDRINST usr/include/linux/wireguard.h
  HDRINST usr/include/linux/btf.h
  HDRINST usr/include/linux/batman_adv.h
  HDRINST usr/include/linux/fcntl.h
  HDRINST usr/include/linux/if_ltalk.h
  HDRINST usr/include/linux/i2c.h
  HDRINST usr/include/linux/atm_idt77105.h
  HDRINST usr/include/linux/kexec.h
  HDRINST usr/include/linux/arm_sdei.h
  HDRINST usr/include/linux/netfilter_ipv6/ip6_tables.h
  HDRINST usr/include/linux/netfilter_ipv6/ip6t_ah.h
  HDRINST usr/include/linux/netfilter_ipv6/ip6t_NPT.h
  HDRINST usr/include/linux/netfilter_ipv6/ip6t_rt.h
  HDRINST usr/include/linux/netfilter_ipv6/ip6t_REJECT.h
  HDRINST usr/include/linux/netfilter_ipv6/ip6t_opts.h
  HDRINST usr/include/linux/netfilter_ipv6/ip6t_srh.h
  HDRINST usr/include/linux/netfilter_ipv6/ip6t_LOG.h
  HDRINST usr/include/linux/netfilter_ipv6/ip6t_mh.h
  HDRINST usr/include/linux/netfilter_ipv6/ip6t_HL.h
  HDRINST usr/include/linux/netfilter_ipv6/ip6t_hl.h
  HDRINST usr/include/linux/netfilter_ipv6/ip6t_frag.h
  HDRINST usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h
  HDRINST usr/include/linux/minix_fs.h
  HDRINST usr/include/linux/aio_abi.h
  HDRINST usr/include/linux/pktcdvd.h
  HDRINST usr/include/linux/libc-compat.h
  HDRINST usr/include/linux/atmlec.h
  HDRINST usr/include/linux/signalfd.h
  HDRINST usr/include/linux/bpf_common.h
  HDRINST usr/include/linux/seg6_iptunnel.h
  HDRINST usr/include/linux/synclink.h
  HDRINST usr/include/linux/mpls_iptunnel.h
  HDRINST usr/include/linux/mctp.h
  HDRINST usr/include/linux/if_xdp.h
  HDRINST usr/include/linux/llc.h
  HDRINST usr/include/linux/atmsvc.h
  HDRINST usr/include/linux/sed-opal.h
  HDRINST usr/include/linux/sock_diag.h
  HDRINST usr/include/linux/time.h
  HDRINST usr/include/linux/securebits.h
  HDRINST usr/include/linux/fsl_hypervisor.h
  HDRINST usr/include/linux/if_hippi.h
  HDRINST usr/include/linux/seccomp.h
  HDRINST usr/include/linux/oom.h
  HDRINST usr/include/linux/filter.h
  HDRINST usr/include/linux/inotify.h
  HDRINST usr/include/linux/rfkill.h
  HDRINST usr/include/linux/reboot.h
  HDRINST usr/include/linux/can/vxcan.h
  HDRINST usr/include/linux/can/j1939.h
  HDRINST usr/include/linux/can/netlink.h
  HDRINST usr/include/linux/can/bcm.h
  HDRINST usr/include/linux/can/raw.h
  HDRINST usr/include/linux/can/gw.h
  HDRINST usr/include/linux/can/error.h
  HDRINST usr/include/linux/can/isotp.h
  HDRINST usr/include/linux/if_eql.h
  HDRINST usr/include/linux/hiddev.h
  HDRINST usr/include/linux/blktrace_api.h
  HDRINST usr/include/linux/ccs.h
  HDRINST usr/include/linux/ioam6.h
  HDRINST usr/include/linux/hsr_netlink.h
  HDRINST usr/include/linux/mmc/ioctl.h
  HDRINST usr/include/linux/bfs_fs.h
  HDRINST usr/include/linux/rio_cm_cdev.h
  HDRINST usr/include/linux/uleds.h
  HDRINST usr/include/linux/mrp_bridge.h
  HDRINST usr/include/linux/adb.h
  HDRINST usr/include/linux/pmu.h
  HDRINST usr/include/linux/udmabuf.h
  HDRINST usr/include/linux/kcmp.h
  HDRINST usr/include/linux/dma-heap.h
  HDRINST usr/include/linux/userfaultfd.h
  HDRINST usr/include/linux/netfilter_arp/arpt_mangle.h
  HDRINST usr/include/linux/netfilter_arp/arp_tables.h
  HDRINST usr/include/linux/tipc.h
  HDRINST usr/include/linux/virtio_ids.h
  HDRINST usr/include/linux/l2tp.h
  HDRINST usr/include/linux/devlink.h
  HDRINST usr/include/linux/virtio_gpio.h
  HDRINST usr/include/linux/dcbnl.h
  HDRINST usr/include/linux/cyclades.h
  HDRINST usr/include/sound/intel/avs/tokens.h
  HDRINST usr/include/sound/sof/fw.h
  HDRINST usr/include/sound/sof/abi.h
  HDRINST usr/include/sound/sof/tokens.h
  HDRINST usr/include/sound/sof/header.h
  HDRINST usr/include/sound/usb_stream.h
  HDRINST usr/include/sound/sfnt_info.h
  HDRINST usr/include/sound/asequencer.h
  HDRINST usr/include/sound/tlv.h
  HDRINST usr/include/sound/asound.h
  HDRINST usr/include/sound/asoc.h
  HDRINST usr/include/sound/sb16_csp.h
  HDRINST usr/include/sound/compress_offload.h
  HDRINST usr/include/sound/hdsp.h
  HDRINST usr/include/sound/emu10k1.h
  HDRINST usr/include/sound/snd_ar_tokens.h
  HDRINST usr/include/sound/snd_sst_tokens.h
  HDRINST usr/include/sound/asound_fm.h
  HDRINST usr/include/sound/hdspm.h
  HDRINST usr/include/sound/compress_params.h
  HDRINST usr/include/sound/firewire.h
  HDRINST usr/include/sound/skl-tplg-interface.h
  HDRINST usr/include/scsi/scsi_bsg_ufs.h
  HDRINST usr/include/scsi/scsi_netlink_fc.h
  HDRINST usr/include/scsi/scsi_bsg_mpi3mr.h
  HDRINST usr/include/scsi/fc/fc_ns.h
  HDRINST usr/include/scsi/fc/fc_fs.h
  HDRINST usr/include/scsi/fc/fc_els.h
  HDRINST usr/include/scsi/fc/fc_gs.h
  HDRINST usr/include/scsi/scsi_bsg_fc.h
  HDRINST usr/include/scsi/cxlflash_ioctl.h
  HDRINST usr/include/scsi/scsi_netlink.h
  HDRINST usr/include/linux/version.h
  HDRINST usr/include/asm/processor-flags.h
  HDRINST usr/include/asm/auxvec.h
  HDRINST usr/include/asm/svm.h
  HDRINST usr/include/asm/bitsperlong.h
  HDRINST usr/include/asm/kvm_perf.h
  HDRINST usr/include/asm/mce.h
  HDRINST usr/include/asm/posix_types.h
  HDRINST usr/include/asm/msr.h
  HDRINST usr/include/asm/sigcontext32.h
  HDRINST usr/include/asm/mman.h
  HDRINST usr/include/asm/shmbuf.h
  HDRINST usr/include/asm/e820.h
  HDRINST usr/include/asm/posix_types_64.h
  HDRINST usr/include/asm/vsyscall.h
  HDRINST usr/include/asm/msgbuf.h
  HDRINST usr/include/asm/swab.h
  HDRINST usr/include/asm/statfs.h
  HDRINST usr/include/asm/posix_types_x32.h
  HDRINST usr/include/asm/ptrace.h
  HDRINST usr/include/asm/unistd.h
  HDRINST usr/include/asm/ist.h
  HDRINST usr/include/asm/prctl.h
  HDRINST usr/include/asm/boot.h
  HDRINST usr/include/asm/sigcontext.h
  HDRINST usr/include/asm/posix_types_32.h
  HDRINST usr/include/asm/kvm_para.h
  HDRINST usr/include/asm/a.out.h
  HDRINST usr/include/asm/mtrr.h
  HDRINST usr/include/asm/amd_hsmp.h
  HDRINST usr/include/asm/ptrace-abi.h
  HDRINST usr/include/asm/hwcap2.h
  HDRINST usr/include/asm/vm86.h
  HDRINST usr/include/asm/vmx.h
  HDRINST usr/include/asm/ldt.h
  HDRINST usr/include/asm/perf_regs.h
  HDRINST usr/include/asm/kvm.h
  HDRINST usr/include/asm/debugreg.h
  HDRINST usr/include/asm/signal.h
  HDRINST usr/include/asm/bootparam.h
  HDRINST usr/include/asm/siginfo.h
  HDRINST usr/include/asm/hw_breakpoint.h
  HDRINST usr/include/asm/stat.h
  HDRINST usr/include/asm/setup.h
  HDRINST usr/include/asm/sembuf.h
  HDRINST usr/include/asm/sgx.h
  HDRINST usr/include/asm/ucontext.h
  HDRINST usr/include/asm/byteorder.h
  HDRINST usr/include/asm/unistd_64.h
  HDRINST usr/include/asm/ioctls.h
  HDRINST usr/include/asm/bpf_perf_event.h
  HDRINST usr/include/asm/types.h
  HDRINST usr/include/asm/poll.h
  HDRINST usr/include/asm/resource.h
  HDRINST usr/include/asm/param.h
  HDRINST usr/include/asm/sockios.h
  HDRINST usr/include/asm/errno.h
  HDRINST usr/include/asm/unistd_x32.h
  HDRINST usr/include/asm/termios.h
  HDRINST usr/include/asm/ioctl.h
  HDRINST usr/include/asm/socket.h
  HDRINST usr/include/asm/unistd_32.h
  HDRINST usr/include/asm/termbits.h
  HDRINST usr/include/asm/fcntl.h
  HDRINST usr/include/asm/ipcbuf.h
  HOSTLD  scripts/mod/modpost
  CC      kernel/bounds.s
  CHKSHA1 ../include/linux/atomic/atomic-arch-fallback.h
  CHKSHA1 ../include/linux/atomic/atomic-instrumented.h
  CHKSHA1 ../include/linux/atomic/atomic-long.h
  UPD     include/generated/timeconst.h
  LD      /kernel/build64/tools/objtool/arch/x86/objtool-in.o
  UPD     include/generated/bounds.h
  CC      arch/x86/kernel/asm-offsets.s
  UPD     include/generated/asm-offsets.h
  CALL    ../scripts/checksyscalls.sh
  LD      /kernel/build64/tools/objtool/objtool-in.o
  LINK    /kernel/build64/tools/objtool/objtool
  LDS     scripts/module.lds
  CC      ipc/compat.o
  CC      ipc/util.o
  CC      ipc/msgutil.o
  HOSTCC  usr/gen_init_cpio
  CC      ipc/msg.o
  AR      certs/built-in.a
  CC      ipc/sem.o
  CC      ipc/shm.o
  CC      init/main.o
  CC      ipc/syscall.o
  CC      io_uring/io_uring.o
  CC      ipc/ipc_sysctl.o
  CC      ipc/mqueue.o
  AS      arch/x86/lib/clear_page_64.o
  CC      io_uring/xattr.o
  AR      arch/x86/video/built-in.a
  CC      ipc/namespace.o
  CC      block/bdev.o
  CC      arch/x86/pci/i386.o
  CC      init/do_mounts.o
  CC      arch/x86/power/cpu.o
  UPD     init/utsversion-tmp.h
  CC      arch/x86/realmode/init.o
  AR      arch/x86/ia32/built-in.a
  AR      arch/x86/net/built-in.a
  AR      virt/lib/built-in.a
  AS      arch/x86/crypto/aesni-intel_asm.o
  CC [M]  arch/x86/video/fbdev.o
  AR      sound/arm/built-in.a
  AR      sound/ppc/built-in.a
  CC      security/keys/gc.o
  CC [M]  virt/lib/irqbypass.o
  AR      drivers/irqchip/built-in.a
  CC      sound/core/sound.o
  CC      block/partitions/core.o
  CC      sound/core/seq/seq.o
  AR      arch/x86/platform/atom/built-in.a
  AR      sound/isa/ad1816a/built-in.a
  CC      net/core/sock.o
  CC      sound/core/init.o
  AR      arch/x86/platform/ce4100/built-in.a
  CC [M]  arch/x86/kvm/../../../virt/kvm/kvm_main.o
  AR      sound/i2c/other/built-in.a
  CC      arch/x86/mm/pat/set_memory.o
  CC      arch/x86/mm/init.o
  AR      sound/pci/ac97/built-in.a
  CC      arch/x86/events/amd/core.o
  CC      sound/core/memory.o
  CC      fs/notify/dnotify/dnotify.o
  CC      arch/x86/kernel/fpu/init.o
  AR      sound/drivers/opl3/built-in.a
  AR      drivers/bus/mhi/built-in.a
  CC      arch/x86/platform/efi/memmap.o
  AR      sound/i2c/built-in.a
  AR      sound/isa/ad1848/built-in.a
  CC      arch/x86/lib/cmdline.o
  AR      sound/pci/ali5451/built-in.a
  AR      drivers/bus/built-in.a
  CC      arch/x86/entry/vdso/vma.o
  AR      sound/drivers/opl4/built-in.a
  CC      arch/x86/kernel/cpu/mce/core.o
  CC      lib/kunit/test.o
  AR      sound/pci/asihpi/built-in.a
  AR      sound/isa/cs423x/built-in.a
  AR      sound/drivers/mpu401/built-in.a
  CC      mm/kasan/common.o
  AR      sound/drivers/vx/built-in.a
  AR      sound/pci/au88x0/built-in.a
  CC      block/partitions/ldm.o
  CC      kernel/sched/core.o
  AR      drivers/phy/allwinner/built-in.a
  CC      arch/x86/crypto/aesni-intel_glue.o
  AR      sound/drivers/pcsp/built-in.a
  AR      sound/isa/es1688/built-in.a
  AR      sound/drivers/built-in.a
  AR      sound/pci/aw2/built-in.a
  CC      crypto/api.o
  AR      drivers/phy/amlogic/built-in.a
  AR      sound/isa/galaxy/built-in.a
  AR      sound/pci/ctxfi/built-in.a
  AR      drivers/phy/broadcom/built-in.a
  CC      arch/x86/kernel/fpu/bugs.o
  AR      sound/isa/gus/built-in.a
  AR      drivers/phy/cadence/built-in.a
  AR      sound/pci/ca0106/built-in.a
  AR      sound/isa/msnd/built-in.a
  AR      drivers/phy/freescale/built-in.a
  AR      sound/pci/cs46xx/built-in.a
  AR      drivers/phy/hisilicon/built-in.a
  AR      sound/isa/opti9xx/built-in.a
  AR      sound/pci/cs5535audio/built-in.a
  AR      drivers/phy/ingenic/built-in.a
  AR      sound/isa/sb/built-in.a
  AR      sound/pci/lola/built-in.a
  AR      sound/isa/wavefront/built-in.a
  AR      drivers/phy/intel/built-in.a
  AS      arch/x86/lib/cmpxchg16b_emu.o
  AR      sound/isa/wss/built-in.a
  AR      sound/pci/lx6464es/built-in.a
  AR      sound/isa/built-in.a
  AR      drivers/phy/lantiq/built-in.a
  AR      sound/pci/echoaudio/built-in.a
  AR      drivers/phy/marvell/built-in.a
  CC      arch/x86/lib/copy_mc.o
  CC [M]  arch/x86/kvm/../../../virt/kvm/eventfd.o
  AR      sound/pci/emu10k1/built-in.a
  AR      drivers/phy/mediatek/built-in.a
  AR      sound/pci/hda/built-in.a
  AR      drivers/phy/microchip/built-in.a
  CC [M]  sound/pci/hda/hda_bind.o
  AR      drivers/phy/motorola/built-in.a
  AR      drivers/phy/mscc/built-in.a
  AR      drivers/phy/qualcomm/built-in.a
  AR      drivers/phy/ralink/built-in.a
  AR      drivers/phy/renesas/built-in.a
  CC [M]  sound/pci/hda/hda_codec.o
  AR      drivers/phy/rockchip/built-in.a
  GEN     usr/initramfs_data.cpio
  COPY    usr/initramfs_inc_data
  AS      usr/initramfs_data.o
  AR      drivers/phy/samsung/built-in.a
  AR      drivers/phy/socionext/built-in.a
  AR      drivers/phy/st/built-in.a
  AR      usr/built-in.a
  CC      crypto/cipher.o
  AR      drivers/phy/sunplus/built-in.a
  AR      drivers/phy/tegra/built-in.a
  AR      drivers/phy/ti/built-in.a
  CC      arch/x86/kernel/fpu/core.o
  AR      drivers/phy/xilinx/built-in.a
  CC      drivers/phy/phy-core.o
  CC      mm/filemap.o
  AR      virt/built-in.a
  CC [M]  sound/pci/hda/hda_jack.o
  AS      arch/x86/lib/copy_mc_64.o
  CC      sound/core/seq/seq_lock.o
  CC      arch/x86/kernel/cpu/mce/severity.o
  AS      arch/x86/lib/copy_page_64.o
  CC      ipc/mq_sysctl.o
  AS      arch/x86/realmode/rm/header.o
  AS      arch/x86/lib/copy_user_64.o
  AS      arch/x86/realmode/rm/trampoline_64.o
  AS      arch/x86/realmode/rm/stack.o
  AS      arch/x86/lib/copy_user_uncached_64.o
  CC      arch/x86/kernel/cpu/mtrr/mtrr.o
  CC      arch/x86/kernel/cpu/cacheinfo.o
  AS      arch/x86/realmode/rm/reboot.o
  CC      arch/x86/kernel/cpu/scattered.o
  CC      arch/x86/lib/cpu.o
  CC      security/keys/key.o
  AS      arch/x86/realmode/rm/wakeup_asm.o
  CC      block/fops.o
  AR      fs/notify/dnotify/built-in.a
  CC      fs/notify/inotify/inotify_fsnotify.o
  CC      arch/x86/realmode/rm/wakemain.o
  CC      arch/x86/pci/init.o
  CC      arch/x86/platform/efi/quirks.o
  CC      fs/notify/inotify/inotify_user.o
  CC      crypto/compress.o
  CC      arch/x86/realmode/rm/video-mode.o
  CC      lib/kunit/resource.o
  CC      mm/mempool.o
  CC      arch/x86/platform/efi/efi.o
  CC      arch/x86/entry/vdso/extable.o
  CC      arch/x86/power/hibernate_64.o
  CC      arch/x86/entry/vdso/vdso32-setup.o
  CC      mm/kasan/report.o
  AS      arch/x86/realmode/rm/copy.o
  CC      sound/core/seq/seq_clientmgr.o
  AS      arch/x86/realmode/rm/bioscall.o
  CC      arch/x86/realmode/rm/regs.o
  CC      sound/core/seq/seq_memory.o
  CC      sound/core/seq/seq_queue.o
  CC      arch/x86/lib/delay.o
  CC      sound/core/seq/seq_fifo.o
  CC      arch/x86/realmode/rm/video-vga.o
  LDS     arch/x86/entry/vdso/vdso.lds
  CC      arch/x86/kernel/cpu/topology.o
  CC      block/bio.o
  AS      arch/x86/entry/vdso/vdso-note.o
  CC      arch/x86/events/amd/lbr.o
  CC      lib/math/div64.o
  CC      arch/x86/realmode/rm/video-vesa.o
  CC      lib/math/gcd.o
  AS      arch/x86/crypto/aesni-intel_avx-x86_64.o
  AS      arch/x86/crypto/aes_ctrby8_avx-x86_64.o
  CC      arch/x86/entry/vdso/vclock_gettime.o
  CC      lib/math/lcm.o
  CC      arch/x86/realmode/rm/video-bios.o
  CC      crypto/algapi.o
  CC      lib/math/int_pow.o
  CC      block/partitions/msdos.o
  AR      sound/sh/built-in.a
  CC      sound/core/seq/seq_prioq.o
  CC      lib/kunit/static_stub.o
  CC      sound/core/seq/seq_timer.o
  CC      lib/kunit/string-stream.o
  CC      lib/math/int_sqrt.o
  CC      lib/math/reciprocal_div.o
  PASYMS  arch/x86/realmode/rm/pasyms.h
  LDS     arch/x86/realmode/rm/realmode.lds
  CC      crypto/scatterwalk.o
  LD      arch/x86/realmode/rm/realmode.elf
  AS      arch/x86/lib/getuser.o
  RELOCS  arch/x86/realmode/rm/realmode.relocs
  OBJCOPY arch/x86/realmode/rm/realmode.bin
  AS      arch/x86/realmode/rmpiggy.o
  GEN     arch/x86/lib/inat-tables.c
  CC      arch/x86/pci/mmconfig_64.o
  CC      arch/x86/kernel/cpu/common.o
  AR      arch/x86/realmode/built-in.a
  CC      crypto/proc.o
  CC      lib/math/rational.o
  CC      arch/x86/lib/insn-eval.o
  AR      drivers/phy/built-in.a
  AS [M]  arch/x86/crypto/ghash-clmulni-intel_asm.o
  CC      arch/x86/kernel/cpu/mtrr/if.o
  AR      drivers/pinctrl/actions/built-in.a
  AR      drivers/pinctrl/bcm/built-in.a
  CC [M]  arch/x86/crypto/ghash-clmulni-intel_glue.o
  AR      drivers/pinctrl/cirrus/built-in.a
  CC      init/do_mounts_initrd.o
  AR      drivers/pinctrl/freescale/built-in.a
  CC      security/keys/keyring.o
  AR      drivers/pinctrl/mediatek/built-in.a
  CC      drivers/pinctrl/intel/pinctrl-baytrail.o
  CC      arch/x86/platform/efi/efi_64.o
  CC      sound/core/seq/seq_system.o
  AR      drivers/pinctrl/mvebu/built-in.a
  CC      kernel/sched/fair.o
  CC      mm/oom_kill.o
  AS      arch/x86/power/hibernate_asm_64.o
  CC      arch/x86/power/hibernate.o
  CC      arch/x86/mm/pat/memtype.o
  CC      drivers/pinctrl/intel/pinctrl-intel.o
  CC      arch/x86/pci/direct.o
  AR      sound/synth/emux/built-in.a
  CC      arch/x86/pci/mmconfig-shared.o
  AR      sound/synth/built-in.a
  CC      sound/core/seq/seq_ports.o
  CC      mm/fadvise.o
  CC      mm/kasan/init.o
  CC      mm/maccess.o
  CC      arch/x86/entry/vdso/vgetcpu.o
  CC      arch/x86/kernel/fpu/regset.o
  CC      arch/x86/kernel/cpu/mce/genpool.o
  CC [M]  sound/pci/hda/hda_auto_parser.o
  CC [M]  lib/math/prime_numbers.o
  CC      lib/kunit/assert.o
  CC      block/elevator.o
  HOSTCC  arch/x86/entry/vdso/vdso2c
  CC      sound/core/seq/seq_info.o
  AS      arch/x86/platform/efi/efi_stub_64.o
  AR      fs/notify/inotify/built-in.a
  CC      fs/notify/fanotify/fanotify.o
  CC [M]  drivers/pinctrl/intel/pinctrl-cherryview.o
  CC [M]  drivers/pinctrl/intel/pinctrl-broxton.o
  CC      arch/x86/events/amd/ibs.o
  CC      fs/notify/fanotify/fanotify_user.o
  CC      fs/nfs_common/grace.o
  CC      mm/kasan/generic.o
  CC      crypto/aead.o
  AS [M]  arch/x86/crypto/crc32-pclmul_asm.o
  CC [M]  arch/x86/crypto/crc32-pclmul_glue.o
  CC      arch/x86/pci/fixup.o
  CC      block/partitions/efi.o
  CC      arch/x86/kernel/cpu/mtrr/generic.o
  CC      mm/kasan/report_generic.o
  CC      init/initramfs.o
  AR      ipc/built-in.a
  LDS     arch/x86/entry/vdso/vdso32/vdso32.lds
  CC      arch/x86/kernel/cpu/mtrr/cleanup.o
  AS      arch/x86/entry/vdso/vdso32/note.o
  AS      arch/x86/entry/vdso/vdso32/system_call.o
  AS      arch/x86/entry/vdso/vdso32/sigreturn.o
  CC      lib/kunit/try-catch.o
  CC      arch/x86/entry/vdso/vdso32/vclock_gettime.o
  CC      arch/x86/lib/insn.o
  CC      arch/x86/kernel/cpu/mce/intel.o
  AR      arch/x86/platform/efi/built-in.a
  AR      lib/math/built-in.a
  AR      arch/x86/power/built-in.a
  CC      kernel/sched/build_policy.o
  CC      arch/x86/mm/pat/memtype_interval.o
  CC      lib/kunit/executor.o
  CC [M]  arch/x86/kvm/../../../virt/kvm/binary_stats.o
  AR      arch/x86/platform/geode/built-in.a
  AR      arch/x86/platform/iris/built-in.a
  CC [M]  drivers/pinctrl/intel/pinctrl-geminilake.o
  CC      net/llc/llc_core.o
  CC      arch/x86/platform/intel/iosf_mbi.o
  CC      net/llc/llc_input.o
  CC      net/llc/llc_output.o
  CC      arch/x86/kernel/fpu/signal.o
  CC      net/ethernet/eth.o
  AR      sound/core/seq/built-in.a
  CC      sound/core/control.o
  CC [M]  drivers/pinctrl/intel/pinctrl-sunrisepoint.o
  AS [M]  arch/x86/crypto/crct10dif-pcl-asm_64.o
  CC [M]  arch/x86/kvm/../../../virt/kvm/vfio.o
  CC [M]  arch/x86/crypto/crct10dif-pclmul_glue.o
  CC      arch/x86/events/intel/core.o
  LD [M]  arch/x86/crypto/ghash-clmulni-intel.o
  CC      arch/x86/pci/acpi.o
  CC      mm/page-writeback.o
  AS      arch/x86/lib/memcpy_64.o
  AR      fs/nfs_common/built-in.a
  AS      arch/x86/lib/memmove_64.o
  CC      security/keys/keyctl.o
  AS      arch/x86/lib/memset_64.o
  CC      fs/iomap/trace.o
  CC      security/keys/permission.o
  CC      arch/x86/lib/misc.o
  CC      crypto/geniv.o
  CC      arch/x86/lib/pc-conf-reg.o
  CC      fs/iomap/iter.o
  CC      security/keys/process_keys.o
  CC      mm/kasan/shadow.o
  CC      arch/x86/entry/vsyscall/vsyscall_64.o
  CC      lib/kunit/hooks.o
  CC [M]  sound/pci/hda/hda_sysfs.o
  AS      arch/x86/entry/vsyscall/vsyscall_emu_64.o
  CC      arch/x86/entry/vdso/vdso32/vgetcpu.o
  CC      init/calibrate.o
  CC      init/init_task.o
  CC      arch/x86/pci/legacy.o
  CC      mm/kasan/quarantine.o
  CC      block/blk-core.o
  CC      arch/x86/kernel/cpu/mce/threshold.o
  CC [M]  sound/pci/hda/hda_controller.o
  VDSO    arch/x86/entry/vdso/vdso64.so.dbg
  AS      arch/x86/lib/putuser.o
  AR      arch/x86/mm/pat/built-in.a
  AR      block/partitions/built-in.a
  CC      arch/x86/mm/init_64.o
  CC      arch/x86/mm/fault.o
  LD [M]  arch/x86/crypto/crc32-pclmul.o
  CC      arch/x86/events/amd/uncore.o
  VDSO    arch/x86/entry/vdso/vdso32.so.dbg
  AS      arch/x86/lib/retpoline.o
  LD [M]  arch/x86/crypto/crct10dif-pclmul.o
  OBJCOPY arch/x86/entry/vdso/vdso64.so
  OBJCOPY arch/x86/entry/vdso/vdso32.so
  CC      init/version.o
  VDSO2C  arch/x86/entry/vdso/vdso-image-64.c
  VDSO2C  arch/x86/entry/vdso/vdso-image-32.c
  AR      arch/x86/crypto/built-in.a
  CC      arch/x86/entry/vdso/vdso-image-64.o
  CC      kernel/sched/build_utility.o
  AR      drivers/pinctrl/intel/built-in.a
  AR      drivers/pinctrl/nomadik/built-in.a
  CC      arch/x86/lib/usercopy.o
  CC      arch/x86/kernel/cpu/rdrand.o
  AR      drivers/pinctrl/nuvoton/built-in.a
  CC      arch/x86/mm/ioremap.o
  AR      drivers/pinctrl/nxp/built-in.a
  AR      lib/kunit/built-in.a
  AR      drivers/pinctrl/sprd/built-in.a
  AR      arch/x86/platform/intel/built-in.a
  CC      lib/crypto/memneq.o
  AR      drivers/pinctrl/sunplus/built-in.a
  AR      arch/x86/platform/intel-mid/built-in.a
  AR      drivers/pinctrl/ti/built-in.a
  AR      arch/x86/platform/intel-quark/built-in.a
  CC      drivers/pinctrl/core.o
  AR      arch/x86/platform/olpc/built-in.a
  AR      arch/x86/platform/scx200/built-in.a
  AR      arch/x86/platform/ts5500/built-in.a
  AR      arch/x86/kernel/cpu/mtrr/built-in.a
  CC      lib/crypto/utils.o
  AR      arch/x86/platform/uv/built-in.a
  AR      arch/x86/platform/built-in.a
  CC      lib/zlib_inflate/inffast.o
  CC      kernel/locking/mutex.o
  CC      drivers/gpio/gpiolib.o
  CC      kernel/locking/semaphore.o
  CC      arch/x86/kernel/cpu/match.o
  AR      net/llc/built-in.a
  CC      net/802/p8022.o
  CC      arch/x86/entry/vdso/vdso-image-32.o
  CC      net/802/psnap.o
  CC      drivers/gpio/gpiolib-devres.o
  CC      security/keys/request_key.o
  CC      arch/x86/kernel/fpu/xstate.o
  AR      fs/notify/fanotify/built-in.a
  CC      fs/notify/fsnotify.o
  CC      kernel/power/qos.o
  CC      arch/x86/lib/usercopy_64.o
  CC      lib/zlib_inflate/inflate.o
  CC      arch/x86/kernel/cpu/bugs.o
  AR      fs/quota/built-in.a
  CC      arch/x86/pci/irq.o
  CC      lib/zlib_deflate/deflate.o
  CC      arch/x86/kernel/acpi/boot.o
  CC      security/commoncap.o
  AR      arch/x86/entry/vdso/built-in.a
  CC      arch/x86/kernel/acpi/sleep.o
  CC      lib/zlib_deflate/deftree.o
  AR      init/built-in.a
  AS      arch/x86/kernel/acpi/wakeup_64.o
  CC      crypto/skcipher.o
  CC      net/core/request_sock.o
  CC      lib/crypto/chacha.o
  CC      lib/zlib_deflate/deflate_syms.o
  AR      arch/x86/entry/vsyscall/built-in.a
  AS      arch/x86/entry/entry.o
  AR      mm/kasan/built-in.a
  AS      arch/x86/entry/entry_64.o
  CC [M]  sound/pci/hda/hda_proc.o
  CC      kernel/power/main.o
  AR      net/ethernet/built-in.a
  CC      lib/crypto/aes.o
  CC      net/sched/sch_generic.o
  CC      arch/x86/entry/syscall_64.o
  CC      arch/x86/kernel/cpu/mce/apei.o
  CC      net/sched/sch_mq.o
  CC      fs/iomap/buffered-io.o
  CC      arch/x86/entry/common.o
  AR      arch/x86/events/amd/built-in.a
  CC      net/core/skbuff.o
  CC      fs/iomap/direct-io.o
  AR      sound/pci/ice1712/built-in.a
  CC      arch/x86/mm/extable.o
  CC      crypto/seqiv.o
  CC      arch/x86/lib/msr-smp.o
  CC      net/sched/sch_frag.o
  CC      mm/folio-compat.o
  CC      net/802/stp.o
  CC      fs/proc/task_mmu.o
  CC      lib/zlib_inflate/infutil.o
  CC      fs/notify/notification.o
  CC      sound/core/misc.o
  CC      arch/x86/kernel/acpi/apei.o
  CC      security/keys/request_key_auth.o
  CC      mm/readahead.o
  CC      arch/x86/lib/cache-smp.o
  CC      arch/x86/mm/mmap.o
  CC      kernel/power/console.o
  CC      fs/notify/group.o
  CC      kernel/power/process.o
  CC      net/sched/sch_api.o
  AR      arch/x86/kernel/cpu/mce/built-in.a
  CC      lib/zlib_inflate/inftrees.o
  CC      lib/crypto/gf128mul.o
  CC      arch/x86/lib/msr.o
  AR      lib/zlib_deflate/built-in.a
  CC      lib/zlib_inflate/inflate_syms.o
  CC      drivers/pinctrl/pinctrl-utils.o
  CC      drivers/pinctrl/pinmux.o
  AS      arch/x86/entry/thunk_64.o
  CC      arch/x86/events/intel/bts.o
  AS      arch/x86/entry/entry_64_compat.o
  CC      arch/x86/kernel/acpi/cppc.o
  CC      lib/crypto/blake2s.o
  AR      arch/x86/kernel/fpu/built-in.a
  CC      arch/x86/entry/syscall_32.o
  AR      drivers/pwm/built-in.a
  AS      arch/x86/lib/msr-reg.o
  CC      drivers/gpio/gpiolib-legacy.o
  CC      drivers/gpio/gpiolib-cdev.o
  CC      crypto/echainiv.o
  CC      drivers/gpio/gpiolib-sysfs.o
  CC      drivers/gpio/gpiolib-acpi.o
  CC      arch/x86/mm/pgtable.o
  CC      arch/x86/kernel/acpi/cstate.o
  CC [M]  sound/pci/hda/hda_hwdep.o
  CC      arch/x86/pci/common.o
  CC      io_uring/nop.o
  CC      io_uring/fs.o
  CC      arch/x86/kernel/apic/apic.o
  CC      arch/x86/kernel/apic/apic_common.o
  CC [M]  arch/x86/kvm/../../../virt/kvm/coalesced_mmio.o
  AR      lib/zlib_inflate/built-in.a
  CC      net/sched/sch_blackhole.o
  CC      fs/kernfs/mount.o
  CC      sound/core/device.o
  CC      arch/x86/kernel/cpu/aperfmperf.o
  AR      net/802/built-in.a
  CC      security/keys/user_defined.o
  CC      arch/x86/kernel/apic/apic_noop.o
  CC      arch/x86/events/zhaoxin/core.o
  CC      block/blk-sysfs.o
  CC      fs/sysfs/file.o
  CC      lib/crypto/blake2s-generic.o
  CC      lib/crypto/blake2s-selftest.o
  CC      fs/notify/mark.o
  CC      fs/configfs/inode.o
  CC      lib/lzo/lzo1x_compress.o
  CC      fs/configfs/file.o
  CC      lib/lzo/lzo1x_decompress_safe.o
  CC      arch/x86/kernel/apic/ipi.o
  CC      block/blk-flush.o
  CC      kernel/locking/rwsem.o
  CC      arch/x86/lib/msr-reg-export.o
  AR      arch/x86/entry/built-in.a
  CC      fs/notify/fdinfo.o
  CC      mm/swap.o
  CC [M]  sound/pci/hda/hda_generic.o
  CC      drivers/pinctrl/pinconf.o
  CC      crypto/ahash.o
  CC      arch/x86/mm/physaddr.o
  AS      arch/x86/lib/hweight.o
  CC      kernel/power/suspend.o
  CC      arch/x86/lib/iomem.o
  CC      fs/configfs/dir.o
  CC      net/sched/sch_fifo.o
  CC      sound/core/info.o
  AR      arch/x86/kernel/acpi/built-in.a
  CC      arch/x86/events/intel/ds.o
  CC      arch/x86/events/intel/knc.o
  CC      arch/x86/kernel/cpu/cpuid-deps.o
  CC      lib/crypto/des.o
  CC      drivers/gpio/gpiolib-swnode.o
  CC      security/keys/compat.o
  CC      kernel/printk/printk.o
  CC      fs/kernfs/inode.o
  CC      kernel/printk/printk_safe.o
  CC      arch/x86/pci/early.o
  CC      io_uring/splice.o
  CC [M]  arch/x86/kvm/../../../virt/kvm/async_pf.o
  CC [M]  arch/x86/kvm/../../../virt/kvm/irqchip.o
  CC      arch/x86/pci/bus_numa.o
  AR      lib/lzo/built-in.a
  CC      kernel/printk/printk_ringbuffer.o
  CC      fs/kernfs/dir.o
  CC      fs/sysfs/dir.o
  AS      arch/x86/lib/iomap_copy_64.o
  CC      net/netlink/af_netlink.o
  CC      arch/x86/lib/inat.o
  CC      fs/iomap/fiemap.o
  AR      arch/x86/events/zhaoxin/built-in.a
  AR      net/bpf/built-in.a
  AR      arch/x86/lib/built-in.a
  CC      net/ethtool/ioctl.o
  AR      sound/pci/korg1212/built-in.a
  AR      sound/pci/mixart/built-in.a
  CC      fs/iomap/seek.o
  CC      arch/x86/kernel/cpu/umwait.o
  AR      sound/pci/nm256/built-in.a
  CC      net/netlink/genetlink.o
  CC      arch/x86/mm/tlb.o
  CC      arch/x86/events/core.o
  CC      kernel/locking/percpu-rwsem.o
  CC      fs/proc/inode.o
  AR      arch/x86/lib/lib.a
  CC      drivers/pinctrl/pinconf-generic.o
  CC      security/min_addr.o
  AR      sound/pci/oxygen/built-in.a
  CC      fs/configfs/symlink.o
  AR      sound/pci/pcxhr/built-in.a
  CC      fs/configfs/mount.o
  CC      security/inode.o
  CC      block/blk-settings.o
  AR      fs/notify/built-in.a
  CC      fs/devpts/inode.o
  CC      block/blk-ioc.o
  CC      security/keys/proc.o
  CC      block/blk-map.o
  CC      kernel/printk/sysctl.o
  CC      fs/sysfs/symlink.o
  CC      fs/sysfs/mount.o
  CC      crypto/shash.o
  CC      sound/core/isadma.o
  CC      arch/x86/pci/amd_bus.o
  CC      arch/x86/mm/cpu_entry_area.o
  AR      drivers/gpio/built-in.a
  CC      fs/iomap/swapfile.o
  CC      io_uring/sync.o
  CC      io_uring/advise.o
  CC      block/blk-merge.o
  CC      sound/core/vmaster.o
  CC      kernel/power/hibernate.o
  CC      kernel/power/snapshot.o
  CC      crypto/akcipher.o
  CC      arch/x86/kernel/cpu/proc.o
  CC      fs/sysfs/group.o
  CC      lib/crypto/sha1.o
  AR      drivers/pinctrl/built-in.a
  CC      fs/kernfs/file.o
  CC      drivers/pci/msi/pcidev_msi.o
  CC [M]  arch/x86/kvm/../../../virt/kvm/dirty_ring.o
  AR      net/sched/built-in.a
  CC      sound/core/ctljack.o
  CC      drivers/pci/msi/api.o
  CC      sound/core/jack.o
  CC      fs/configfs/item.o
  CC      kernel/locking/irqflag-debug.o
  CC      arch/x86/kernel/apic/vector.o
  CC      fs/kernfs/symlink.o
  CC      kernel/locking/mutex-debug.o
  CC      net/ethtool/common.o
  CC      fs/proc/root.o
  CC      security/keys/sysctl.o
  CC      fs/proc/base.o
  CC      drivers/pci/msi/msi.o
  CC      fs/proc/generic.o
  AR      fs/devpts/built-in.a
  CC      fs/ext4/balloc.o
  CC      fs/jbd2/transaction.o
  CC      arch/x86/mm/maccess.o
  CC      net/ethtool/netlink.o
  CC      lib/crypto/sha256.o
  CC      fs/jbd2/commit.o
  CC      fs/jbd2/recovery.o
  CC      fs/ramfs/inode.o
  AR      arch/x86/pci/built-in.a
  AR      fs/iomap/built-in.a
  CC      sound/core/timer.o
  CC      kernel/locking/lockdep.o
  CC      fs/ext4/bitmap.o
  CC      arch/x86/events/intel/lbr.o
  AR      fs/configfs/built-in.a
  MKCAP   arch/x86/kernel/cpu/capflags.c
  CC      drivers/pci/msi/irqdomain.o
  CC      net/ethtool/bitset.o
  CC      fs/hugetlbfs/inode.o
  CC      fs/fat/cache.o
  AR      fs/sysfs/built-in.a
  CC      io_uring/filetable.o
  CC      fs/nfs/client.o
  CC      fs/exportfs/expfs.o
  CC      mm/truncate.o
  CC      fs/lockd/clntlock.o
  CC      arch/x86/mm/pgprot.o
  CC      mm/vmscan.o
  CC      crypto/kpp.o
  CC      drivers/pci/pcie/portdrv.o
  CC      drivers/pci/hotplug/pci_hotplug_core.o
  AR      security/keys/built-in.a
  CC      crypto/acompress.o
  CC      drivers/pci/pcie/rcec.o
  CC      security/device_cgroup.o
  CC      drivers/pci/pcie/aspm.o
  CC [M]  arch/x86/kvm/../../../virt/kvm/pfncache.o
  AR      fs/kernfs/built-in.a
  CC [M]  lib/crypto/arc4.o
  CC      crypto/scompress.o
  CC      fs/nfs/dir.o
  AR      kernel/printk/built-in.a
  CC      drivers/pci/pcie/aer.o
  CC      arch/x86/kernel/apic/hw_nmi.o
  CC      fs/ramfs/file-mmu.o
  AR      lib/crypto/built-in.a
  CC      arch/x86/mm/hugetlbpage.o
  CC      arch/x86/mm/kasan_init_64.o
  CC [M]  arch/x86/kvm/x86.o
  CC [M]  arch/x86/kvm/emulate.o
  AR      fs/exportfs/built-in.a
  CC      fs/fat/dir.o
  CC      fs/nls/nls_base.o
  CC      kernel/power/swap.o
  AR      drivers/pci/msi/built-in.a
  LD [M]  lib/crypto/libarc4.o
  CC      fs/nls/nls_cp437.o
  CC      kernel/power/user.o
  CC      lib/lz4/lz4_compress.o
  CC      lib/lz4/lz4hc_compress.o
  CC      block/blk-timeout.o
  CC      lib/lz4/lz4_decompress.o
  CC      arch/x86/events/intel/p4.o
  CC      lib/zstd/zstd_compress_module.o
  CC      lib/xz/xz_dec_syms.o
  CC      crypto/algboss.o
  CC      drivers/pci/pcie/err.o
  CC      drivers/pci/hotplug/acpi_pcihp.o
  CC      mm/shmem.o
  AR      kernel/sched/built-in.a
  CC      arch/x86/events/intel/p6.o
  AR      fs/ramfs/built-in.a
  CC      arch/x86/kernel/apic/io_apic.o
  CC      kernel/power/poweroff.o
  CC      io_uring/openclose.o
  CC      arch/x86/kernel/apic/msi.o
  AR      drivers/pci/controller/dwc/built-in.a
  CC      fs/nls/nls_ascii.o
  CC      kernel/locking/lockdep_proc.o
  AR      drivers/pci/controller/mobiveil/built-in.a
  CC      drivers/pci/controller/vmd.o
  CC      net/ethtool/strset.o
  CC      fs/lockd/clntproc.o
  CC      arch/x86/events/intel/pt.o
  CC      kernel/locking/spinlock.o
  CC      lib/xz/xz_dec_stream.o
  CC      crypto/testmgr.o
  CC      block/blk-lib.o
  CC      net/netlink/policy.o
  CC      lib/zstd/compress/fse_compress.o
  CC      net/netlink/diag.o
  AR      fs/hugetlbfs/built-in.a
  CC      arch/x86/mm/pkeys.o
  CC      block/blk-mq.o
  CC      fs/ext4/block_validity.o
  CC      fs/jbd2/checkpoint.o
  CC [M]  arch/x86/kvm/i8259.o
  CC      sound/core/hrtimer.o
  AR      security/built-in.a
  CC      sound/core/seq_device.o
  CC      fs/nls/nls_iso8859-1.o
  CC      fs/nls/nls_utf8.o
  CC [M]  net/netfilter/ipvs/ip_vs_conn.o
  AR      sound/usb/misc/built-in.a
  AR      sound/usb/usx2y/built-in.a
  AR      sound/usb/caiaq/built-in.a
  AR      sound/usb/6fire/built-in.a
  AR      sound/usb/hiface/built-in.a
  CC      drivers/pci/pcie/aer_inject.o
  AR      sound/usb/bcd2000/built-in.a
  AR      sound/usb/built-in.a
  AR      sound/firewire/built-in.a
  AR      net/ipv4/netfilter/built-in.a
  CC      net/ipv4/route.o
  CC [M]  net/ipv4/netfilter/nf_defrag_ipv4.o
  CC      net/ipv4/inetpeer.o
  CC      drivers/pci/hotplug/pciehp_core.o
  CC      drivers/pci/hotplug/pciehp_ctrl.o
  CC      lib/zstd/compress/hist.o
  CC      drivers/pci/hotplug/pciehp_pci.o
  CC      lib/xz/xz_dec_lzma2.o
  CC      net/core/datagram.o
  CC      net/ethtool/linkinfo.o
  CC [M]  net/ipv4/netfilter/nf_reject_ipv4.o
  CC      lib/zstd/compress/huf_compress.o
  AR      fs/unicode/built-in.a
  CC      fs/nfs/file.o
  CC      drivers/pci/pcie/pme.o
  AR      fs/nls/built-in.a
  CC      net/ipv4/protocol.o
  CC      arch/x86/events/probe.o
  CC      drivers/pci/pcie/dpc.o
  CC [M]  net/netfilter/ipvs/ip_vs_core.o
  CC [M]  sound/pci/hda/patch_realtek.o
  CC [M]  net/netfilter/ipvs/ip_vs_ctl.o
  CC      fs/proc/array.o
  CC      arch/x86/mm/pti.o
  CC      fs/nfs/getroot.o
  AR      kernel/power/built-in.a
  CC      block/blk-mq-tag.o
  CC [M]  sound/core/control_led.o
  CC      mm/util.o
  CC      fs/fat/fatent.o
  AR      drivers/pci/controller/built-in.a
  CC      net/xfrm/xfrm_policy.o
  CC      io_uring/uring_cmd.o
  AR      drivers/pci/switch/built-in.a
  CC      io_uring/epoll.o
  CC      io_uring/statx.o
  CC      fs/ext4/dir.o
  AR      net/netlink/built-in.a
  AR      sound/sparc/built-in.a
  CC      net/unix/af_unix.o
  AR      lib/lz4/built-in.a
  CC      net/unix/garbage.o
  CC      fs/jbd2/revoke.o
  CC      fs/jbd2/journal.o
  CC      io_uring/net.o
  CC      block/blk-stat.o
  CC      arch/x86/events/intel/uncore.o
  CC      drivers/pci/hotplug/pciehp_hpc.o
  CC      lib/xz/xz_dec_bcj.o
  CC      fs/lockd/clntxdr.o
  CC      block/blk-mq-sysfs.o
  CC [M]  arch/x86/kvm/irq.o
  AR      drivers/pci/pcie/built-in.a
  CC [M]  net/ipv4/netfilter/ip_tables.o
  CC      drivers/pci/access.o
  CC      kernel/irq/irqdesc.o
  CC [M]  arch/x86/kvm/lapic.o
  AR      arch/x86/mm/built-in.a
  CC      net/ethtool/linkmodes.o
  AR      sound/spi/built-in.a
  AR      sound/parisc/built-in.a
  CC      fs/nfs/inode.o
  CC [M]  sound/core/hwdep.o
  CC      arch/x86/kernel/apic/x2apic_phys.o
  CC      io_uring/msg_ring.o
  CC      fs/lockd/host.o
  CC [M]  arch/x86/kvm/i8254.o
  CC      fs/nfs/super.o
  AR      lib/xz/built-in.a
  CC      net/ipv4/ip_input.o
  CC      lib/raid6/algos.o
  CC      fs/proc/fd.o
  CC      net/core/stream.o
  CC      lib/raid6/recov.o
  HOSTCC  lib/raid6/mktables
  CC      fs/ext4/ext4_jbd2.o
  CC      arch/x86/kernel/cpu/powerflags.o
  CC      fs/ext4/extents.o
  CC      block/blk-mq-cpumap.o
  CC      fs/fat/file.o
  CC      lib/zstd/compress/zstd_compress.o
  CC      block/blk-mq-sched.o
  CC      crypto/cmac.o
  CC      kernel/rcu/update.o
  AR      net/ipv6/netfilter/built-in.a
  CC      arch/x86/kernel/cpu/feat_ctl.o
  CC      kernel/rcu/sync.o
  CC [M]  net/ipv6/netfilter/nf_defrag_ipv6_hooks.o
  CC      net/ipv6/af_inet6.o
  CC      arch/x86/kernel/apic/x2apic_cluster.o
  CC [M]  sound/core/pcm.o
  CC      kernel/irq/handle.o
  CC      drivers/pci/bus.o
  CC      net/ipv6/anycast.o
  CC      fs/ntfs/aops.o
  CC      drivers/pci/hotplug/acpiphp_core.o
  CC      fs/ntfs/attrib.o
  CC      fs/ntfs/collate.o
  CC      kernel/locking/osq_lock.o
  CC      net/ipv6/ip6_output.o
  UNROLL  lib/raid6/int1.c
  UNROLL  lib/raid6/int2.c
  UNROLL  lib/raid6/int4.c
  UNROLL  lib/raid6/int8.c
  CC      net/ethtool/rss.o
  UNROLL  lib/raid6/int16.c
  UNROLL  lib/raid6/int32.c
  CC      lib/raid6/recov_ssse3.o
  CC      fs/fat/inode.o
  CC      arch/x86/kernel/cpu/intel.o
  CC      fs/proc/proc_tty.o
  CC      fs/nfs/io.o
  CC      crypto/hmac.o
  CC      mm/mmzone.o
  CC      io_uring/timeout.o
  CC      fs/lockd/svc.o
  CC      kernel/locking/qspinlock.o
  CC      arch/x86/kernel/apic/apic_flat_64.o
  CC      arch/x86/events/intel/uncore_nhmex.o
  CC      kernel/locking/rtmutex_api.o
  CC      kernel/irq/manage.o
  CC      drivers/pci/probe.o
  AR      sound/pci/riptide/built-in.a
  CC      mm/vmstat.o
  CC [M]  net/ipv4/netfilter/iptable_filter.o
  AR      sound/pci/rme9652/built-in.a
  CC      block/ioctl.o
  CC      kernel/locking/spinlock_debug.o
  CC      net/core/scm.o
  CC      net/core/gen_stats.o
  CC      drivers/pci/hotplug/acpiphp_glue.o
  CC      net/netfilter/core.o
  CC [M]  sound/core/pcm_native.o
  CC      lib/raid6/recov_avx2.o
  CC      fs/proc/cmdline.o
  CC      lib/raid6/mmx.o
  CC      mm/backing-dev.o
  CC [M]  arch/x86/kvm/ioapic.o
  CC [M]  sound/core/pcm_lib.o
  CC      kernel/locking/qrwlock.o
  CC [M]  net/ipv6/netfilter/nf_conntrack_reasm.o
  CC      crypto/vmac.o
  CC      net/ethtool/linkstate.o
  CC [M]  sound/pci/hda/patch_analog.o
  CC      arch/x86/kernel/apic/probe_64.o
  AR      sound/pci/trident/built-in.a
  CC      fs/ntfs/compress.o
  CC      fs/proc/consoles.o
  CC      block/genhd.o
  CC      crypto/xcbc.o
  AR      sound/pci/ymfpci/built-in.a
  CC      net/ethtool/debug.o
  CC      kernel/rcu/srcutree.o
  CC [M]  sound/core/pcm_misc.o
  CC [M]  net/netfilter/ipvs/ip_vs_sched.o
  CC      crypto/crypto_null.o
  CC      fs/ntfs/debug.o
  AR      arch/x86/kernel/apic/built-in.a
  CC      lib/zstd/compress/zstd_compress_literals.o
  CC      kernel/rcu/tree.o
  CC      arch/x86/kernel/cpu/intel_pconfig.o
  CC      net/unix/sysctl_net_unix.o
  CC      block/ioprio.o
  CC      lib/raid6/sse1.o
  CC      drivers/idle/intel_idle.o
  CC      drivers/video/console/dummycon.o
  CC      net/ipv6/ip6_input.o
  CC      io_uring/sqpoll.o
  CC      lib/raid6/sse2.o
  AR      fs/jbd2/built-in.a
  AR      drivers/char/ipmi/built-in.a
  CC      kernel/rcu/rcu_segcblist.o
  CC      arch/x86/kernel/cpu/tsx.o
  CC      lib/zstd/compress/zstd_compress_sequences.o
  CC [M]  net/ipv4/netfilter/iptable_mangle.o
  CC      fs/proc/cpuinfo.o
  CC      arch/x86/events/intel/uncore_snb.o
  AR      kernel/locking/built-in.a
  CC      fs/lockd/svclock.o
  CC      arch/x86/events/utils.o
  CC [M]  sound/core/pcm_memory.o
  CC      fs/fat/misc.o
  CC      crypto/md5.o
  CC      fs/nfs/direct.o
  CC      lib/raid6/avx2.o
  AR      drivers/pci/hotplug/built-in.a
  CC [M]  sound/pci/hda/patch_hdmi.o
  CC      net/core/gen_estimator.o
  CC      net/core/net_namespace.o
  CC      drivers/pci/host-bridge.o
  CC      arch/x86/events/rapl.o
  CC      arch/x86/events/msr.o
  CC      fs/proc/devices.o
  AR      kernel/livepatch/built-in.a
  CC      net/ethtool/wol.o
  CC      net/ipv4/ip_fragment.o
  CC      kernel/dma/mapping.o
  CC      arch/x86/kernel/cpu/intel_epb.o
  CC      kernel/irq/spurious.o
  CC      drivers/video/console/vgacon.o
  CC      kernel/dma/direct.o
  AR      sound/pcmcia/vx/built-in.a
  AR      sound/pcmcia/pdaudiocf/built-in.a
  AR      sound/pcmcia/built-in.a
  AR      sound/mips/built-in.a
  AR      sound/soc/built-in.a
  CC [M]  arch/x86/kvm/irq_comm.o
  CC      net/ipv4/ip_forward.o
  CC      net/packet/af_packet.o
  CC      net/key/af_key.o
  CC      lib/zstd/compress/zstd_compress_superblock.o
  CC      net/unix/diag.o
  CC      crypto/sha1_generic.o
  CC      block/badblocks.o
  CC      lib/raid6/avx512.o
  CC      fs/ntfs/dir.o
  CC [M]  net/netfilter/ipvs/ip_vs_xmit.o
  CC [M]  sound/pci/hda/hda_eld.o
  CC      crypto/sha256_generic.o
  CC      mm/mm_init.o
  CC      crypto/sha512_generic.o
  CC      fs/fat/nfs.o
  LD [M]  net/ipv6/netfilter/nf_defrag_ipv6.o
  CC      arch/x86/kernel/cpu/amd.o
  CC      lib/raid6/recov_avx512.o
  CC      kernel/irq/resend.o
  CC [M]  net/netfilter/ipvs/ip_vs_app.o
  CC      drivers/pci/remove.o
  CC      fs/nfs/pagelist.o
  CC [M]  net/ipv4/netfilter/iptable_nat.o
  CC      io_uring/fdinfo.o
  CC      fs/proc/interrupts.o
  CC [M]  sound/core/memalloc.o
  CC      arch/x86/events/intel/uncore_snbep.o
  CC      net/ipv4/ip_options.o
  AR      drivers/idle/built-in.a
  CC      fs/nfs/read.o
  CC      net/packet/diag.o
  CC      net/xfrm/xfrm_state.o
  CC      lib/zstd/compress/zstd_double_fast.o
  CC [M]  sound/core/pcm_timer.o
  CC      net/core/secure_seq.o
  CC      kernel/irq/chip.o
  CC      net/ethtool/features.o
  CC      kernel/irq/dummychip.o
  CC      block/blk-rq-qos.o
  CC      fs/proc/loadavg.o
  CC      kernel/irq/devres.o
  CC      kernel/dma/ops_helpers.o
  CC      kernel/dma/dummy.o
  AR      drivers/video/console/built-in.a
  CC      fs/lockd/svcshare.o
  CC      fs/nfs/symlink.o
  CC      drivers/video/logo/logo.o
  CC      fs/fat/namei_vfat.o
  TABLE   lib/raid6/tables.c
  CC      lib/raid6/int1.o
  CC      drivers/pci/pci.o
  CC      crypto/blake2b_generic.o
  HOSTCC  drivers/video/logo/pnmtologo
  CC      net/xfrm/xfrm_hash.o
  CC      net/ipv4/ip_output.o
  CC      net/ipv6/addrconf.o
  CC      net/unix/scm.o
  CC      arch/x86/kernel/cpu/hygon.o
  CC      net/ipv6/addrlabel.o
  CC      net/ipv6/route.o
  CC      block/disk-events.o
  CC      lib/zstd/compress/zstd_fast.o
  CC      crypto/ecb.o
  CC [M]  arch/x86/kvm/cpuid.o
  LOGO    drivers/video/logo/logo_linux_clut224.c
  CC      drivers/video/logo/logo_linux_clut224.o
  CC      fs/proc/meminfo.o
  CC      fs/proc/stat.o
  CC      fs/ntfs/file.o
  CC      fs/ntfs/index.o
  AR      drivers/video/logo/built-in.a
  CC      fs/ext4/extents_status.o
  CC [M]  arch/x86/kvm/pmu.o
  CC      drivers/video/backlight/backlight.o
  CC [M]  net/ipv4/netfilter/ipt_REJECT.o
  CC      kernel/dma/contiguous.o
  CC      net/ipv6/ip6_fib.o
  CC      net/ipv4/ip_sockglue.o
  CC      io_uring/tctx.o
  CC      arch/x86/kernel/cpu/centaur.o
  CC      mm/percpu.o
  CC      fs/proc/uptime.o
  CC      lib/raid6/int2.o
  LD [M]  sound/core/snd-ctl-led.o
  LD [M]  sound/core/snd-hwdep.o
  LD [M]  sound/core/snd-pcm.o
  CC      arch/x86/kernel/cpu/zhaoxin.o
  CC      fs/ext4/file.o
  AR      sound/core/built-in.a
  CC      fs/ntfs/inode.o
  CC      net/ethtool/privflags.o
  CC      kernel/irq/autoprobe.o
  CC      kernel/dma/swiotlb.o
  CC      fs/proc/util.o
  CC      net/core/flow_dissector.o
  CC [M]  sound/pci/hda/hda_intel.o
  CC      fs/lockd/svcproc.o
  CC      crypto/cbc.o
  CC      net/core/sysctl_net_core.o
  CC      fs/proc/version.o
  CC [M]  net/netfilter/ipvs/ip_vs_sync.o
  CC      block/blk-ia-ranges.o
  CC      fs/fat/namei_msdos.o
  CC      mm/slab_common.o
  AR      net/unix/built-in.a
  CC      lib/raid6/int4.o
  CC      fs/lockd/svcsubs.o
  CC      fs/ntfs/mft.o
  CC      arch/x86/kernel/cpu/perfctr-watchdog.o
  AR      net/bridge/netfilter/built-in.a
  CC      net/bridge/br.o
  CC      net/bridge/br_device.o
  CC      arch/x86/kernel/cpu/vmware.o
  CC      drivers/video/fbdev/core/fb_notify.o
  CC      arch/x86/kernel/cpu/hypervisor.o
  CC      mm/compaction.o
  CC      kernel/irq/irqdomain.o
  AR      drivers/video/backlight/built-in.a
  CC [M]  drivers/video/fbdev/core/fb_backlight.o
  CC      crypto/pcbc.o
  CC      io_uring/poll.o
  CC      crypto/cts.o
  CC      fs/proc/softirqs.o
  CC      fs/nfs/unlink.o
  CC      fs/ntfs/mst.o
  CC      fs/ntfs/namei.o
  AR      net/key/built-in.a
  CC [M]  arch/x86/kvm/mtrr.o
  AR      net/dsa/built-in.a
  CC      arch/x86/events/intel/uncore_discovery.o
  CC [M]  net/sunrpc/auth_gss/auth_gss.o
  CC      net/ethtool/rings.o
  CC [M]  net/sunrpc/auth_gss/gss_generic_token.o
  CC      block/bsg.o
  CC      block/bsg-lib.o
  CC      arch/x86/kernel/cpu/mshyperv.o
  CC      lib/raid6/int8.o
  CC      net/8021q/vlan_core.o
  CC      fs/lockd/mon.o
  CC [M]  drivers/video/fbdev/core/fb_info.o
  CC      lib/zstd/compress/zstd_lazy.o
  AR      fs/fat/built-in.a
  CC      fs/proc/namespaces.o
  CC      fs/autofs/init.o
  CC      kernel/dma/remap.o
  CC      block/blk-cgroup.o
  CC      fs/proc/self.o
  CC      crypto/lrw.o
  CC      fs/proc/thread_self.o
  CC      fs/lockd/trace.o
  CC      net/bridge/br_fdb.o
  CC      net/bridge/br_forward.o
  CC      fs/ntfs/runlist.o
  CC      fs/ext4/fsmap.o
  CC [M]  arch/x86/kvm/hyperv.o
  CC      net/ethtool/channels.o
  AR      net/packet/built-in.a
  CC      fs/autofs/inode.o
  AR      drivers/video/fbdev/omap/built-in.a
  LD [M]  sound/pci/hda/snd-hda-codec.o
  CC      net/xfrm/xfrm_input.o
  CC      net/ipv4/inet_hashtables.o
  CC      net/xfrm/xfrm_output.o
  CC      net/ipv4/inet_timewait_sock.o
  CC      kernel/irq/proc.o
  LD [M]  sound/pci/hda/snd-hda-codec-generic.o
  CC      fs/proc/proc_sysctl.o
  CC      arch/x86/kernel/cpu/capflags.o
  LD [M]  sound/pci/hda/snd-hda-codec-realtek.o
  CC      lib/raid6/int16.o
  CC      arch/x86/events/intel/cstate.o
  AR      kernel/dma/built-in.a
  LD [M]  sound/pci/hda/snd-hda-codec-analog.o
  CC      fs/ntfs/super.o
  AR      arch/x86/kernel/cpu/built-in.a
  CC      fs/ntfs/sysctl.o
  LD [M]  sound/pci/hda/snd-hda-codec-hdmi.o
  CC      io_uring/cancel.o
  CC      arch/x86/kernel/kprobes/core.o
  CC      io_uring/kbuf.o
  CC [M]  drivers/video/fbdev/core/fbmem.o
  LD [M]  sound/pci/hda/snd-hda-intel.o
  CC      arch/x86/kernel/kprobes/opt.o
  CC      net/dcb/dcbnl.o
  AR      sound/pci/vx222/built-in.a
  CC      kernel/entry/common.o
  CC      arch/x86/kernel/kprobes/ftrace.o
  AR      sound/pci/built-in.a
  CC      kernel/module/main.o
  AR      sound/atmel/built-in.a
  CC      kernel/module/strict_rwx.o
  AR      sound/hda/built-in.a
  CC      kernel/module/kmod.o
  CC [M]  sound/hda/hda_bus_type.o
  AR      kernel/rcu/built-in.a
  CC [M]  arch/x86/kvm/debugfs.o
  CC [M]  net/netfilter/ipvs/ip_vs_est.o
  CC      crypto/xts.o
  CC      kernel/entry/syscall_user_dispatch.o
  CC      drivers/pci/pci-driver.o
  CC      net/core/dev.o
  CC      fs/lockd/xdr.o
  CC      fs/nfs/write.o
  CC      lib/raid6/int32.o
  CC      mm/interval_tree.o
  CC [M]  net/8021q/vlan.o
  CC      fs/autofs/root.o
  CC      net/sunrpc/clnt.o
  CC [M]  arch/x86/kvm/mmu/mmu.o
  CC      kernel/irq/migration.o
  CC      net/core/dev_addr_lists.o
  CC      mm/list_lru.o
  CC [M]  sound/hda/hdac_bus.o
  AR      arch/x86/events/intel/built-in.a
  AR      arch/x86/events/built-in.a
  CC [M]  sound/hda/hdac_device.o
  CC      net/ethtool/coalesce.o
  CC      fs/nfs/namespace.o
  CC      fs/lockd/clnt4xdr.o
  CC      net/core/dst.o
  CC      kernel/module/tree_lookup.o
  CC      net/bridge/br_if.o
  CC      crypto/ctr.o
  AR      arch/x86/kernel/kprobes/built-in.a
  LDS     arch/x86/kernel/vmlinux.lds
  AS      arch/x86/kernel/head_64.o
  CC      arch/x86/kernel/head64.o
  CC      fs/proc/proc_net.o
  CC      lib/raid6/tables.o
  CC      kernel/entry/kvm.o
  CC      fs/proc/kcore.o
  CC      io_uring/rsrc.o
  CC      fs/ext4/fsync.o
  CC      kernel/irq/cpuhotplug.o
  CC      fs/lockd/xdr4.o
  CC      net/ipv4/inet_connection_sock.o
  CC      block/blk-cgroup-rwstat.o
  CC [M]  drivers/video/fbdev/core/fbmon.o
  CC      fs/ntfs/unistr.o
  CC [M]  net/sunrpc/auth_gss/gss_mech_switch.o
  CC      fs/autofs/symlink.o
  CC      mm/workingset.o
  CC      fs/proc/kmsg.o
  CC      net/xfrm/xfrm_sysctl.o
  CC [M]  drivers/video/fbdev/core/fbcmap.o
  CC [M]  drivers/video/fbdev/core/modedb.o
  CC      crypto/gcm.o
  CC      net/core/netevent.o
  CC      fs/proc/page.o
  CC      drivers/pci/search.o
  CC      drivers/pci/pci-sysfs.o
  CC [M]  sound/hda/hdac_sysfs.o
  CC [M]  net/8021q/vlan_dev.o
  CC      arch/x86/kernel/ebda.o
  CC      drivers/video/aperture.o
  CC [M]  net/netfilter/ipvs/ip_vs_proto.o
  CC      fs/ntfs/upcase.o
  CC      kernel/irq/pm.o
  AR      lib/raid6/built-in.a
  CC      kernel/time/time.o
  CC      fs/autofs/waitq.o
  CC      net/ipv4/tcp.o
  CC      kernel/irq/msi.o
  AR      kernel/entry/built-in.a
  CC      net/ethtool/pause.o
  CC      net/ethtool/eee.o
  CC      net/core/neighbour.o
  CC      fs/autofs/expire.o
  CC      net/bridge/br_input.o
  CC      net/dcb/dcbevent.o
  CC      fs/autofs/dev-ioctl.o
  CC      crypto/pcrypt.o
  CC      block/blk-throttle.o
  CC [M]  sound/hda/hdac_regmap.o
  CC [M]  net/sunrpc/auth_gss/svcauth_gss.o
  CC [M]  arch/x86/kvm/mmu/page_track.o
  CC      arch/x86/kernel/platform-quirks.o
  CC      net/ethtool/tsinfo.o
  CC      fs/ext4/hash.o
  CC      fs/lockd/svc4proc.o
  CC [M]  net/netfilter/ipvs/ip_vs_pe.o
  CC      mm/debug.o
  CC [M]  arch/x86/kvm/mmu/spte.o
  AR      fs/ntfs/built-in.a
  CC      arch/x86/kernel/process_64.o
  CC      drivers/pci/rom.o
  CC      net/ipv4/tcp_input.o
  CC      net/xfrm/xfrm_replay.o
  CC      kernel/futex/core.o
  CC      kernel/cgroup/cgroup.o
  CC      kernel/module/debug_kmemleak.o
  CC      kernel/futex/syscalls.o
  AR      fs/proc/built-in.a
  CC      kernel/module/kallsyms.o
  CC      fs/ext4/ialloc.o
  CC      kernel/trace/trace_clock.o
  CC      kernel/trace/ftrace.o
  CC      drivers/video/cmdline.o
  CC      io_uring/rw.o
  CC      block/mq-deadline.o
  CC [M]  drivers/video/fbdev/core/fbcvt.o
  CC      kernel/irq/affinity.o
  CC      crypto/cryptd.o
  AR      fs/autofs/built-in.a
  CC      net/xfrm/xfrm_device.o
  AR      net/dcb/built-in.a
  CC      net/bridge/br_ioctl.o
  CC [M]  sound/hda/hdac_controller.o
  CC      net/ethtool/cabletest.o
  CC      kernel/time/timer.o
  CC      kernel/cgroup/rstat.o
  CC      io_uring/opdef.o
  CC [M]  net/8021q/vlan_netlink.o
  CC      drivers/pci/setup-res.o
  CC      net/l3mdev/l3mdev.o
  CC      kernel/trace/ring_buffer.o
  CC      net/ipv6/ipv6_sockglue.o
  CC      fs/nfs/mount_clnt.o
  CC      kernel/module/procfs.o
  CC      kernel/time/hrtimer.o
  CC      lib/fonts/fonts.o
  CC      lib/fonts/font_8x8.o
  CC      mm/gup.o
  CC      net/xfrm/xfrm_algo.o
  CC      kernel/irq/matrix.o
  CC      net/sunrpc/xprt.o
  CC      kernel/bpf/core.o
  CC      net/bridge/br_stp.o
  CC      net/bridge/br_stp_bpdu.o
  CC [M]  net/netfilter/ipvs/ip_vs_proto_tcp.o
  CC      lib/fonts/font_8x16.o
  CC      kernel/module/sysfs.o
  CC      kernel/events/core.o
  CC      fs/lockd/procfs.o
  CC [M]  drivers/video/fbdev/core/fb_cmdline.o
  CC      kernel/futex/pi.o
  CC [M]  arch/x86/kvm/mmu/tdp_iter.o
  CC      kernel/futex/requeue.o
  CC      arch/x86/kernel/signal.o
  CC      lib/argv_split.o
  CC      lib/bug.o
  CC [M]  sound/hda/hdac_stream.o
  CC      drivers/pci/irq.o
  CC      crypto/des_generic.o
  AR      lib/fonts/built-in.a
  CC      net/handshake/genl.o
  CC [M]  net/sunrpc/auth_gss/gss_rpc_upcall.o
  CC      kernel/cgroup/namespace.o
  AR      net/l3mdev/built-in.a
  CC [M]  net/8021q/vlanproc.o
  CC [M]  net/bluetooth/af_bluetooth.o
  CC      block/kyber-iosched.o
  CC      lib/buildid.o
  CC [M]  sound/hda/array.o
  CC      kernel/futex/waitwake.o
  CC      mm/mmap_lock.o
  CC      net/ethtool/tunnels.o
  CC      fs/nfs/nfstrace.o
  CC      drivers/pci/vpd.o
  AR      fs/lockd/built-in.a
  CC      drivers/pci/setup-bus.o
  CC      drivers/pci/vc.o
  AR      kernel/module/built-in.a
  CC      net/bridge/br_stp_if.o
  CC      lib/cmdline.o
  CC      crypto/aes_generic.o
  CC [M]  drivers/video/fbdev/core/fb_io_fops.o
  CC      fs/nfs/export.o
  CC      net/xfrm/xfrm_user.o
  CC      arch/x86/kernel/signal_64.o
  CC      drivers/pci/mmap.o
  CC      net/handshake/netlink.o
  CC      block/bfq-iosched.o
  CC      io_uring/notif.o
  CC      kernel/fork.o
  AR      kernel/irq/built-in.a
  CC      kernel/exec_domain.o
  CC      net/handshake/request.o
  CC      fs/nfs/sysfs.o
  CC      kernel/cgroup/cgroup-v1.o
  CC      drivers/pci/setup-irq.o
  CC      io_uring/io-wq.o
  AR      kernel/futex/built-in.a
  CC      crypto/deflate.o
  CC      net/bridge/br_stp_timer.o
  CC [M]  sound/hda/hdmi_chmap.o
  CC      net/bridge/br_netlink.o
  CC      fs/ext4/indirect.o
  AR      net/8021q/built-in.a
  LD [M]  net/8021q/8021q.o
  CC [M]  net/dns_resolver/dns_key.o
  CC [M]  net/netfilter/ipvs/ip_vs_proto_udp.o
  CC [M]  net/sunrpc/auth_gss/gss_rpc_xdr.o
  CC [M]  net/dns_resolver/dns_query.o
  CC      net/sunrpc/socklib.o
  CC      drivers/pci/proc.o
  CC      kernel/time/timekeeping.o
  CC      mm/highmem.o
  CC [M]  drivers/video/fbdev/core/fb_defio.o
  CC      arch/x86/kernel/traps.o
  CC      net/ipv6/ndisc.o
  CC      net/ipv4/tcp_output.o
  CC [M]  net/netfilter/ipvs/ip_vs_nfct.o
  CC      net/ethtool/fec.o
  CC [M]  net/bluetooth/hci_core.o
  CC      crypto/crc32c_generic.o
  CC      net/core/rtnetlink.o
  CC      kernel/trace/trace.o
  CC      block/bfq-wf2q.o
  CC      lib/zstd/compress/zstd_ldm.o
  CC      drivers/pci/slot.o
  CC      net/core/utils.o
  AR      drivers/video/fbdev/omap2/omapfb/dss/built-in.a
  AR      drivers/video/fbdev/omap2/omapfb/displays/built-in.a
  AR      drivers/video/fbdev/omap2/omapfb/built-in.a
  AR      drivers/video/fbdev/omap2/built-in.a
  CC      arch/x86/kernel/idt.o
  CC      net/ethtool/eeprom.o
  CC      fs/nfs/fs_context.o
  CC [M]  sound/hda/trace.o
  LD [M]  net/dns_resolver/dns_resolver.o
  CC      net/ipv4/tcp_timer.o
  CC      net/handshake/tlshd.o
  CC      net/devres.o
  CC      mm/memory.o
  CC [M]  drivers/video/fbdev/uvesafb.o
  CC      net/ipv6/udp.o
  CC      crypto/crct10dif_common.o
  CC      net/core/link_watch.o
  CC [M]  arch/x86/kvm/mmu/tdp_mmu.o
  CC      block/bfq-cgroup.o
  CC      kernel/events/ring_buffer.o
  AR      kernel/bpf/built-in.a
  CC      net/ethtool/stats.o
  CC      net/ethtool/phc_vclocks.o
  CC [M]  drivers/video/fbdev/core/fb_chrdev.o
  CC      drivers/video/nomodeset.o
  CC      net/ipv6/udplite.o
  CC [M]  net/sunrpc/auth_gss/trace.o
  CC      crypto/crct10dif_generic.o
  AR      fs/hostfs/built-in.a
  CC      fs/ext4/inline.o
  CC      fs/debugfs/inode.o
  CC      fs/tracefs/inode.o
  AR      io_uring/built-in.a
  CC      drivers/pci/pci-acpi.o
  CC      arch/x86/kernel/irq.o
  CC [M]  net/netfilter/ipvs/ip_vs_rr.o
  CC      lib/zstd/compress/zstd_opt.o
  CC      kernel/time/ntp.o
  CC      fs/btrfs/super.o
  CC      net/ipv6/raw.o
  CC [M]  drivers/video/fbdev/core/fb_procfs.o
  CC      net/ipv6/icmp.o
  CC [M]  sound/hda/hdac_component.o
  CC      drivers/video/hdmi.o
  CC      arch/x86/kernel/irq_64.o
  CC      crypto/authenc.o
  CC      net/bridge/br_netlink_tunnel.o
  CC      net/core/filter.o
  CC      net/handshake/trace.o
  CC      net/core/sock_diag.o
  CC      net/core/dev_ioctl.o
  CC      net/bridge/br_arp_nd_proxy.o
  CC      lib/zstd/zstd_decompress_module.o
  AR      net/xfrm/built-in.a
  CC      net/socket.o
  CC      arch/x86/kernel/dumpstack_64.o
  CC      block/blk-mq-pci.o
  AR      fs/tracefs/built-in.a
  CC [M]  sound/hda/hdac_i915.o
  CC      fs/debugfs/file.o
  CC      kernel/time/clocksource.o
  CC      net/ethtool/mm.o
  CC      arch/x86/kernel/time.o
  CC      net/ethtool/module.o
  CC [M]  net/bluetooth/hci_conn.o
  CC [M]  drivers/video/fbdev/core/fbsysfs.o
  CC [M]  net/bluetooth/hci_event.o
  CC      fs/btrfs/ctree.o
  CC [M]  arch/x86/kvm/smm.o
  LD [M]  net/netfilter/ipvs/ip_vs.o
  AR      sound/x86/built-in.a
  CC      net/netfilter/nf_log.o
  CC      drivers/pci/quirks.o
  CC      net/ethtool/pse-pd.o
  CC      kernel/panic.o
  CC      lib/zstd/decompress/huf_decompress.o
  CC      block/blk-mq-virtio.o
  CC      crypto/authencesn.o
  CC      kernel/cgroup/freezer.o
  CC      crypto/lzo.o
  CC      fs/nfs/sysctl.o
  CC      kernel/events/callchain.o
  CC      kernel/cgroup/legacy_freezer.o
  CC [M]  drivers/video/fbdev/core/fbcon.o
  CC [M]  sound/hda/intel-dsp-config.o
  CC      net/sunrpc/xprtsock.o
  CC      mm/mincore.o
  CC      fs/ext4/inode.o
  AR      net/handshake/built-in.a
  CC      mm/mlock.o
  CC      net/sunrpc/sched.o
  CC [M]  arch/x86/kvm/vmx/vmx.o
  CC      kernel/time/jiffies.o
  CC      arch/x86/kernel/ioport.o
  CC [M]  arch/x86/kvm/kvm-asm-offsets.s
  AR      fs/debugfs/built-in.a
  CC      net/sunrpc/auth.o
  CC [M]  drivers/video/fbdev/simplefb.o
  CC      net/compat.o
  CC [M]  drivers/video/fbdev/core/bitblit.o
  CC      net/bridge/br_sysfs_if.o
  CC      block/blk-mq-debugfs.o
  CC [M]  arch/x86/kvm/vmx/pmu_intel.o
  CC [M]  net/sunrpc/auth_gss/gss_krb5_mech.o
  CC      net/ipv6/mcast.o
  CC [M]  net/bluetooth/mgmt.o
  CC      net/ethtool/plca.o
  CC [M]  net/bluetooth/hci_sock.o
  CC      fs/btrfs/extent-tree.o
  CC      kernel/cgroup/pids.o
  CC      kernel/cgroup/cpuset.o
  CC      net/ipv6/reassembly.o
  CC      kernel/time/timer_list.o
  CC      crypto/lzo-rle.o
  CC      net/bridge/br_sysfs_br.o
  CC      fs/nfs/nfs2super.o
  CC      net/core/tso.o
  CC [M]  sound/hda/intel-nhlt.o
  CC      net/netfilter/nf_queue.o
  CC [M]  net/bluetooth/hci_sysfs.o
  CC      net/ipv4/tcp_ipv4.o
  CC      mm/mmap.o
  CC      arch/x86/kernel/dumpstack.o
  CC [M]  arch/x86/kvm/vmx/vmcs12.o
  CC [M]  net/sunrpc/auth_gss/gss_krb5_seal.o
  CC      arch/x86/kernel/nmi.o
  CC      net/sysctl_net.o
  CC      crypto/lz4.o
  CC      block/blk-pm.o
  CC      net/core/sock_reuseport.o
  CC      kernel/time/timeconv.o
  CC [M]  sound/hda/intel-sdw-acpi.o
  CC      net/bridge/br_nf_core.o
  AR      net/ethtool/built-in.a
  CC      fs/nfs/proc.o
  CC      fs/nfs/nfs2xdr.o
  CC      kernel/trace/trace_output.o
  CC      fs/nfs/nfs3super.o
  CC      kernel/trace/trace_seq.o
  CC      kernel/trace/trace_stat.o
  CC      mm/mmu_gather.o
  CC      kernel/time/timecounter.o
  CC      arch/x86/kernel/ldt.o
  CC      crypto/lz4hc.o
  CC      crypto/xxhash_generic.o
  CC      drivers/pci/ats.o
  CC [M]  drivers/video/fbdev/core/softcursor.o
  CC [M]  net/sunrpc/auth_gss/gss_krb5_unseal.o
  CC      kernel/time/alarmtimer.o
  CC      kernel/time/posix-timers.o
  CC      net/ipv6/tcp_ipv6.o
  CC      block/holder.o
  CC      net/ipv6/ping.o
  CC      net/bridge/br_multicast.o
  CC      net/bridge/br_mdb.o
  LD [M]  sound/hda/snd-hda-core.o
  CC      net/netfilter/nf_sockopt.o
  LD [M]  sound/hda/snd-intel-dspcfg.o
  LD [M]  sound/hda/snd-intel-sdw-acpi.o
  CC      kernel/trace/trace_printk.o
  AR      sound/xen/built-in.a
  AR      sound/virtio/built-in.a
  CC      sound/sound_core.o
  CC [M]  net/bluetooth/l2cap_core.o
  CC      kernel/time/posix-cpu-timers.o
  CC      arch/x86/kernel/setup.o
  CC      crypto/rng.o
  CC      drivers/acpi/acpica/dsargs.o
  CC      drivers/acpi/apei/apei-base.o
  CC      drivers/pnp/pnpacpi/core.o
  CC      drivers/pnp/core.o
  CC      net/bridge/br_multicast_eht.o
  CC      net/bridge/br_vlan.o
  CC      sound/last.o
  CC [M]  net/sunrpc/auth_gss/gss_krb5_seqnum.o
  CC [M]  net/sunrpc/auth_gss/gss_krb5_wrap.o
  CC      drivers/pci/iov.o
  CC [M]  drivers/video/fbdev/core/tileblit.o
  AR      block/built-in.a
  CC [M]  drivers/video/fbdev/core/cfbfillrect.o
  CC      fs/nfs/nfs3client.o
  CC      drivers/acpi/acpica/dscontrol.o
  CC      lib/zstd/decompress/zstd_ddict.o
  AR      drivers/acpi/pmic/built-in.a
  CC      net/sunrpc/auth_null.o
  CC      crypto/drbg.o
  CC      net/sunrpc/auth_unix.o
  CC      drivers/pnp/card.o
  CC      arch/x86/kernel/x86_init.o
  CC      kernel/time/posix-clock.o
  CC      drivers/pnp/pnpacpi/rsparser.o
  CC      kernel/events/hw_breakpoint.o
  AR      sound/built-in.a
  CC      drivers/acpi/apei/hest.o
  CC      mm/mprotect.o
  CC      kernel/trace/pid_list.o
  CC [M]  net/sunrpc/auth_gss/gss_krb5_crypto.o
  CC      net/netfilter/utils.o
  CC      kernel/events/uprobes.o
  CC      drivers/acpi/acpica/dsdebug.o
  CC      net/sunrpc/svc.o
  CC      net/core/fib_notifier.o
  CC      arch/x86/kernel/i8259.o
  CC      mm/mremap.o
  CC      mm/msync.o
  CC      fs/ext4/ioctl.o
  CC      drivers/acpi/dptf/int340x_thermal.o
  CC      drivers/acpi/tables.o
  AR      kernel/cgroup/built-in.a
  CC      mm/page_vma_mapped.o
  CC      fs/ext4/mballoc.o
  CC      arch/x86/kernel/irqinit.o
  CC      kernel/time/itimer.o
  CC      drivers/acpi/acpica/dsfield.o
  CC [M]  drivers/video/fbdev/core/cfbcopyarea.o
  CC      arch/x86/kernel/jump_label.o
  CC      lib/cpumask.o
  CC      drivers/pci/pci-stub.o
  CC      drivers/pci/pci-label.o
  CC      drivers/acpi/apei/erst.o
  CC      fs/nfs/nfs3proc.o
  CC [M]  arch/x86/kvm/vmx/hyperv.o
  CC [M]  arch/x86/kvm/vmx/nested.o
  AR      drivers/acpi/dptf/built-in.a
  CC      drivers/acpi/blacklist.o
  CC      kernel/trace/trace_sched_switch.o
  CC      net/bridge/br_vlan_tunnel.o
  AR      drivers/pnp/pnpacpi/built-in.a
  CC      drivers/pnp/driver.o
  CC      net/ipv4/tcp_minisocks.o
  CC      kernel/cpu.o
  CC      kernel/exit.o
  CC      kernel/time/clockevents.o
  CC      arch/x86/kernel/irq_work.o
  CC      drivers/acpi/acpica/dsinit.o
  CC [M]  net/netfilter/nfnetlink.o
  CC      net/core/xdp.o
  CC      arch/x86/kernel/probe_roms.o
  CC [M]  net/sunrpc/auth_gss/gss_krb5_keys.o
  CC      net/core/flow_offload.o
  CC      lib/ctype.o
  CC      mm/pagewalk.o
  CC [M]  arch/x86/kvm/vmx/posted_intr.o
  CC      crypto/jitterentropy.o
  CC      kernel/time/tick-common.o
  CC      lib/dec_and_lock.o
  CC [M]  net/bluetooth/l2cap_sock.o
  CC      crypto/jitterentropy-kcapi.o
  CC      net/sunrpc/svcsock.o
  CC [M]  net/bluetooth/smp.o
  CC      mm/pgtable-generic.o
  CC      net/sunrpc/svcauth.o
  CC      drivers/pci/vgaarb.o
  CC      drivers/pnp/resource.o
  CC      drivers/acpi/acpica/dsmethod.o
  CC [M]  drivers/video/fbdev/core/cfbimgblt.o
  CC      net/ipv4/tcp_cong.o
  CC      crypto/ghash-generic.o
  CC      net/ipv6/exthdrs.o
  CC      mm/rmap.o
  CC      kernel/trace/trace_functions.o
  CC      kernel/time/tick-broadcast.o
  CC      kernel/softirq.o
  CC      drivers/acpi/apei/bert.o
  CC      fs/btrfs/print-tree.o
  CC      drivers/acpi/osi.o
  CC      fs/ext4/migrate.o
  CC      arch/x86/kernel/sys_ia32.o
  CC      net/core/gro.o
  AR      kernel/events/built-in.a
  CC      lib/decompress.o
  CC      mm/vmalloc.o
  CC      lib/decompress_bunzip2.o
  CC      drivers/acpi/acpica/dsmthdat.o
  CC      crypto/af_alg.o
  LD [M]  net/sunrpc/auth_gss/auth_rpcgss.o
  CC      mm/page_alloc.o
  LD [M]  net/sunrpc/auth_gss/rpcsec_gss_krb5.o
  CC      kernel/resource.o
  CC      net/sunrpc/svcauth_unix.o
  CC      arch/x86/kernel/signal_32.o
  CC [M]  drivers/video/fbdev/core/sysfillrect.o
  CC      net/bridge/br_vlan_options.o
  LD [M]  arch/x86/kvm/kvm.o
  CC      fs/nfs/nfs3xdr.o
  CC      net/sunrpc/addr.o
  CC      drivers/acpi/apei/ghes.o
  CC      drivers/acpi/acpica/dsobject.o
  CC      kernel/sysctl.o
  CC [M]  net/netfilter/nf_conntrack_core.o
  CC      net/bridge/br_mst.o
  CC      drivers/pnp/manager.o
  CC      crypto/algif_hash.o
  CC [M]  net/netfilter/nf_conntrack_standalone.o
  CC      lib/zstd/decompress/zstd_decompress.o
  CC      kernel/time/tick-broadcast-hrtimer.o
  CC      net/core/netdev-genl.o
  AR      drivers/pci/built-in.a
  AR      drivers/amba/built-in.a
  CC      kernel/trace/trace_preemptirq.o
  CC      crypto/algif_skcipher.o
  CC      net/ipv4/tcp_metrics.o
  CC      net/ipv6/datagram.o
  CC      net/ipv6/ip6_flowlabel.o
  CC      net/ipv6/inet6_connection_sock.o
  CC      drivers/pnp/support.o
  CC      drivers/acpi/acpica/dsopcode.o
  CC      net/sunrpc/rpcb_clnt.o
  CC      kernel/time/tick-oneshot.o
  CC      net/ipv4/tcp_fastopen.o
  CC      lib/decompress_inflate.o
  CC      arch/x86/kernel/sys_x86_64.o
  CC      lib/decompress_unlz4.o
  CC      lib/zstd/decompress/zstd_decompress_block.o
  CC      fs/ext4/mmp.o
  CC      fs/btrfs/root-tree.o
  CC [M]  drivers/video/fbdev/core/syscopyarea.o
  CC [M]  net/bluetooth/lib.o
  CC      drivers/pnp/interface.o
  CC      drivers/pnp/quirks.o
  CC      mm/init-mm.o
  CC      kernel/capability.o
  CC      kernel/time/tick-sched.o
  CC      drivers/acpi/acpica/dspkginit.o
  CC      kernel/ptrace.o
  CC      kernel/trace/trace_nop.o
  CC      net/ipv6/udp_offload.o
  CC      fs/ext4/move_extent.o
  CC      lib/decompress_unlzma.o
  CC      lib/decompress_unlzo.o
  AR      drivers/acpi/apei/built-in.a
  CC      mm/memblock.o
  CC      mm/memory_hotplug.o
  CC      lib/zstd/zstd_common_module.o
  CC      net/core/netdev-genl-gen.o
  CC      kernel/trace/trace_functions_graph.o
  CC      lib/zstd/common/debug.o
  CC      kernel/time/vsyscall.o
  CC      kernel/trace/fgraph.o
  CC [M]  net/bridge/br_netfilter_hooks.o
  AR      drivers/clk/actions/built-in.a
  CC      crypto/xor.o
  CC      drivers/dma/dw/core.o
  AR      drivers/clk/analogbits/built-in.a
  AR      drivers/clk/bcm/built-in.a
  AR      drivers/clk/imgtec/built-in.a
  AR      drivers/clk/imx/built-in.a
  AR      drivers/clk/ingenic/built-in.a
  AR      drivers/clk/mediatek/built-in.a
  CC      arch/x86/kernel/espfix_64.o
  AR      drivers/clk/microchip/built-in.a
  AR      drivers/clk/mstar/built-in.a
  AR      drivers/clk/mvebu/built-in.a
  CC      drivers/dma/dw/dw.o
  AR      drivers/clk/ralink/built-in.a
  AR      drivers/clk/renesas/built-in.a
  AR      drivers/clk/socfpga/built-in.a
  CC      arch/x86/kernel/ksysfs.o
  AR      drivers/clk/sprd/built-in.a
  AR      drivers/clk/starfive/built-in.a
  AR      drivers/clk/sunxi-ng/built-in.a
  CC      net/core/net-sysfs.o
  AR      drivers/clk/ti/built-in.a
  AR      drivers/clk/versatile/built-in.a
  CC      drivers/acpi/acpica/dsutils.o
  CC      drivers/clk/x86/clk-lpss-atom.o
  CC      lib/zstd/common/entropy_common.o
  CC      lib/zstd/common/error_private.o
  CC      net/ipv6/seg6.o
  CC      drivers/clk/x86/clk-pmc-atom.o
  CC      net/core/page_pool.o
  CC [M]  net/bluetooth/ecdh_helper.o
  CC      drivers/acpi/osl.o
  CC [M]  drivers/video/fbdev/core/sysimgblt.o
  CC      drivers/pnp/system.o
  CC      kernel/user.o
  CC [M]  net/netfilter/nf_conntrack_expect.o
  CC [M]  net/netfilter/nf_conntrack_helper.o
  CC      crypto/hash_info.o
  CC      kernel/signal.o
  CC      net/core/net-procfs.o
  CC      lib/zstd/common/fse_decompress.o
  CC      kernel/time/timekeeping_debug.o
  CC      crypto/simd.o
  CC      net/ipv6/fib6_notifier.o
  AR      drivers/soc/apple/built-in.a
  AR      drivers/soc/aspeed/built-in.a
  CC      drivers/virtio/virtio.o
  AR      drivers/soc/bcm/bcm63xx/built-in.a
  AR      drivers/soc/bcm/built-in.a
  AR      drivers/soc/fsl/built-in.a
  CC      kernel/time/namespace.o
  AR      drivers/soc/fujitsu/built-in.a
  CC      drivers/tty/vt/vt_ioctl.o
  AR      drivers/soc/imx/built-in.a
  AR      fs/nfs/built-in.a
  AR      drivers/soc/ixp4xx/built-in.a
  AR      drivers/soc/loongson/built-in.a
  CC      net/core/netpoll.o
  AR      drivers/soc/mediatek/built-in.a
  CC      drivers/dma/hsu/hsu.o
  AR      drivers/soc/microchip/built-in.a
  CC      kernel/sys.o
  CC      fs/btrfs/dir-item.o
  CC      fs/btrfs/file-item.o
  AR      drivers/soc/nuvoton/built-in.a
  AR      drivers/soc/pxa/built-in.a
  CC      drivers/acpi/acpica/dswexec.o
  AR      drivers/soc/amlogic/built-in.a
  AR      drivers/soc/qcom/built-in.a
  CC      drivers/acpi/acpica/dswload.o
  AR      drivers/soc/renesas/built-in.a
  CC      drivers/tty/hvc/hvc_console.o
  CC      net/ipv4/tcp_rate.o
  CC      drivers/tty/serial/8250/8250_core.o
  AR      drivers/soc/rockchip/built-in.a
  AR      drivers/pnp/built-in.a
  AR      drivers/soc/sifive/built-in.a
  CC      kernel/trace/blktrace.o
  AR      drivers/soc/sunxi/built-in.a
  CC      arch/x86/kernel/bootflag.o
  CC      drivers/virtio/virtio_ring.o
  AR      drivers/soc/ti/built-in.a
  AR      drivers/soc/xilinx/built-in.a
  AR      drivers/clk/x86/built-in.a
  AR      drivers/soc/built-in.a
  AR      drivers/clk/xilinx/built-in.a
  CC      drivers/clk/clk-devres.o
  CC      drivers/tty/serial/8250/8250_pnp.o
  CC [M]  net/bluetooth/hci_request.o
  CC      drivers/acpi/utils.o
  CC      drivers/tty/serial/serial_core.o
  CC      net/ipv6/rpl.o
  CC      net/sunrpc/timer.o
  CC      drivers/acpi/acpica/dswload2.o
  CC      drivers/dma/dw/idma32.o
  CC      drivers/dma/dw/acpi.o
  CC [M]  crypto/md4.o
  CC      net/ipv4/tcp_recovery.o
  CC [M]  drivers/video/fbdev/core/fb_sys_fops.o
  UPD     arch/x86/kvm/kvm-asm-offsets.h
  CC [M]  net/bluetooth/mgmt_util.o
  CC      net/ipv6/ioam6.o
  CC      kernel/trace/trace_events.o
  CC      drivers/char/hw_random/core.o
  CC      drivers/clk/clk-bulk.o
  CC      lib/zstd/common/zstd_common.o
  CC      drivers/dma/dw/pci.o
  AR      kernel/time/built-in.a
  CC      drivers/char/agp/backend.o
  CC      drivers/char/tpm/tpm-chip.o
  CC      arch/x86/kernel/e820.o
  CC      drivers/char/tpm/tpm-dev-common.o
  CC      net/core/fib_rules.o
  CC      drivers/char/tpm/tpm-dev.o
  CC      arch/x86/kernel/pci-dma.o
  CC [M]  net/bluetooth/mgmt_config.o
  CC      drivers/acpi/reboot.o
  CC      drivers/acpi/acpica/dswscope.o
  AR      drivers/dma/hsu/built-in.a
  AR      drivers/dma/idxd/built-in.a
  CC      drivers/tty/serial/8250/8250_port.o
  CC      drivers/tty/serial/8250/8250_dma.o
  CC      net/core/net-traces.o
  CC      net/ipv6/sysctl_net_ipv6.o
  CC [M]  net/bluetooth/hci_codec.o
  AR      drivers/tty/hvc/built-in.a
  CC [M]  crypto/ccm.o
  CC      fs/pstore/inode.o
  CC [M]  crypto/arc4.o
  CC      drivers/tty/vt/vc_screen.o
  CC [M]  crypto/ecc.o
  CC      fs/pstore/platform.o
  CC      fs/ext4/namei.o
  CC [M]  net/netfilter/nf_conntrack_proto.o
  AS [M]  arch/x86/kvm/vmx/vmenter.o
  CC      drivers/virtio/virtio_anchor.o
  CC      drivers/clk/clkdev.o
  CC      fs/ext4/page-io.o
  CC      net/sunrpc/xdr.o
  CC      net/core/selftests.o
  CC      drivers/acpi/nvs.o
  CC      drivers/acpi/acpica/dswstate.o
  AR      drivers/dma/dw/built-in.a
  LD [M]  drivers/video/fbdev/core/fb.o
  AR      drivers/dma/mediatek/built-in.a
  AR      drivers/dma/qcom/built-in.a
  AR      drivers/dma/ti/built-in.a
  AR      drivers/dma/xilinx/built-in.a
  CC      fs/btrfs/inode-item.o
  AR      drivers/video/fbdev/core/built-in.a
  AR      drivers/video/fbdev/built-in.a
  CC      drivers/char/hw_random/intel-rng.o
  CC [M]  drivers/dma/ioat/init.o
  AR      drivers/video/built-in.a
  CC [M]  drivers/dma/ioat/dma.o
  CC      fs/ext4/readpage.o
  CC      drivers/char/agp/generic.o
  CC      drivers/char/agp/isoch.o
  CC [M]  net/bridge/br_netfilter_ipv6.o
  CC      drivers/acpi/acpica/evevent.o
  CC      net/ipv4/tcp_ulp.o
  CC      drivers/char/tpm/tpm-interface.o
  CC      kernel/umh.o
  CC      net/sunrpc/sunrpc_syms.o
  CC      net/core/ptp_classifier.o
  CC [M]  net/bluetooth/eir.o
  CC [M]  drivers/dma/ioat/prep.o
  AR      drivers/iommu/amd/built-in.a
  CC      drivers/virtio/virtio_pci_modern_dev.o
  CC      drivers/iommu/intel/dmar.o
  CC      drivers/virtio/virtio_pci_legacy_dev.o
  AR      drivers/gpu/host1x/built-in.a
  CC      drivers/clk/clk.o
  CC      drivers/tty/serial/8250/8250_dwlib.o
  AR      drivers/gpu/drm/tests/built-in.a
  CC [M]  drivers/gpu/drm/tests/drm_kunit_helpers.o
  LD [M]  arch/x86/kvm/kvm-intel.o
  CC      fs/pstore/pmsg.o
  CC [M]  drivers/gpu/drm/tests/drm_buddy_test.o
  CC      fs/btrfs/disk-io.o
  CC      arch/x86/kernel/quirks.o
  AR      lib/zstd/built-in.a
  CC      lib/decompress_unxz.o
  CC      drivers/tty/vt/selection.o
  CC      drivers/acpi/acpica/evgpe.o
  CC      drivers/tty/vt/keyboard.o
  CC      drivers/char/agp/intel-agp.o
  CC      net/core/netprio_cgroup.o
  CC      drivers/char/tpm/tpm1-cmd.o
  AR      drivers/iommu/arm/arm-smmu/built-in.a
  AR      drivers/iommu/arm/arm-smmu-v3/built-in.a
  AR      drivers/iommu/arm/built-in.a
  AR      drivers/char/hw_random/built-in.a
  CC      drivers/dma/dmaengine.o
  AR      drivers/iommu/iommufd/built-in.a
  AR      drivers/tty/ipwireless/built-in.a
  CC      net/sunrpc/cache.o
  CC      mm/madvise.o
  CC      net/sunrpc/rpc_pipe.o
  CC      fs/ext4/resize.o
  CC      drivers/tty/serial/earlycon.o
  CC      drivers/iommu/iommu.o
  AR      fs/pstore/built-in.a
  CC [M]  drivers/gpu/drm/tests/drm_cmdline_parser_test.o
  CC      net/core/dst_cache.o
  CC      net/ipv6/xfrm6_policy.o
  CC      drivers/acpi/wakeup.o
  CC      lib/decompress_unzstd.o
  CC      arch/x86/kernel/topology.o
  CC      drivers/acpi/sleep.o
  CC      drivers/acpi/acpica/evgpeblk.o
  CC      drivers/char/tpm/tpm2-cmd.o
  CC      fs/ext4/super.o
  CC      fs/efivarfs/inode.o
  CC      drivers/virtio/virtio_mmio.o
  CC      fs/efivarfs/file.o
  CC [M]  net/netfilter/nf_conntrack_proto_generic.o
  CC      drivers/virtio/virtio_pci_modern.o
  CC [M]  net/bluetooth/hci_sync.o
  CC [M]  net/bluetooth/coredump.o
  CC      drivers/tty/serial/8250/8250_pcilib.o
  CC [M]  net/bluetooth/sco.o
  CC      net/ipv4/tcp_offload.o
  CC [M]  drivers/dma/ioat/dca.o
  CC      drivers/virtio/virtio_pci_common.o
  AR      net/bridge/built-in.a
  LD [M]  net/bridge/br_netfilter.o
  CC      drivers/char/mem.o
  CC      drivers/tty/tty_io.o
  CC      drivers/acpi/device_sysfs.o
  CC      drivers/char/agp/intel-gtt.o
  CC      net/ipv4/tcp_plb.o
  AR      drivers/gpu/vga/built-in.a
  CC      net/ipv4/datagram.o
  CC      drivers/char/random.o
  CC      kernel/workqueue.o
  CC [M]  crypto/essiv.o
  CC      arch/x86/kernel/kdebugfs.o
  CC      kernel/trace/trace_export.o
  CC      lib/dump_stack.o
  CC      mm/page_io.o
  CC      kernel/pid.o
  CC      drivers/virtio/virtio_pci_legacy.o
  CC      net/core/gro_cells.o
  CC      drivers/acpi/acpica/evgpeinit.o
  CC      fs/efivarfs/super.o
  CC      kernel/trace/trace_event_perf.o
  CC      drivers/tty/serial/8250/8250_pci.o
  CC [M]  drivers/dma/ioat/sysfs.o
  CC [M]  drivers/virtio/virtio_mem.o
  CC      net/core/failover.o
  CC      drivers/clk/clk-divider.o
  CC [M]  net/bluetooth/iso.o
  CC      arch/x86/kernel/alternative.o
  CC      drivers/acpi/acpica/evgpeutil.o
  CC      drivers/char/tpm/tpmrm-dev.o
  CC      drivers/iommu/intel/iommu.o
  CC      drivers/tty/vt/consolemap.o
  CC      drivers/char/tpm/tpm2-space.o
  CC      lib/earlycpio.o
  CC      drivers/char/tpm/tpm-sysfs.o
  CC      arch/x86/kernel/i8253.o
  CC [M]  net/netfilter/nf_conntrack_proto_tcp.o
  CC      net/ipv6/xfrm6_state.o
  CC      drivers/char/misc.o
  CC      arch/x86/kernel/hw_breakpoint.o
  CC      lib/extable.o
  CC      drivers/acpi/device_pm.o
  CC      drivers/char/tpm/eventlog/common.o
  CC      drivers/char/virtio_console.o
  CC [M]  crypto/ecdh.o
  CC      kernel/task_work.o
  AR      drivers/char/agp/built-in.a
  CC      drivers/char/hpet.o
  CC      lib/flex_proportions.o
  CC      fs/efivarfs/vars.o
  CC      lib/idr.o
  CC      drivers/iommu/iommu-traces.o
  CC      drivers/acpi/acpica/evglock.o
  CC      net/ipv6/xfrm6_input.o
  LD [M]  drivers/dma/ioat/ioatdma.o
  HOSTCC  drivers/tty/vt/conmakehash
  CC      net/ipv4/raw.o
  CC      drivers/dma/virt-dma.o
  CC [M]  drivers/gpu/drm/tests/drm_connector_test.o
  CC      mm/swap_state.o
  CC      kernel/trace/trace_events_filter.o
  CC      mm/swapfile.o
  CC      drivers/tty/serial/serial_mctrl_gpio.o
  CC      drivers/clk/clk-fixed-factor.o
  CC      drivers/acpi/proc.o
  CC      drivers/connector/cn_queue.o
  CC      drivers/char/nvram.o
  CC      drivers/acpi/bus.o
  CC      drivers/acpi/glue.o
  CC      drivers/iommu/iommu-sysfs.o
  CC      mm/swap_slots.o
  AR      drivers/virtio/built-in.a
  CC      drivers/dma/acpi-dma.o
  CC [M]  crypto/ecdh_helper.o
  CC      lib/irq_regs.o
  CC      net/sunrpc/sysfs.o
  CC      arch/x86/kernel/tsc.o
  CC      mm/dmapool.o
  CC      drivers/char/tpm/eventlog/tpm1.o
  CC      mm/hugetlb.o
  CC      drivers/acpi/acpica/evhandler.o
  CC      drivers/tty/vt/vt.o
  CC      drivers/clk/clk-fixed-rate.o
  CC      lib/is_single_threaded.o
  CC [M]  fs/netfs/buffered_read.o
  CC [M]  fs/fscache/cache.o
  CC      net/ipv6/xfrm6_output.o
  CC      net/ipv6/xfrm6_protocol.o
  CC      drivers/tty/serial/8250/8250_exar.o
  AR      fs/efivarfs/built-in.a
  CC [M]  fs/netfs/io.o
  CC      arch/x86/kernel/tsc_msr.o
  CC [M]  drivers/gpu/drm/tests/drm_damage_helper_test.o
  LD [M]  crypto/ecdh_generic.o
  AR      crypto/built-in.a
  CC      net/sunrpc/svc_xprt.o
  CC      lib/klist.o
  CC      drivers/iommu/dma-iommu.o
  CC      drivers/acpi/scan.o
  CC      kernel/extable.o
  CC      kernel/params.o
  CC      drivers/acpi/acpica/evmisc.o
  CC      drivers/iommu/iova.o
  CC [M]  net/netfilter/nf_conntrack_proto_udp.o
  CC      arch/x86/kernel/io_delay.o
  CC [M]  drivers/gpu/drm/tests/drm_dp_mst_helper_test.o
  CC      drivers/acpi/acpica/evregion.o
  CC      drivers/acpi/acpica/evrgnini.o
  CC      drivers/connector/connector.o
  AR      drivers/gpu/drm/arm/built-in.a
  CC      kernel/kthread.o
  CC [M]  drivers/gpu/drm/tests/drm_format_helper_test.o
  CC      drivers/iommu/irq_remapping.o
  AR      drivers/dma/built-in.a
  CC      drivers/base/power/sysfs.o
  CC      drivers/clk/clk-gate.o
  CC      drivers/base/power/generic_ops.o
  CC      drivers/base/firmware_loader/builtin/main.o
  CC      drivers/char/tpm/eventlog/tpm2.o
  CC      lib/kobject.o
  CC      kernel/sys_ni.o
  CC [M]  net/bluetooth/a2mp.o
  CC [M]  drivers/gpu/drm/tests/drm_format_test.o
  AR      net/core/built-in.a
  CC      mm/hugetlb_vmemmap.o
  CC      drivers/base/firmware_loader/main.o
  CC      drivers/connector/cn_proc.o
  CC      drivers/tty/serial/8250/8250_early.o
  COPY    drivers/tty/vt/defkeymap.c
  CC      fs/btrfs/transaction.o
  CC      arch/x86/kernel/rtc.o
  CC [M]  fs/netfs/iterator.o
  CC [M]  fs/fscache/cookie.o
  CC      drivers/acpi/acpica/evsci.o
  CC      drivers/tty/n_tty.o
  CC      arch/x86/kernel/resource.o
  AR      drivers/base/firmware_loader/builtin/built-in.a
  AS      arch/x86/kernel/irqflags.o
  CC      drivers/char/tpm/tpm_ppi.o
  CC      drivers/acpi/resource.o
  CC [M]  fs/netfs/main.o
  CC      kernel/trace/trace_events_trigger.o
  CC      kernel/trace/trace_eprobe.o
  CC [M]  drivers/gpu/drm/tests/drm_framebuffer_test.o
  CC      drivers/clk/clk-multiplier.o
  CC      kernel/nsproxy.o
  CC      drivers/base/power/common.o
  CC      net/ipv4/udp.o
  CC      kernel/notifier.o
  CC      drivers/char/tpm/eventlog/acpi.o
  CC [M]  drivers/gpu/drm/tests/drm_managed_test.o
  CC      drivers/char/tpm/eventlog/efi.o
  CC      drivers/acpi/acpica/evxface.o
  CC      drivers/char/tpm/tpm_crb.o
  CC      net/ipv6/netfilter.o
  CC [M]  fs/netfs/objects.o
  CC      net/ipv6/fib6_rules.o
  CC      kernel/ksysfs.o
  CC      net/sunrpc/xprtmultipath.o
  CC      kernel/cred.o
  CC      drivers/tty/serial/8250/8250_dw.o
  CC      lib/kobject_uevent.o
  CC      lib/logic_pio.o
  CC      kernel/trace/trace_kprobe.o
  CC      arch/x86/kernel/static_call.o
  CC      kernel/reboot.o
  CC [M]  net/netfilter/nf_conntrack_proto_icmp.o
  CC      drivers/clk/clk-mux.o
  CC      drivers/iommu/intel/pasid.o
  CC      drivers/base/power/qos.o
  CC      mm/sparse.o
  CC      drivers/acpi/acpi_processor.o
  CC      mm/sparse-vmemmap.o
  CC      fs/btrfs/inode.o
  CC      drivers/base/power/runtime.o
  CC [M]  net/netfilter/nf_conntrack_extend.o
  CC [M]  drivers/gpu/drm/tests/drm_mm_test.o
  AR      drivers/base/firmware_loader/built-in.a
  CC      drivers/base/regmap/regmap.o
  CC      drivers/acpi/processor_core.o
  CC      drivers/base/regmap/regcache.o
  CC      drivers/acpi/acpica/evxfevnt.o
  CC [M]  net/bluetooth/amp.o
  CC [M]  net/bluetooth/hci_debugfs.o
  AR      drivers/connector/built-in.a
  CC      kernel/async.o
  CC      drivers/clk/clk-composite.o
  CC      arch/x86/kernel/process.o
  CC      drivers/acpi/processor_pdc.o
  CC [M]  drivers/gpu/drm/tests/drm_modes_test.o
  CC [M]  drivers/gpu/drm/tests/drm_plane_helper_test.o
  LD [M]  fs/netfs/netfs.o
  CC [M]  net/netfilter/nf_conntrack_acct.o
  CC      net/ipv6/proc.o
  AR      drivers/char/tpm/built-in.a
  AR      drivers/char/built-in.a
  CC [M]  fs/smb/common/cifs_arc4.o
  CC      mm/mmu_notifier.o
  CC      kernel/range.o
  CC      lib/maple_tree.o
  CC      net/sunrpc/stats.o
  CC      net/ipv6/syncookies.o
  CC      kernel/smpboot.o
  CC      lib/memcat_p.o
  CC      drivers/acpi/acpica/evxfgpe.o
  CC [M]  fs/fscache/io.o
  CC [M]  net/netfilter/nf_conntrack_seqadj.o
  CC      drivers/tty/serial/8250/8250_lpss.o
  CC      drivers/acpi/ec.o
  CC      drivers/base/power/wakeirq.o
  CC      drivers/base/regmap/regcache-rbtree.o
  CC      drivers/clk/clk-fractional-divider.o
  CC      lib/nmi_backtrace.o
  CC      lib/plist.o
  CC      lib/radix-tree.o
  CONMK   drivers/tty/vt/consolemap_deftbl.c
  CC      drivers/tty/vt/defkeymap.o
  CC      lib/ratelimit.o
  CC [M]  fs/smb/common/cifs_md4.o
  CC      drivers/acpi/acpica/evxfregn.o
  CC      drivers/tty/tty_ioctl.o
  CC      fs/ext4/symlink.o
  CC      drivers/acpi/acpica/exconcat.o
  CC      net/ipv6/mip6.o
  CC      drivers/tty/vt/consolemap_deftbl.o
  CC      drivers/iommu/intel/trace.o
  CC      net/ipv4/udplite.o
  CC      net/sunrpc/sysctl.o
  CC      drivers/iommu/intel/cap_audit.o
  CC      arch/x86/kernel/ptrace.o
  CC      arch/x86/kernel/tls.o
  CC      arch/x86/kernel/step.o
  CC      drivers/iommu/intel/irq_remapping.o
  AR      drivers/tty/vt/built-in.a
  CC      net/ipv4/udp_offload.o
  CC      drivers/block/loop.o
  CC      drivers/acpi/dock.o
  CC      drivers/acpi/pci_root.o
  CC      net/ipv6/addrconf_core.o
  CC      drivers/tty/tty_ldisc.o
  CC      drivers/block/virtio_blk.o
  CC      drivers/base/regmap/regcache-flat.o
  CC      drivers/acpi/acpica/exconfig.o
  CC      drivers/base/power/main.o
  CC [M]  fs/smb/client/trace.o
  CC      drivers/base/regmap/regcache-maple.o
  CC      drivers/base/power/wakeup.o
  CC      kernel/ucount.o
  CC      drivers/tty/tty_buffer.o
  CC      drivers/tty/serial/8250/8250_mid.o
  CC      drivers/tty/tty_port.o
  CC      drivers/clk/clk-gpio.o
  CC      drivers/tty/tty_mutex.o
  CC [M]  fs/fscache/main.o
  AR      drivers/misc/eeprom/built-in.a
  AR      drivers/misc/cb710/built-in.a
  AR      drivers/misc/ti-st/built-in.a
  CC      drivers/mfd/mfd-core.o
  AR      drivers/misc/lis3lv02d/built-in.a
  CC [M]  net/netfilter/nf_conntrack_proto_icmpv6.o
  AR      drivers/misc/cardreader/built-in.a
  CC [M]  fs/fscache/volume.o
  CC [M]  drivers/misc/mei/hdcp/mei_hdcp.o
  CC [M]  drivers/misc/mei/pxp/mei_pxp.o
  CC      arch/x86/kernel/i8237.o
  CC      drivers/tty/tty_ldsem.o
  AR      drivers/misc/built-in.a
  CC      kernel/trace/error_report-traces.o
  CC      fs/btrfs/file.o
  CC      kernel/trace/power-traces.o
  CC      drivers/acpi/acpica/exconvrt.o
  CC      drivers/acpi/pci_link.o
  CC      drivers/iommu/intel/perfmon.o
  CC      drivers/acpi/acpica/excreate.o
  LD [M]  net/bluetooth/bluetooth.o
  CC [M]  net/netfilter/nf_conntrack_proto_dccp.o
  CC [M]  net/netfilter/nf_conntrack_proto_sctp.o
  AR      drivers/nfc/built-in.a
  AR      drivers/dax/hmem/built-in.a
  CC      drivers/dax/super.o
  CC [M]  net/netfilter/nf_conntrack_netlink.o
  CC [M]  drivers/gpu/drm/tests/drm_probe_helper_test.o
  CC      kernel/trace/rpm-traces.o
  CC      drivers/base/regmap/regmap-debugfs.o
  CC      net/ipv6/exthdrs_core.o
  AR      drivers/clk/built-in.a
  CC [M]  net/netfilter/nf_nat_core.o
  CC      drivers/base/power/wakeup_stats.o
  CC      net/ipv6/ip6_checksum.o
  AR      net/sunrpc/built-in.a
  CC      kernel/trace/trace_dynevent.o
  CC      arch/x86/kernel/stacktrace.o
  CC      drivers/dma-buf/dma-buf.o
  CC      drivers/tty/tty_baudrate.o
  AR      drivers/cxl/core/built-in.a
  AR      drivers/cxl/built-in.a
  CC      drivers/dma-buf/dma-fence.o
  CC      drivers/base/power/domain.o
  CC      drivers/tty/serial/8250/8250_pericom.o
  CC [M]  drivers/gpu/drm/tests/drm_rect_test.o
  CC      net/ipv6/ip6_icmp.o
  CC      arch/x86/kernel/reboot.o
  CC      drivers/acpi/acpica/exdebug.o
  CC      fs/btrfs/defrag.o
  CC [M]  drivers/misc/mei/init.o
  CC      drivers/mfd/intel-lpss.o
  CC      drivers/mfd/intel-lpss-pci.o
  CC      net/ipv6/output_core.o
  CC [M]  drivers/block/nbd.o
  CC      net/ipv4/arp.o
  CC [M]  drivers/misc/mei/hbm.o
  AR      drivers/macintosh/built-in.a
  CC      drivers/scsi/scsi.o
  CC      net/ipv4/icmp.o
  CC      drivers/scsi/hosts.o
  CC      drivers/base/power/domain_governor.o
  CC      drivers/dax/bus.o
  CC      lib/rbtree.o
  CC      lib/seq_buf.o
  CC [M]  fs/fscache/proc.o
  CC      net/ipv6/protocol.o
  CC [M]  drivers/misc/mei/interrupt.o
  CC      drivers/acpi/acpica/exdump.o
  CC      drivers/mfd/intel-lpss-acpi.o
  CC      mm/ksm.o
  CC      fs/btrfs/extent_map.o
  CC      arch/x86/kernel/msr.o
  CC      fs/ext4/sysfs.o
  CC      drivers/nvme/host/core.o
  AR      drivers/tty/serial/8250/built-in.a
  AR      drivers/tty/serial/built-in.a
  CC      drivers/tty/tty_jobctrl.o
  AR      drivers/nvme/target/built-in.a
  CC      kernel/trace/trace_probe.o
  AR      drivers/gpu/drm/display/built-in.a
  CC [M]  drivers/gpu/drm/display/drm_display_helper_mod.o
  CC [M]  drivers/gpu/drm/display/drm_dp_dual_mode_helper.o
  CC      drivers/base/regmap/regmap-i2c.o
  CC      net/ipv6/ip6_offload.o
  CC      drivers/mfd/intel_soc_pmic_crc.o
  CC [M]  drivers/gpu/drm/display/drm_dp_helper.o
  CC [M]  drivers/gpu/drm/display/drm_dp_mst_topology.o
  AR      drivers/iommu/intel/built-in.a
  AR      drivers/iommu/built-in.a
  CC [M]  drivers/mfd/lpc_sch.o
  CC      drivers/base/regmap/regmap-irq.o
  AR      drivers/gpu/drm/renesas/rcar-du/built-in.a
  AR      drivers/gpu/drm/renesas/built-in.a
  CC      drivers/acpi/acpica/exfield.o
  AR      drivers/gpu/drm/omapdrm/built-in.a
  AR      drivers/gpu/drm/tilcdc/built-in.a
  CC      drivers/base/power/clock_ops.o
  CC      drivers/acpi/pci_irq.o
  AR      drivers/gpu/drm/imx/built-in.a
  CC      lib/show_mem.o
  CC [M]  drivers/misc/mei/client.o
  CC      kernel/trace/trace_uprobe.o
  CC      drivers/dma-buf/dma-fence-array.o
  AR      drivers/gpu/drm/i2c/built-in.a
  AR      drivers/gpu/drm/panel/built-in.a
  AR      drivers/gpu/drm/bridge/analogix/built-in.a
  AR      drivers/gpu/drm/bridge/cadence/built-in.a
  AR      drivers/gpu/drm/bridge/imx/built-in.a
  CC [M]  drivers/mfd/lpc_ich.o
  AR      drivers/gpu/drm/bridge/synopsys/built-in.a
  CC      drivers/dma-buf/dma-fence-chain.o
  AR      drivers/gpu/drm/bridge/built-in.a
  CC      drivers/acpi/acpica/exfldio.o
  CC      drivers/dma-buf/dma-fence-unwrap.o
  LD [M]  fs/fscache/fscache.o
  CC      drivers/dma-buf/dma-resv.o
  AR      drivers/gpu/drm/hisilicon/built-in.a
  CC [M]  drivers/gpu/drm/display/drm_dsc_helper.o
  CC [M]  fs/fuse/dev.o
  AR      drivers/gpu/drm/mxsfb/built-in.a
  CC      drivers/scsi/scsi_ioctl.o
  CC      lib/siphash.o
  CC      arch/x86/kernel/cpuid.o
  CC [M]  drivers/misc/mei/main.o
  CC      drivers/dma-buf/sync_file.o
  CC [M]  fs/fuse/dir.o
  CC      lib/string.o
  CC [M]  drivers/gpu/drm/display/drm_hdcp_helper.o
  CC      fs/ext4/xattr.o
  CC [M]  fs/overlayfs/super.o
  CC      drivers/tty/n_null.o
  CC [M]  fs/overlayfs/namei.o
  CC [M]  drivers/gpu/drm/display/drm_hdmi_helper.o
  CC      drivers/tty/pty.o
  AR      drivers/mfd/built-in.a
  CC      drivers/acpi/acpi_lpss.o
  AR      drivers/gpu/drm/tiny/built-in.a
  CC      drivers/acpi/acpi_apd.o
  AR      drivers/base/power/built-in.a
  CC      drivers/ata/libata-core.o
  AR      drivers/base/test/built-in.a
  CC      drivers/spi/spi.o
  CC      drivers/ata/libata-scsi.o
  CC      drivers/ata/libata-eh.o
  AR      drivers/dax/built-in.a
  CC      drivers/base/component.o
  CC      drivers/acpi/acpica/exmisc.o
  CC      drivers/tty/sysrq.o
  CC      drivers/dma-buf/sw_sync.o
  CC      drivers/scsi/scsicam.o
  CC [M]  fs/smb/client/cifsfs.o
  CC      arch/x86/kernel/early-quirks.o
  CC      fs/btrfs/sysfs.o
  CC      drivers/net/phy/mdio-boardinfo.o
  AR      drivers/net/pse-pd/built-in.a
  CC      drivers/net/phy/mdio_devres.o
  CC      drivers/net/mdio/acpi_mdio.o
  AR      drivers/net/pcs/built-in.a
  CC [M]  drivers/gpu/drm/display/drm_scdc_helper.o
  CC      fs/btrfs/accessors.o
  CC      drivers/base/core.o
  CC      drivers/net/mdio/fwnode_mdio.o
  CC      fs/btrfs/xattr.o
  AR      drivers/base/regmap/built-in.a
  CC      net/ipv4/devinet.o
  CC      drivers/acpi/acpica/exmutex.o
  CC [M]  drivers/gpu/drm/display/drm_dp_aux_dev.o
  CC      kernel/trace/rethook.o
  CC      drivers/dma-buf/sync_debug.o
  CC      fs/btrfs/ordered-data.o
  CC      drivers/scsi/scsi_error.o
  CC      net/ipv6/tcpv6_offload.o
  CC [M]  net/netfilter/nf_nat_proto.o
  CC [M]  fs/overlayfs/util.o
  CC [M]  fs/overlayfs/inode.o
  CC      drivers/base/bus.o
  CC [M]  drivers/misc/mei/dma-ring.o
  CC      fs/open.o
  CC      drivers/net/phy/phy.o
  CC [M]  fs/overlayfs/file.o
  CC      drivers/acpi/acpica/exnames.o
  CC [M]  drivers/dma-buf/selftest.o
  CC      fs/btrfs/extent_io.o
  CC      drivers/net/phy/phy-c45.o
  CC [M]  fs/smb/client/cifs_debug.o
  AR      drivers/tty/built-in.a
  CC [M]  drivers/dma-buf/st-dma-fence.o
  CC      fs/ext4/xattr_hurd.o
  CC [M]  drivers/misc/mei/bus.o
  CC      fs/ext4/xattr_trusted.o
  CC      arch/x86/kernel/smp.o
  CC      fs/ext4/xattr_user.o
  AR      drivers/block/built-in.a
  CC      arch/x86/kernel/smpboot.o
  CC      drivers/ata/libata-transport.o
  AR      drivers/net/mdio/built-in.a
  CC      drivers/acpi/acpica/exoparg1.o
  CC      drivers/scsi/scsi_lib.o
  CC [M]  fs/smb/client/connect.o
  AR      kernel/trace/built-in.a
  CC      kernel/regset.o
  CC [M]  fs/smb/client/dir.o
  CC      mm/slub.o
  CC [M]  drivers/misc/mei/bus-fixup.o
  CC      mm/migrate.o
  CC [M]  fs/fuse/file.o
  AR      drivers/net/ethernet/adi/built-in.a
  CC      drivers/acpi/acpi_platform.o
  AR      drivers/net/ethernet/alacritech/built-in.a
  AR      drivers/net/ethernet/amazon/built-in.a

3,520 lines not shown · raw message

Part of this message is not shown here. View the raw message.

#27 lore raw

[Intel-xe] ✓ CI.Hooks: success for drm/xe: Add engine scheduler control interface (rev9)

In reply to Tejas Upadhyay
== Series Details ==

== Series Details ==

Series: drm/xe: Add engine scheduler control interface (rev9)
URL : https://patchwork.freedesktop.org/series/119392/
State : success

== Summary ==

run-parts: executing /workspace/ci/hooks/00-showenv /workspace
+ pwd
+ ls -la
total 528
drwxrwxr-x 10 1003 1003 4096 Jul 27 09:05 .

drwxr-xr-x  1 root root   4096 Jul 27 09:05 ..
-rw-rw-r--  1 1003 1003 389743 Jul 27 09:05 build.log
-rw-rw-r--  1 1003 1003   4928 Jul 27 09:00 checkpatch.log
drwxrwxr-x  5 1003 1003   4096 Jul 27 08:58 ci
drwxrwxr-x  9 1003 1003   4096 Jul 27 08:58 docker
drwxrwxr-x  8 1003 1003   4096 Jul 27 08:58 .git
-rw-rw-r--  1 1003 1003    542 Jul 27 08:59 git_apply.log
drwxrwxr-x  3 1003 1003   4096 Jul 27 08:58 .github
-rw-rw-r--  1 1003 1003    233 Jul 27 08:58 .groovylintrc.json
-rw-rw-r--  1 1003 1003     78 Jul 27 09:05 hooks.log
drwxrwxr-x 31 1003 1003   4096 Jul 27 09:04 kernel
-rw-rw-r--  1 1003 1003  50134 Jul 27 08:59 kernel.mbox
-rw-rw-r--  1 1003 1003  26091 Jul 27 09:01 kunit.log
drwxrwxr-x 45 1003 1003   4096 Jul 27 08:58 pipelines
-rw-rw-r--  1 1003 1003    793 Jul 27 08:58 README.adoc
drwxrwxr-x  3 1003 1003   4096 Jul 27 08:58 scripts
drwxrwxr-x  2 1003 1003   4096 Jul 27 08:58 .vscode

+ uname -a
Linux bc9e3de407a4 5.4.0-149-generic #166-Ubuntu SMP Tue Apr 18 16:51:45 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
+ export
+ grep -Ei '(^|\W)CI_'
declare -x CI_KERNEL_BUILD_DIR="/workspace/kernel/build64"
declare -x CI_KERNEL_IMAGES_DIR="/workspace/kernel/archive/boot"
declare -x CI_KERNEL_MODULES_DIR="/workspace/kernel/archive"
declare -x CI_KERNEL_SRC_DIR="/workspace/kernel"
declare -x CI_SRC_DIR="/workspace/kernel"
declare -x CI_TOOLS_SRC_DIR="/workspace/ci"
declare -x CI_WORKSPACE_DIR="/workspace"
+ '[' -n /workspace ']'
+ git_args='-C /workspace/kernel'
+ git_log_args=
+ git --no-pager -C /workspace/kernel log --format=oneline --abbrev-commit
b57496f27 drm/xe: Add min/max cap for engine scheduler properties
39b6f67a5 drm/xe: Add sysfs for preempt reset timeout
db2968de7 drm/xe: Add timeslice duration engine property to sysfs
ac638a9fe drm/xe: Add job timeout engine property to sysfs
fce2387a4 drm/xe: Add sysfs for default engine scheduler properties
3463737cf drm/xe: Add sysfs entries for engines under its GT
20a2578d3 drm/xe/engine: add missing rpm for bind engines
run-parts: executing /workspace/ci/hooks/10-build-W1
+ SRC_DIR=/workspace/kernel
+ RESTORE_DISPLAY_CONFIG=0
+ '[' -n /workspace/kernel/build64 ']'
+ BUILD_DIR=/workspace/kernel/build64
+ cd /workspace/kernel
+ grep -q -e '^CONFIG_DRM_XE_DISPLAY=[yY]' /workspace/kernel/build64/.config
+ RESTORE_DISPLAY_CONFIG=1
+ trap cleanup EXIT
+ ./scripts/config --file /workspace/kernel/build64/.config --disable CONFIG_DRM_XE_DISPLAY
++ nproc
+ make -j48 O=/workspace/kernel/build64 modules_prepare
make[1]: Entering directory '/workspace/kernel/build64'

  SYNC    include/config/auto.conf.cmd
  GEN     Makefile
  GEN     Makefile
  UPD     include/generated/compile.h
  UPD     include/config/kernel.release
  UPD     include/generated/utsrelease.h
  DESCEND objtool
  CALL    ../scripts/checksyscalls.sh
  HOSTCC  /workspace/kernel/build64/tools/objtool/fixdep.o
  HOSTLD  /workspace/kernel/build64/tools/objtool/fixdep-in.o
  LINK    /workspace/kernel/build64/tools/objtool/fixdep
  INSTALL libsubcmd_headers
  CC      /workspace/kernel/build64/tools/objtool/libsubcmd/exec-cmd.o
  CC      /workspace/kernel/build64/tools/objtool/libsubcmd/help.o
  CC      /workspace/kernel/build64/tools/objtool/libsubcmd/pager.o
  CC      /workspace/kernel/build64/tools/objtool/libsubcmd/parse-options.o
  CC      /workspace/kernel/build64/tools/objtool/libsubcmd/run-command.o
  CC      /workspace/kernel/build64/tools/objtool/libsubcmd/subcmd-config.o
  CC      /workspace/kernel/build64/tools/objtool/libsubcmd/sigchain.o
  LD      /workspace/kernel/build64/tools/objtool/libsubcmd/libsubcmd-in.o
  AR      /workspace/kernel/build64/tools/objtool/libsubcmd/libsubcmd.a
  CC      /workspace/kernel/build64/tools/objtool/weak.o
  CC      /workspace/kernel/build64/tools/objtool/check.o
  CC      /workspace/kernel/build64/tools/objtool/special.o
  CC      /workspace/kernel/build64/tools/objtool/builtin-check.o
  CC      /workspace/kernel/build64/tools/objtool/elf.o
  CC      /workspace/kernel/build64/tools/objtool/objtool.o
  CC      /workspace/kernel/build64/tools/objtool/orc_gen.o
  CC      /workspace/kernel/build64/tools/objtool/orc_dump.o
  CC      /workspace/kernel/build64/tools/objtool/libstring.o
  CC      /workspace/kernel/build64/tools/objtool/libctype.o
  CC      /workspace/kernel/build64/tools/objtool/str_error_r.o
  CC      /workspace/kernel/build64/tools/objtool/librbtree.o
  CC      /workspace/kernel/build64/tools/objtool/arch/x86/special.o
  CC      /workspace/kernel/build64/tools/objtool/arch/x86/decode.o
  LD      /workspace/kernel/build64/tools/objtool/arch/x86/objtool-in.o
  LD      /workspace/kernel/build64/tools/objtool/objtool-in.o
  LINK    /workspace/kernel/build64/tools/objtool/objtool

make[1]: Leaving directory '/workspace/kernel/build64' ++ nproc
+ make -j48 O=/workspace/kernel/build64 M=drivers/gpu/drm/xe W=1 make[1]: Entering directory '/workspace/kernel/build64'

  CC [M]  drivers/gpu/drm/xe/xe_bb.o
  CC [M]  drivers/gpu/drm/xe/xe_bo.o
  CC [M]  drivers/gpu/drm/xe/xe_bo_evict.o
  CC [M]  drivers/gpu/drm/xe/xe_debugfs.o
  CC [M]  drivers/gpu/drm/xe/xe_devcoredump.o
  CC [M]  drivers/gpu/drm/xe/xe_device.o
  CC [M]  drivers/gpu/drm/xe/xe_device_sysfs.o
  CC [M]  drivers/gpu/drm/xe/xe_dma_buf.o
  CC [M]  drivers/gpu/drm/xe/xe_engine.o
  CC [M]  drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.o
  CC [M]  drivers/gpu/drm/xe/xe_exec.o
  CC [M]  drivers/gpu/drm/xe/xe_execlist.o
  CC [M]  drivers/gpu/drm/xe/xe_force_wake.o
  CC [M]  drivers/gpu/drm/xe/xe_ggtt.o
  CC [M]  drivers/gpu/drm/xe/xe_gt.o
  CC [M]  drivers/gpu/drm/xe/xe_gt_clock.o
  CC [M]  drivers/gpu/drm/xe/xe_gt_debugfs.o
  CC [M]  drivers/gpu/drm/xe/xe_gt_idle_sysfs.o
  CC [M]  drivers/gpu/drm/xe/xe_gt_mcr.o
  CC [M]  drivers/gpu/drm/xe/xe_gt_pagefault.o
  CC [M]  drivers/gpu/drm/xe/xe_gt_sysfs.o
  CC [M]  drivers/gpu/drm/xe/xe_gt_tlb_invalidation.o
  CC [M]  drivers/gpu/drm/xe/xe_gt_topology.o
  HOSTCC  drivers/gpu/drm/xe/xe_gen_wa_oob
  CC [M]  drivers/gpu/drm/xe/xe_guc_ads.o
  CC [M]  drivers/gpu/drm/xe/xe_guc_ct.o
  CC [M]  drivers/gpu/drm/xe/xe_guc_debugfs.o
  CC [M]  drivers/gpu/drm/xe/xe_guc_hwconfig.o
  CC [M]  drivers/gpu/drm/xe/xe_guc_log.o
  CC [M]  drivers/gpu/drm/xe/xe_guc_pc.o
  CC [M]  drivers/gpu/drm/xe/xe_guc_submit.o
  CC [M]  drivers/gpu/drm/xe/xe_hw_engine.o
  CC [M]  drivers/gpu/drm/xe/xe_hw_fence.o
  CC [M]  drivers/gpu/drm/xe/xe_huc.o
  CC [M]  drivers/gpu/drm/xe/xe_huc_debugfs.o
  CC [M]  drivers/gpu/drm/xe/xe_irq.o
  CC [M]  drivers/gpu/drm/xe/xe_lrc.o
  CC [M]  drivers/gpu/drm/xe/xe_migrate.o
  CC [M]  drivers/gpu/drm/xe/xe_mmio.o
  CC [M]  drivers/gpu/drm/xe/xe_mocs.o
  CC [M]  drivers/gpu/drm/xe/xe_module.o
  CC [M]  drivers/gpu/drm/xe/xe_pat.o
  CC [M]  drivers/gpu/drm/xe/xe_pci.o
  CC [M]  drivers/gpu/drm/xe/xe_pcode.o
  CC [M]  drivers/gpu/drm/xe/xe_pm.o
  CC [M]  drivers/gpu/drm/xe/xe_preempt_fence.o
  CC [M]  drivers/gpu/drm/xe/xe_pt.o
  CC [M]  drivers/gpu/drm/xe/xe_pt_walk.o
  CC [M]  drivers/gpu/drm/xe/xe_query.o
  CC [M]  drivers/gpu/drm/xe/xe_range_fence.o
  CC [M]  drivers/gpu/drm/xe/xe_reg_sr.o
  CC [M]  drivers/gpu/drm/xe/xe_reg_whitelist.o
  CC [M]  drivers/gpu/drm/xe/xe_rtp.o
  CC [M]  drivers/gpu/drm/xe/xe_sa.o
  CC [M]  drivers/gpu/drm/xe/xe_sched_job.o
  CC [M]  drivers/gpu/drm/xe/xe_step.o
  CC [M]  drivers/gpu/drm/xe/xe_sync.o
  CC [M]  drivers/gpu/drm/xe/xe_tile.o
  CC [M]  drivers/gpu/drm/xe/xe_tile_sysfs.o
  CC [M]  drivers/gpu/drm/xe/xe_trace.o
  CC [M]  drivers/gpu/drm/xe/xe_ttm_sys_mgr.o
  CC [M]  drivers/gpu/drm/xe/xe_ttm_stolen_mgr.o
  CC [M]  drivers/gpu/drm/xe/xe_ttm_vram_mgr.o
  CC [M]  drivers/gpu/drm/xe/xe_tuning.o
  CC [M]  drivers/gpu/drm/xe/xe_uc.o
  CC [M]  drivers/gpu/drm/xe/xe_uc_debugfs.o
  CC [M]  drivers/gpu/drm/xe/xe_uc_fw.o
  CC [M]  drivers/gpu/drm/xe/xe_vm.o
  CC [M]  drivers/gpu/drm/xe/xe_vm_madvise.o
  CC [M]  drivers/gpu/drm/xe/xe_wait_user_fence.o
  CC [M]  drivers/gpu/drm/xe/xe_wopcm.o
  HDRTEST drivers/gpu/drm/xe/abi/guc_klvs_abi.h
  HDRTEST drivers/gpu/drm/xe/abi/guc_actions_slpc_abi.h
  HDRTEST drivers/gpu/drm/xe/abi/guc_errors_abi.h
  CC [M]  drivers/gpu/drm/xe/tests/xe_bo_test.o
  CC [M]  drivers/gpu/drm/xe/tests/xe_dma_buf_test.o
  CC [M]  drivers/gpu/drm/xe/tests/xe_migrate_test.o
  HDRTEST drivers/gpu/drm/xe/abi/guc_communication_mmio_abi.h
  HDRTEST drivers/gpu/drm/xe/abi/guc_actions_abi.h
  CC [M]  drivers/gpu/drm/xe/tests/xe_pci_test.o
  HDRTEST drivers/gpu/drm/xe/abi/guc_communication_ctb_abi.h
  HDRTEST drivers/gpu/drm/xe/abi/guc_messages_abi.h
  HDRTEST drivers/gpu/drm/xe/regs/xe_reg_defs.h
  CC [M]  drivers/gpu/drm/xe/tests/xe_rtp_test.o
  HDRTEST drivers/gpu/drm/xe/regs/xe_guc_regs.h
  HDRTEST drivers/gpu/drm/xe/regs/xe_gt_regs.h
  HDRTEST drivers/gpu/drm/xe/regs/xe_regs.h
  HDRTEST drivers/gpu/drm/xe/regs/xe_gpu_commands.h
  HDRTEST drivers/gpu/drm/xe/regs/xe_lrc_layout.h
  HDRTEST drivers/gpu/drm/xe/regs/xe_engine_regs.h
  CC [M]  drivers/gpu/drm/xe/tests/xe_wa_test.o
  HDRTEST drivers/gpu/drm/xe/tests/xe_test.h
  HDRTEST drivers/gpu/drm/xe/tests/xe_pci_test.h
  HDRTEST drivers/gpu/drm/xe/tests/xe_migrate_test.h
  HDRTEST drivers/gpu/drm/xe/tests/xe_dma_buf_test.h
  HDRTEST drivers/gpu/drm/xe/tests/xe_bo_test.h
  HDRTEST drivers/gpu/drm/xe/xe_bb.h
  HDRTEST drivers/gpu/drm/xe/xe_bb_types.h
  HDRTEST drivers/gpu/drm/xe/xe_bo.h
  HDRTEST drivers/gpu/drm/xe/xe_bo_doc.h
  HDRTEST drivers/gpu/drm/xe/xe_bo_evict.h
  HDRTEST drivers/gpu/drm/xe/xe_bo_types.h
  HDRTEST drivers/gpu/drm/xe/xe_debugfs.h
  HDRTEST drivers/gpu/drm/xe/xe_devcoredump.h
  HDRTEST drivers/gpu/drm/xe/xe_devcoredump_types.h
  HDRTEST drivers/gpu/drm/xe/xe_device_sysfs.h
  HDRTEST drivers/gpu/drm/xe/xe_device.h
  HDRTEST drivers/gpu/drm/xe/xe_device_types.h
  HDRTEST drivers/gpu/drm/xe/xe_dma_buf.h
  HDRTEST drivers/gpu/drm/xe/xe_drv.h
  HDRTEST drivers/gpu/drm/xe/xe_engine.h
  HDRTEST drivers/gpu/drm/xe/xe_engine_types.h
  HDRTEST drivers/gpu/drm/xe/xe_exec.h
  HDRTEST drivers/gpu/drm/xe/xe_execlist.h
  HDRTEST drivers/gpu/drm/xe/xe_execlist_types.h
  HDRTEST drivers/gpu/drm/xe/xe_force_wake.h
  HDRTEST drivers/gpu/drm/xe/xe_force_wake_types.h
  HDRTEST drivers/gpu/drm/xe/xe_ggtt.h
  HDRTEST drivers/gpu/drm/xe/xe_ggtt_types.h
  HDRTEST drivers/gpu/drm/xe/xe_gt.h
  HDRTEST drivers/gpu/drm/xe/xe_gt_clock.h
  HDRTEST drivers/gpu/drm/xe/xe_gt_debugfs.h
  HDRTEST drivers/gpu/drm/xe/xe_gt_idle_sysfs.h
  HDRTEST drivers/gpu/drm/xe/xe_gt_idle_sysfs_types.h
  HDRTEST drivers/gpu/drm/xe/xe_gt_mcr.h
  HDRTEST drivers/gpu/drm/xe/xe_gt_pagefault.h
  HDRTEST drivers/gpu/drm/xe/xe_gt_printk.h
  HDRTEST drivers/gpu/drm/xe/xe_gt_sysfs.h
  HDRTEST drivers/gpu/drm/xe/xe_gt_sysfs_types.h
  HDRTEST drivers/gpu/drm/xe/xe_gt_tlb_invalidation.h
  HDRTEST drivers/gpu/drm/xe/xe_gt_tlb_invalidation_types.h
  HDRTEST drivers/gpu/drm/xe/xe_gt_topology.h
  HDRTEST drivers/gpu/drm/xe/xe_gt_types.h
  HDRTEST drivers/gpu/drm/xe/xe_guc.h
  HDRTEST drivers/gpu/drm/xe/xe_guc_ads.h
  HDRTEST drivers/gpu/drm/xe/xe_guc_ads_types.h
  HDRTEST drivers/gpu/drm/xe/xe_guc_ct.h
  HDRTEST drivers/gpu/drm/xe/xe_guc_ct_types.h
  HDRTEST drivers/gpu/drm/xe/xe_guc_debugfs.h
  HDRTEST drivers/gpu/drm/xe/xe_guc_engine_types.h
  HDRTEST drivers/gpu/drm/xe/xe_guc_fwif.h
  HDRTEST drivers/gpu/drm/xe/xe_guc_hwconfig.h
  HDRTEST drivers/gpu/drm/xe/xe_guc_log.h
  HDRTEST drivers/gpu/drm/xe/xe_guc_log_types.h
  HDRTEST drivers/gpu/drm/xe/xe_guc_pc_types.h
  HDRTEST drivers/gpu/drm/xe/xe_guc_pc.h
  HDRTEST drivers/gpu/drm/xe/xe_guc_submit.h
  HDRTEST drivers/gpu/drm/xe/xe_guc_submit_types.h
  HDRTEST drivers/gpu/drm/xe/xe_guc_types.h
  HDRTEST drivers/gpu/drm/xe/xe_huc.h
  HDRTEST drivers/gpu/drm/xe/xe_huc_debugfs.h
  HDRTEST drivers/gpu/drm/xe/xe_huc_types.h
  HDRTEST drivers/gpu/drm/xe/xe_hw_engine.h
  HDRTEST drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h
  HDRTEST drivers/gpu/drm/xe/xe_hw_engine_types.h
  HDRTEST drivers/gpu/drm/xe/xe_hw_fence.h
  HDRTEST drivers/gpu/drm/xe/xe_hw_fence_types.h
  HDRTEST drivers/gpu/drm/xe/xe_irq.h
  HDRTEST drivers/gpu/drm/xe/xe_lrc.h
  HDRTEST drivers/gpu/drm/xe/xe_macros.h
  HDRTEST drivers/gpu/drm/xe/xe_lrc_types.h
  HDRTEST drivers/gpu/drm/xe/xe_map.h
  HDRTEST drivers/gpu/drm/xe/xe_migrate.h
  HDRTEST drivers/gpu/drm/xe/xe_migrate_doc.h
  HDRTEST drivers/gpu/drm/xe/xe_mmio.h
  HDRTEST drivers/gpu/drm/xe/xe_mocs.h
  HDRTEST drivers/gpu/drm/xe/xe_module.h
  HDRTEST drivers/gpu/drm/xe/xe_pat.h
  HDRTEST drivers/gpu/drm/xe/xe_pci.h
  HDRTEST drivers/gpu/drm/xe/xe_pci_types.h
  HDRTEST drivers/gpu/drm/xe/xe_pcode.h
  HDRTEST drivers/gpu/drm/xe/xe_pcode_api.h
  HDRTEST drivers/gpu/drm/xe/xe_platform_types.h
  HDRTEST drivers/gpu/drm/xe/xe_pm.h
  HDRTEST drivers/gpu/drm/xe/xe_preempt_fence.h
  HDRTEST drivers/gpu/drm/xe/xe_preempt_fence_types.h
  HDRTEST drivers/gpu/drm/xe/xe_pt.h
  HDRTEST drivers/gpu/drm/xe/xe_pt_types.h
  HDRTEST drivers/gpu/drm/xe/xe_pt_walk.h
  HDRTEST drivers/gpu/drm/xe/xe_query.h
  HDRTEST drivers/gpu/drm/xe/xe_range_fence.h
  HDRTEST drivers/gpu/drm/xe/xe_reg_sr.h
  HDRTEST drivers/gpu/drm/xe/xe_reg_sr_types.h
  HDRTEST drivers/gpu/drm/xe/xe_reg_whitelist.h
  HDRTEST drivers/gpu/drm/xe/xe_res_cursor.h
  HDRTEST drivers/gpu/drm/xe/xe_ring_ops.h
  HDRTEST drivers/gpu/drm/xe/xe_ring_ops_types.h
  HDRTEST drivers/gpu/drm/xe/xe_rtp.h
  HDRTEST drivers/gpu/drm/xe/xe_rtp_types.h
  HDRTEST drivers/gpu/drm/xe/xe_sa.h
  HDRTEST drivers/gpu/drm/xe/xe_sa_types.h
  HDRTEST drivers/gpu/drm/xe/xe_sched_job.h
  HDRTEST drivers/gpu/drm/xe/xe_sched_job_types.h
  HDRTEST drivers/gpu/drm/xe/xe_step.h
  HDRTEST drivers/gpu/drm/xe/xe_step_types.h
  HDRTEST drivers/gpu/drm/xe/xe_sync.h
  HDRTEST drivers/gpu/drm/xe/xe_sync_types.h
  HDRTEST drivers/gpu/drm/xe/xe_tile.h
  HDRTEST drivers/gpu/drm/xe/xe_tile_sysfs.h
  HDRTEST drivers/gpu/drm/xe/xe_tile_sysfs_types.h
  HDRTEST drivers/gpu/drm/xe/xe_trace.h
  HDRTEST drivers/gpu/drm/xe/xe_ttm_stolen_mgr.h
  HDRTEST drivers/gpu/drm/xe/xe_ttm_sys_mgr.h
  HDRTEST drivers/gpu/drm/xe/xe_ttm_vram_mgr.h
  HDRTEST drivers/gpu/drm/xe/xe_ttm_vram_mgr_types.h
  HDRTEST drivers/gpu/drm/xe/xe_tuning.h
  HDRTEST drivers/gpu/drm/xe/xe_uc.h
  HDRTEST drivers/gpu/drm/xe/xe_uc_debugfs.h
  HDRTEST drivers/gpu/drm/xe/xe_uc_fw.h
  HDRTEST drivers/gpu/drm/xe/xe_uc_fw_abi.h
  HDRTEST drivers/gpu/drm/xe/xe_uc_fw_types.h
  HDRTEST drivers/gpu/drm/xe/xe_uc_types.h
  HDRTEST drivers/gpu/drm/xe/xe_vm.h
  HDRTEST drivers/gpu/drm/xe/xe_vm_doc.h
  HDRTEST drivers/gpu/drm/xe/xe_vm_madvise.h
  HDRTEST drivers/gpu/drm/xe/xe_vm_types.h
  HDRTEST drivers/gpu/drm/xe/xe_wa.h
  HDRTEST drivers/gpu/drm/xe/xe_wait_user_fence.h
  HDRTEST drivers/gpu/drm/xe/xe_wopcm.h
  HDRTEST drivers/gpu/drm/xe/xe_wopcm_types.h
  GEN     xe_wa_oob.c xe_wa_oob.h
  GEN     xe_wa_oob.c xe_wa_oob.h
  CC [M]  drivers/gpu/drm/xe/xe_guc.o
  CC [M]  drivers/gpu/drm/xe/xe_ring_ops.o
  CC [M]  drivers/gpu/drm/xe/xe_wa.o
  LD [M]  drivers/gpu/drm/xe/xe.o
  MODPOST drivers/gpu/drm/xe/Module.symvers
  CC [M]  drivers/gpu/drm/xe/xe.mod.o
  CC [M]  drivers/gpu/drm/xe/tests/xe_bo_test.mod.o
  CC [M]  drivers/gpu/drm/xe/tests/xe_dma_buf_test.mod.o
  CC [M]  drivers/gpu/drm/xe/tests/xe_migrate_test.mod.o
  CC [M]  drivers/gpu/drm/xe/tests/xe_pci_test.mod.o
  CC [M]  drivers/gpu/drm/xe/tests/xe_rtp_test.mod.o
  CC [M]  drivers/gpu/drm/xe/tests/xe_wa_test.mod.o
  LD [M]  drivers/gpu/drm/xe/tests/xe_wa_test.ko
  LD [M]  drivers/gpu/drm/xe/tests/xe_migrate_test.ko
  LD [M]  drivers/gpu/drm/xe/xe.ko
  LD [M]  drivers/gpu/drm/xe/tests/xe_dma_buf_test.ko
  LD [M]  drivers/gpu/drm/xe/tests/xe_bo_test.ko
  LD [M]  drivers/gpu/drm/xe/tests/xe_rtp_test.ko
  LD [M]  drivers/gpu/drm/xe/tests/xe_pci_test.ko

make[1]: Leaving directory '/workspace/kernel/build64'
+ cleanup
+ '[' 1 -eq 1 ']'
+ ./scripts/config --file /workspace/kernel/build64/.config --enable CONFIG_DRM_XE_DISPLAY
run-parts: executing /workspace/ci/hooks/20-kernel-doc
+ SRC_DIR=/workspace/kernel
+ cd /workspace/kernel
+ find drivers/gpu/drm/xe/ -name '*.[ch]' -not -path 'drivers/gpu/drm/xe/display/*'
+ xargs ./scripts/kernel-doc -Werror -none include/uapi/drm/xe_drm.h
All hooks done

#28 lore raw

[Intel-xe] ✓ CI.checksparse: success for drm/xe: Add engine scheduler control interface (rev9)

In reply to Tejas Upadhyay
== Series Details ==

== Series Details ==

Series: drm/xe: Add engine scheduler control interface (rev9)
URL : https://patchwork.freedesktop.org/series/119392/
State : success

== Summary ==

+ trap cleanup EXIT
+ KERNEL=/kernel
+ MT=/root/linux/maintainer-tools
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools /root/linux/maintainer-tools Cloning into '/root/linux/maintainer-tools'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ make -C /root/linux/maintainer-tools
make: Entering directory '/root/linux/maintainer-tools'
cc -O2 -g -Wextra -o remap-log remap-log.c
make: Leaving directory '/root/linux/maintainer-tools'
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ /root/linux/maintainer-tools/dim sparse --fast 20a2578d3a889f6e1dd4a6514924661557c2f9f6 Sparse version: 0.6.1 (Ubuntu: 0.6.1-2build1)
Fast mode used, each commit won't be checked separately.
Okay!

+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel

#29 lore raw

[Intel-xe] ○ CI.BAT: info for drm/xe: Add engine scheduler control interface (rev9)

In reply to Tejas Upadhyay
== Series Details ==

== Series Details ==

Series: drm/xe: Add engine scheduler control interface (rev9)
URL : https://patchwork.freedesktop.org/series/119392/
State : info

== Summary ==

Participating hosts:
bat-pvc-2
bat-atsm-2
bat-dg2-oem2
bat-adlp-7
Missing hosts results[0]:
Results: [xe-pw-119392v9](https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-119392v9/index.html)