diff options
author | Damien Zammit <damien@zamaudio.com> | 2023-09-24 10:35:10 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-09-24 14:38:03 +0200 |
commit | b11e10e2c81c2b608176021364a36d84173358e3 (patch) | |
tree | 8bde3f47151865143341e864040af3bde68385a5 /i386/i386at | |
parent | 31d45d0d8ee1d8eee96fc2a283a388b6b6aca669 (diff) | |
download | gnumach-b11e10e2c81c2b608176021364a36d84173358e3.tar.gz gnumach-b11e10e2c81c2b608176021364a36d84173358e3.tar.bz2 gnumach-b11e10e2c81c2b608176021364a36d84173358e3.zip |
percpu area using gs segment
This speeds up smp again, by storing the struct processor
in a percpu area and avoiding an expensive cpu_number every call
of current_processor(), as well as getting the cpu_number by
an offset into the percpu area. Untested on 64 bit
and work remains to use other percpu arrays.
TESTED: (NCPUS=8) -smp 1 boots to login shell ~2x slower than uniprocessor
TESTED: (NCPUS=8) -smp 2 boots to INIT but hangs there
TESTED: (NCPUS=8) -smp 4 gets stuck seemingly within rumpdisk and hangs
TESTED: (NCPUS=1) uniprocessor is a bit faster than normal
Message-Id: <20230924103428.455966-3-damien@zamaudio.com>
Diffstat (limited to 'i386/i386at')
-rw-r--r-- | i386/i386at/model_dep.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c index f83214b1..97acfdd6 100644 --- a/i386/i386at/model_dep.c +++ b/i386/i386at/model_dep.c @@ -462,6 +462,7 @@ i386at_init(void) ldt_init(); ktss_init(); + init_percpu(0); #if NCPUS > 1 /* Initialize SMP structures in the master processor */ mp_desc_init(0); |