summaryrefslogtreecommitdiff
path: root/sys/src/9/port/portdat.h
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2022-08-10 12:27:15 +0000
committerOri Bernstein <ori@eigenstate.org>2022-08-10 12:27:15 +0000
commit07e14e43baafbfe7855a2003faa15e70ec5640a1 (patch)
treed6e6fc30035f3f793fa5be05a5542fc9e91c484b /sys/src/9/port/portdat.h
parent4521ae32bb95562b4210c23bee02a9fe1b1e3137 (diff)
9/port: allow kiloprocs -- allocate procs lazily
Treallocate the small data structures around procs eagerly, but use malloc to allocate the large proc data structures when we need them, which allows us to scale to many more procs. There are still many scalability bottlenecks, so we only crank up the nproc limit by a little bit this time around, and crank it up more as we optimize more.
Diffstat (limited to 'sys/src/9/port/portdat.h')
-rw-r--r--sys/src/9/port/portdat.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/src/9/port/portdat.h b/sys/src/9/port/portdat.h
index e2aa2aa07..8f3904441 100644
--- a/sys/src/9/port/portdat.h
+++ b/sys/src/9/port/portdat.h
@@ -671,6 +671,7 @@ struct Proc
ulong pid;
ulong noteid; /* Equivalent of note group */
ulong parentpid;
+ ulong index;
Proc *parent; /* Process to send wait record on exit */
Lock exl; /* Lock count and waitq */
@@ -760,7 +761,7 @@ struct Proc
ulong delaysched;
ulong priority; /* priority level */
ulong basepri; /* base priority level */
- uchar fixedpri; /* priority level deson't change */
+ uchar fixedpri; /* priority level doesn't change */
ulong cpu; /* cpu average */
ulong lastupdate;
uchar yield; /* non-zero if the process just did a sleep(0) */