kernel/sched/psi.c
Source file repositories/reference/linux-study-clean/kernel/sched/psi.c
File Facts
- System
- Linux kernel
- Corpus path
kernel/sched/psi.c- Extension
.c- Size
- 47625 bytes
- Lines
- 1683
- Domain
- Core OS
- Bucket
- Scheduler, Processes, Timers, Sync, And Syscalls
- Inferred role
- Core OS: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/sched/clock.hlinux/workqueue.hlinux/psi.hsched.h
Detected Declarations
function setup_psifunction psi_write_beginfunction psi_write_endfunction psi_read_beginfunction psi_read_retryfunction group_initfunction psi_initfunction test_statesfunction get_recent_timesfunction collect_percpu_timesfunction calc_avgsfunction collect_percpu_timesfunction window_resetfunction window_updatefunction update_triggersfunction firedfunction update_averagesfunction psi_avgs_workfunction init_rtpoll_triggersfunction psi_schedule_rtpoll_workfunction psi_rtpoll_workfunction psi_rtpoll_workerfunction poll_timer_fnfunction record_timesfunction psi_group_changefunction psi_flags_changefunction psi_task_changefunction psi_task_switchfunction for_each_groupfunction for_each_groupfunction tasksfunction psi_account_irqtimefunction for_each_groupfunction psi_memstall_enterfunction psi_memstall_leavefunction psi_cgroup_allocfunction psi_cgroup_freefunction cgroup_move_taskfunction psi_cgroup_restartfunction for_each_possible_cpufunction psi_showfunction psi_trigger_destroyfunction psi_trigger_pollfunction psi_io_showfunction psi_memory_showfunction psi_cpu_showfunction psi_io_openfunction psi_memory_open
Annotated Snippet
module_init(psi_proc_init);
#endif /* CONFIG_PROC_FS */
Annotation
- Immediate include surface: `linux/sched/clock.h`, `linux/workqueue.h`, `linux/psi.h`, `sched.h`.
- Detected declarations: `function setup_psi`, `function psi_write_begin`, `function psi_write_end`, `function psi_read_begin`, `function psi_read_retry`, `function group_init`, `function psi_init`, `function test_states`, `function get_recent_times`, `function collect_percpu_times`.
- Atlas domain: Core OS / Scheduler, Processes, Timers, Sync, And Syscalls.
- Implementation status: integration implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.