summaryrefslogtreecommitdiff
path: root/sys/src/9/port/portdat.h
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2022-09-03 17:30:04 +0000
committercinap_lenrek <cinap_lenrek@felloff.net>2022-09-03 17:30:04 +0000
commit3e115487969570445a58a5a351a7bf0e0ab5fc21 (patch)
tree98d03736051c50aee5b5b59250f35000532a8fd8 /sys/src/9/port/portdat.h
parent99529b80a3bbe35c5cd5dadf5f106632a2449e84 (diff)
kernel: half NERR, refcount Note's to avoid excessive allocations for postnotepg()
Half NERR stack to 32. When posing a note to a large group, avoid allocating Notes for each individual process, but post the reference instread. factor out process interruption into procinterrupt(). Avoid allocation of notes in alarmkproc, just posting the same note to everyone.
Diffstat (limited to 'sys/src/9/port/portdat.h')
-rw-r--r--sys/src/9/port/portdat.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/src/9/port/portdat.h b/sys/src/9/port/portdat.h
index e658346a1..45a39be8e 100644
--- a/sys/src/9/port/portdat.h
+++ b/sys/src/9/port/portdat.h
@@ -314,6 +314,7 @@ struct Note
{
char msg[ERRMAX];
int flag; /* whether system posted it */
+ Ref;
};
enum
@@ -629,7 +630,7 @@ enum
TCSys,
TCReal,
- NERR = 64,
+ NERR = 32,
NNOTE = 5,
Npriq = 20, /* number of scheduler priority levels */
@@ -714,7 +715,7 @@ struct Proc
int procctl; /* Control for /proc debugging */
uintptr pc; /* DEBUG only */
- Lock rlock; /* sync sleep/wakeup with postnote */
+ Lock rlock; /* sync sleep/wakeup with procinterrupt */
Rendez *r; /* rendezvous point slept on */
Rendez sleep; /* place for syssleep/debug */
int notepending; /* note issued but not acted on */