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

Commit

Permalink
scx: Add maintainer and maintainer url to struct_ops
Browse files Browse the repository at this point in the history
If the loaded BPF scheduler encounters an error finding the appropriate
support will be challenging. Add fields to the struct_ops for sched_ext
to include a scheduler maintainer and an optional support url.

Signed-off-by: Daniel Hodges <[email protected]>
  • Loading branch information
hodgesds committed Jun 17, 2024
1 parent 4da57a5 commit 56d4c8a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
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
20 changes: 20 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,10 @@ 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 (strlen(scx_ops.maintainer))
printk(KERN_ERR, "sched_ext: sched maintainer: %s\n", scx_ops.maintainer);
if (strlen(scx_ops.maintainer_url))
printk(KERN_ERR, "sched_ext: maintainer url: %s\n", scx_ops.maintainer_url);

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

0 comments on commit 56d4c8a

Please sign in to comment.