feat: room for many apps: qemu 512M, pool sized from RAM (448M, 114688 frames), user VA 32M -> 1G, display 8 windows (buffers at 0x1000_0000, stack 14 pages), pm app budget 24 MiB, init 16 children (notif bits moved)

This commit is contained in:
2026-10-28 15:31:30 +01:00
parent 8c518b84aa
commit c3eb70191b
11 changed files with 30 additions and 23 deletions

View File

@@ -115,11 +115,12 @@ pub const SERVERS: &[Program] = &[
storage: &[disk(b"themes", false)],
// Its clients subscribe and take focus.
restarts_clients: true,
// Its windows' state (input queues among it) is KiBs.
stack_pages: 8,
// Its windows' state (input queues among it) is ~10 KiB, and the
// server is built on the stack.
stack_pages: 14,
// The framebuffer is ~1000 pages at 1280x800, and so is each of
// the (at most 4) windows' pixel buffers, which it owns.
..server("display", b"bin/display", Limits { pages: 5200, regions: 9, ..SMALL })
// the (at most 8) windows' pixel buffers, which it owns.
..server("display", b"bin/display", Limits { pages: 9300, regions: 13, ..SMALL })
},
// Text on the display, lines from the keyboard (it takes input focus).
// Its clients wait on lines and Ctrl+C. It draws its own text now,
@@ -149,8 +150,8 @@ pub const GATEKEEPER: Program = Program {
pub const SESSION: &[Program] = &[Program {
uses: &["terminal", "display"],
storage: &[users(b"", true), disk(b"apps", false)],
// Room for a few apps at a time.
spawns: Some(Limits { pages: 2048, endpoints: 8, notifications: 8, regions: 8 }),
// Room for several apps at a time (24 MiB between them).
spawns: Some(Limits { pages: 6144, endpoints: 12, notifications: 12, regions: 12 }),
// The shell holds handles to the apps it ran, which die with it.
restarts_clients: true,
session: Session::PassOn,

View File

@@ -16,7 +16,7 @@ use crate::load;
pub(crate) const MAX_CLIENTS: usize = 4;
/// Death signals carry the child's index as a bit.
const MAX_CHILDREN: usize = 8;
pub(crate) const MAX_CHILDREN: usize = 16;
struct Child {
client: usize,

View File

@@ -25,8 +25,11 @@ use crate::watchdog;
pub(crate) const MAX_SUPERVISED: usize = 12;
/// Init's death notification: spawned children below, storage, then a bit
/// per supervised program, and the timer on top.
const FIRST_BIT: usize = 16;
const STORAGE_BIT: usize = 1 << 15;
const FIRST_BIT: usize = 17;
const STORAGE_BIT: usize = 1 << 16;
// Spawned children take the bits below storage's; supervised programs
// those above it, clear of the timer's.
const _: () = assert!(crate::spawn::MAX_CHILDREN <= 16 && FIRST_BIT + MAX_SUPERVISED < 62);
pub(crate) const TIMER_BIT: usize = 1 << 62;
/// Where boot left storage's process.
const STORAGE_PROCESS: CapSlot = CapSlot::const_new(1);