bug pass: whole console lines, a quiet SCI, an honest reserve warning
- schinit, schinitd and vgpud build every message from pieces, one
write() each, so a job starting on another CPU landed mid-line:
"schinitd: starting vgpud: os.schos.resolvconfno virtio-gpu on this
machine". They now collect a line and write it at the newline;
resolvconf's verbose line is one write with its prefix.
- The ACPI SCI registers IRQ_QUIET. A desktop's SCI never fires, and the
poller took two seconds of silence for a misrouted line ("irq 9:
nothing has arrived on it") and called the handler every tick. A line
is only exempt while every handler on it is quiet.
- The loader claims each segment from where the last one's claim ended,
so two segments sharing a page no longer ask for it twice. When a
claim is still refused, it names the memory-map entries in the way.
- Stale divesymlink() declaration gone; the kernel.md struct table
re-measured (inode, buf and file pools grow from slabs now).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1giNvrHTrPMPw7V6x1kQ4
This commit is contained in:
parent
7af579a20d
commit
e659c6b187
10 changed files with 184 additions and 25 deletions
|
|
@ -119,10 +119,34 @@ read_bootmode(void)
|
|||
if (n > 0) { b[n] = 0; verbose_boot = (b[0] == 'v'); }
|
||||
}
|
||||
|
||||
// Whole lines, in one write() each: the same buffer as schinitd's, for the
|
||||
// same reason -- a line written in pieces is a line another process can land
|
||||
// in the middle of. See emit() there.
|
||||
static char lbuf[512];
|
||||
static int lbn;
|
||||
|
||||
static void
|
||||
lflush(void)
|
||||
{
|
||||
if (lbn)
|
||||
write(1, lbuf, lbn);
|
||||
lbn = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
emit(const char *s, int n)
|
||||
{
|
||||
for (int i = 0; i < n; i++) {
|
||||
lbuf[lbn++] = s[i];
|
||||
if (s[i] == '\n' || lbn == (int)sizeof lbuf)
|
||||
lflush();
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
out(const char *s)
|
||||
{
|
||||
write(1, (void *)s, slen(s));
|
||||
emit(s, slen(s));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -410,6 +434,7 @@ spawn(struct schinit_spawn *s)
|
|||
out("schinit: cannot exec ");
|
||||
out(s->program);
|
||||
out("\n");
|
||||
lflush();
|
||||
exit();
|
||||
}
|
||||
return pid;
|
||||
|
|
|
|||
Loading…
Reference in a new issue