Skip to content

0.22.0 --- openkal 0.21: instructions from a file; an ended program's processor time; a program started without copying this one; kal_alloc carved as it is used - #46

Merged
Sunrisepeak merged 3 commits into
mainfrom
openkal-0.21
Nov 2, 2026
Merged

Sunrisepeak merged 3 commits into
mainfrom
openkal-0.21

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

openkal-linux 0.22.0 for openkal 0.21.

  • kal_exec_map_part (mmap MAP_FIXED, private), KAL_EXEC_PROP_FILE.
  • An ended program's cpu_ns from the waitid(WNOWAIT) record.
  • kal_process_spawn starts the program with clone(CLONE_VM | CLONE_VFORK) on its own stack; a copy of the address space cost 1.4 ms and about 1 900 faults per worker in a language server.
  • kal_alloc carves a chunk as it is used (6 MiB had been resident in every program); alignments wider than 4096 bytes are mapped.
  • tests/openkal_0_21.cpp. Local: conformance 321/321 held, tests 19/19.

Co-authored-by: speak-agent 248744407+speak-agent@users.noreply.github.com

Sunrisepeak and others added 3 commits November 2, 2026 09:16
… processor time; a program started without copying this one; kal_alloc carved as it is used

kal_exec_map_part maps the file's pages over part of a region (mmap with
MAP_FIXED, private), read or executed; KAL_EXEC_PROP_FILE is claimed. A
volume mounted without execution reports kal_err_not_supported.

kal_process_info reports cpu_ns of an ended program from the record
waitid(WNOWAIT) reads, until kal_process_close collects it.

kal_process_spawn starts the program with clone(CLONE_VM | CLONE_VFORK) on a
stack of its own (__okl_clone, now in both arrangements), with every request
held until it is replaced; the started image sets each handled request to its
default first and reads the caller's arguments without writing them. A copy
of the address space cost 1.4 ms in the kernel and about 1 900 faults for
each worker a language server started.

kal_alloc carves a chunk's blocks as they are handed out: a free list threaded
through each 1 MiB chunk made it resident at once (6 MiB in every program). An
alignment wider than 4096 bytes is mapped, since a block is aligned only to its
size or to the page. tests/openkal_0_21.cpp.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…ad without a lock

kal_fs_info and kal_fs_open check a name and terminate it in one pass
(accepted_name). The volume a file enquiry asks about is found without the
lock every enquiry took: a reader takes a sequence before and after the slots
and reads again if a writer was between. fill_info writes the caller's
structure directly. What an enquiry costs beyond the kernel's own fell from
28 ns to 19 ns (stat of a short name, 266 ns in the kernel).

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…kl::clone_on_stack

The independence check permits a reference across this package's objects only
to a name of namespace okl; process.o referred to __okl_clone itself.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
@Sunrisepeak
Sunrisepeak merged commit feafa3d into main Nov 2, 2026
2 checks passed
@Sunrisepeak
Sunrisepeak deleted the openkal-0.21 branch November 2, 2026 02:44
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