tools/testing/selftests/sched_ext/rt_stall.c
Source file repositories/reference/linux-study-clean/tools/testing/selftests/sched_ext/rt_stall.c
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/sched_ext/rt_stall.c- Extension
.c- Size
- 7046 bytes
- Lines
- 294
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
stdio.hstdlib.hunistd.hsched.hsys/prctl.hsys/types.hsys/wait.htime.hlinux/sched.hsignal.hbpf/bpf.hscx/common.hrt_stall.bpf.skel.hscx_test.h../kselftest.h
Detected Declarations
function Copyrightfunction wait_readyfunction process_funcfunction set_affinityfunction set_schedfunction get_process_runtimefunction setupfunction sched_stress_testfunction runfunction cleanup
Annotated Snippet
if (is_ext) {
memset(&skel->data->uei, 0, sizeof(skel->data->uei));
link = bpf_map__attach_struct_ops(skel->maps.rt_stall_ops);
SCX_FAIL_IF(!link, "Failed to attach scheduler");
}
res = sched_stress_test(is_ext);
if (is_ext) {
SCX_EQ(skel->data->uei.kind, EXIT_KIND(SCX_EXIT_NONE));
bpf_link__destroy(link);
}
if (!res)
ksft_exit_fail();
}
return SCX_TEST_PASS;
}
static void cleanup(void *ctx)
{
struct rt_stall *skel = ctx;
rt_stall__destroy(skel);
}
struct scx_test rt_stall = {
.name = "rt_stall",
.description = "Verify that RT tasks cannot stall SCHED_EXT tasks",
.setup = setup,
.run = run,
.cleanup = cleanup,
};
REGISTER_SCX_TEST(&rt_stall)
Annotation
- Immediate include surface: `stdio.h`, `stdlib.h`, `unistd.h`, `sched.h`, `sys/prctl.h`, `sys/types.h`, `sys/wait.h`, `time.h`.
- Detected declarations: `function Copyright`, `function wait_ready`, `function process_func`, `function set_affinity`, `function set_sched`, `function get_process_runtime`, `function setup`, `function sched_stress_test`, `function run`, `function cleanup`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.