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

Add fork field to struct scx_init_task_args #132

Merged
merged 3 commits into from
Jan 29, 2024
Merged

Add fork field to struct scx_init_task_args #132

merged 3 commits into from
Jan 29, 2024

Conversation

Byte-Lab
Copy link
Collaborator

Some schedulers, such as scx_nest, want to have different logic
depending on whether a task was running prior to the scheduler being
enabled. Let's add a flag that they can check to make it easy to find
out.

We also add a testcase and add a slight usability improvement to the
test runner.

@Byte-Lab Byte-Lab requested a review from htejun January 29, 2024 18:21
include/linux/sched/ext.h Outdated Show resolved Hide resolved
kernel/sched/ext.c Outdated Show resolved Hide resolved
@Byte-Lab
Copy link
Collaborator Author

@htejun repushed. I didn't change the SCX_INIT_TASK_ARGS() thing because if you take the comma out of the macro it breaks the build. We can discuss further if you really dislike the extra layer of indirection.

@htejun
Copy link
Collaborator

htejun commented Jan 29, 2024

Yeah, please drop the macro. Thanks.

@Byte-Lab Byte-Lab changed the title Add transitioning field to struct scx_init_task_args Add fork field to struct scx_init_task_args Jan 29, 2024
@Byte-Lab Byte-Lab requested a review from htejun January 29, 2024 19:36
Some schedulers, such as scx_nest, want to have different logic
depending on whether a task was running prior to the scheduler being
enabled. Let's add a flag that they can check to make it easy to find
out whether the task is being forked, or was already running and is
being transitioned to the new scheduler.

Signed-off-by: David Vernet <[email protected]>
Let's make sure it's working as expected as well.

Signed-off-by: David Vernet <[email protected]>
Printing a test preamble and status for a skipped test is only really
useful for CI. Let's make the default behavior to not print skipped
tests.

Signed-off-by: David Vernet <[email protected]>
@Byte-Lab
Copy link
Collaborator Author

Byte-Lab commented Jan 29, 2024

Yeah, please drop the macro. Thanks.

It's been dropped. FYI, this breaks auto-alignment for vim as well (though it only affects that specific section of code, not the whole file).

@htejun htejun merged commit cab6513 into sched_ext Jan 29, 2024
2 checks passed
@Byte-Lab Byte-Lab deleted the init_flag branch March 14, 2024 18:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants