Skip to content
11 changes: 8 additions & 3 deletions docs/src/architecture/diagnostics.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@ exports them.
- The kernel's logging responsibility is its own record ring and its console.
Userland output never enters the kernel ring. Reading the machine's log
needs a right on the system capability.
- The log keeper owns the log files. It holds each program to an allowance,
keeps every boot's beginning, and syncs on an alert or an interval. Severity
is an ordered ladder.
- The log keeper owns the log files. It holds each program to an allowance
and keeps every boot's beginning. Severity is an ordered ladder.
- The file is written in batches: at once for an error, an alert or the
machine's stop, and otherwise within a second. A machine that dies without
stopping loses at most that second of its file while the volume keeps pace;
the console is not batched.
No file call holds up the console or a reader, and a stop waits on the file
within a bound.
- A slow sink drops and counts; it never blocks a producer and fails alone.
- The kernel waits on the log keeper neither at a panic nor at a stop.

Expand Down
19 changes: 0 additions & 19 deletions issues/logkeeper-hears-a-reader-leave-only-at-its-next-write.md

This file was deleted.

16 changes: 16 additions & 0 deletions issues/redesign-the-log-subsystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,19 @@ sources, and the review's target was one `gates` directory under
`kernel/src/` so that what test machinery exists is auditable in one listing.
`input_merge_test` was the tell that pure logic was trapped in the kernel: the
merge is `toyos-input`'s now, host-tested with synthetic multi-source streams.

**The file written in batches** (#1232) rests on host tests and guest rows.
The benches went down before its T14 half ran; on the AMD bench its
`spawn_cost` A/B (one boot per arm) and `machine_reboot` passed.

- **Owed on metal:** `machine_reboot` on the T14, at main. Main must pass the
boot verdict with the stop mark and the supervisor's stop line in the file,
`machine_reboot`'s reset-register line, and `test_rs_ps2server_hold` exit 0
(a served-log reader is handed its line through the reader's wake), with no
"had not answered the stop's flush", "stop mark was asked … after its time",
"answers but slowly" or "refusing reader" line.
- **Owed on metal:** `spawn_cost`'s A/B on the T14, main before #1232 against
main after it, back to back. Main after must show "the machine busy … a
spawn" lower than before, by about one write and sync per logkeeper round the
loop spans (on the AMD bench, 430 µs against 360 µs a spawn), min and median
no worse than the two runs' spread, and both boots passing with the stop mark.
42 changes: 0 additions & 42 deletions issues/the-console-waits-on-logkeepers-file-writes.md

This file was deleted.

9 changes: 5 additions & 4 deletions lib/logstream/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,11 @@ pub const REGISTER: u32 = 1;
pub const SERVED: u32 = 2;

/// The supervisor → `logkeeper`: the machine is about to be stopped. `logkeeper` reads every ring
/// and the kernel's records, writes them, makes the volume durable — or says,
/// in the file and on the console, what of the boot it could not — and
/// answers [`FLUSHED`]; the supervisor asks for the stop once it has, or once its bound
/// is spent.
/// and the kernel's records, writes them, makes the volume durable — or says
/// what of the boot it could not, in the file where the volume answers and on
/// the console, and gives up on a volume that does not answer within its own
/// bound — and answers [`FLUSHED`]; the supervisor asks for the stop once it
/// has, or once its bound is spent.
pub const FLUSH: u32 = 5;
pub const FLUSHED: u32 = 6;

Expand Down
4 changes: 1 addition & 3 deletions sdk/abi/src/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ pub const RECORD_BYTES: usize = 1024;
/// **Four because four have writers and readers.** The kernel writes `Info`
/// (`log!`) and `Alert` (`alert!`); a program's stdout is `Info` and its stderr
/// `Error`, and its own lines choose. Every rendered line names one above
/// `Info` by its [`word`](Self::word), a screen colours the line by it, and
/// `/system/bin/logkeeper` makes the volume durable at `Alert` rather than on
/// its interval.
/// `Info` by its [`word`](Self::word), and a screen colours the line by it.
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
#[repr(u8)]
pub enum Severity {
Expand Down
Loading
Loading