Skip to content

0.21.0 --- openkal 0.20: transfers at an offset, openkal.region, a program's and a unit's memory, a supervised limit; the clock through the vDSO - #45

Merged
Sunrisepeak merged 3 commits into
mainfrom
openkal-0.20
Nov 1, 2026
Merged

Sunrisepeak merged 3 commits into
mainfrom
openkal-0.20

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Implements openkal 0.20 (mcpplibs/openkal openkal-0.20). See the commit message and README 'What 0.21 adds'.

Sunrisepeak and others added 3 commits November 2, 2026 02:51
…ogram's and a unit's memory, a supervised limit; the clock through the vDSO

- kal_fs_read_at and kal_fs_write_at are pread64 and pwrite64.
- openkal.region over mmap and madvise: a reservation usable at once (MAP_NORESERVE) where the kernel overcommits, KAL_REGION_PROP_OVERCOMMIT; inaccessible and uncharged, backed by mprotect, where it charges at mapping (vm.overcommit_memory 2).
- KAL_PINFO_MEMORY from /proc/<pid>/status (VmRSS, VmHWM); an ended program's peak from the record the kernel keeps until it is collected, so kal_process_wait waits without collecting (waitid WNOWAIT) and kal_process_close collects. kal_timeout_wait_process waits on the program's pidfd instead of polling.
- kal_process_job_usage sums the entries of /proc whose process group is the unit's. kal_process_job_limit is supervised by a context started with the first limit (500/200/100 ms by the share of the limit used) and ends the group with SIGKILL; kal_process_wait reports KAL_TERMINATED_LIMIT. HARD is not claimed: a control group may be made only where the hierarchy was delegated, which the kernel does not record.
- kal_time_monotonic and kal_time_wall call the vDSO's clock_gettime (AT_SYSINFO_EHDR), and the system call where there is none.
- tests/openkal_0_20.cpp: four contexts read at offsets beside a sequential reader of the same file; the monotonic clock never goes back.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…es, and its self-description; openkal.prof and openkal.debug are a loader's

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
@Sunrisepeak
Sunrisepeak merged commit 4ee4157 into main Nov 1, 2026
2 checks passed
@Sunrisepeak
Sunrisepeak deleted the openkal-0.20 branch November 1, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant