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

sched_ext: API update fallouts #171

Merged
merged 2 commits into from
Apr 2, 2024
Merged
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
18 changes: 9 additions & 9 deletions include/linux/sched/ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,24 +92,18 @@ struct scx_exit_info {

/* sched_ext_ops.flags */
enum scx_ops_flags {
/*
* If set, only tasks with policy set to SCHED_EXT are attached to
* sched_ext. If clear, SCHED_NORMAL tasks are also included.
*/
SCX_OPS_SWITCH_PARTIAL = 1LLU << 0,

/*
* Keep built-in idle tracking even if ops.update_idle() is implemented.
*/
SCX_OPS_KEEP_BUILTIN_IDLE = 1LLU << 1,
SCX_OPS_KEEP_BUILTIN_IDLE = 1LLU << 0,

/*
* By default, if there are no other task to run on the CPU, ext core
* keeps running the current task even after its slice expires. If this
* flag is specified, such tasks are passed to ops.enqueue() with
* %SCX_ENQ_LAST. See the comment above %SCX_ENQ_LAST for more info.
*/
SCX_OPS_ENQ_LAST = 1LLU << 2,
SCX_OPS_ENQ_LAST = 1LLU << 1,

/*
* An exiting task may schedule after PF_EXITING is set. In such cases,
Expand All @@ -122,7 +116,13 @@ enum scx_ops_flags {
* depend on pid lookups and wants to handle these tasks directly, the
* following flag can be used.
*/
SCX_OPS_ENQ_EXITING = 1LLU << 3,
SCX_OPS_ENQ_EXITING = 1LLU << 2,

/*
* If set, only tasks with policy set to SCHED_EXT are attached to
* sched_ext. If clear, SCHED_NORMAL tasks are also included.
*/
SCX_OPS_SWITCH_PARTIAL = 1LLU << 3,

/*
* CPU cgroup knob enable flags
Expand Down
2 changes: 1 addition & 1 deletion tools/sched_ext/include/scx/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static inline bool __COMPAT_read_enum(const char *type, const char *name, u64 *v

__COMPAT_load_vmlinux_btf();

tid = btf__find_by_name_kind(__COMPAT_vmlinux_btf, type, BTF_KIND_ENUM);
tid = btf__find_by_name(__COMPAT_vmlinux_btf, type);
if (tid < 0)
return false;

Expand Down