Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

scx: Add maintainer and maintainer url to struct_ops #227

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/linux/sched/ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

enum scx_public_consts {
SCX_OPS_NAME_LEN = 128,
SCX_MAINTAINER_LEN = 128,
SCX_MAINTAINER_URL_LEN = 128,

SCX_SLICE_DFL = 20 * 1000000, /* 20ms */
SCX_SLICE_INF = U64_MAX, /* infinite, implies nohz */
Expand Down
24 changes: 24 additions & 0 deletions kernel/sched/ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,22 @@ struct sched_ext_ops {
* BPF scheduler is enabled.
*/
char name[SCX_OPS_NAME_LEN];

/**
* maintainer - Maintainer of the BPF scheduler
*
* If the BPF scheduler encounters an error the maintainer will be
* included in the error message as the support contact.
*/
char maintainer[SCX_MAINTAINER_LEN];

/**
* maintainer_url - URL for scheduler related issues
*
* URL of the maintainer for support of the BPF scheduler. The support
* URL be included in error messages with the maintainer.
*/
char maintainer_url[SCX_MAINTAINER_URL_LEN];
};

enum scx_opi {
Expand Down Expand Up @@ -4453,6 +4469,14 @@ static void scx_ops_disable_workfn(struct kthread_work *work)
printk(KERN_ERR "sched_ext: %s\n", ei->reason);
else
printk(KERN_ERR "sched_ext: %s (%s)\n", ei->reason, ei->msg);
if (!(scx_ops.maintainer[0] == '\n'))
printk(KERN_ERR
"sched_ext: BPF scheduler maintainer: %s\n",
scx_ops.maintainer);
if (!(scx_ops.maintainer_url[0] == '\0'))
printk(KERN_ERR
"sched_ext: BPF scheduler support url: %s\n",
scx_ops.maintainer_url);

stack_trace_print(ei->bt, ei->bt_len, 2);
}
Expand Down
Loading