If the current processor is not the one we want to run an ast on,
we can bind the current thread to the processor we want, and force a
thread switch to that one, then run the ast_check() on the right cpu.
---
i386/i386/ast_check.c | 13 +++--
1 file changed, 11 insertions(+), 2
There are only two slots per cpu. Use only one of two per cpu.
---
i386/intel/pmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c
index 0bb1a490..9bcbc279 100644
--- a/i386/intel/pmap.c
+++ b/i386/intel/pmap.c
@@ -1020,10 +1020,10
---
i386/intel/pmap.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c
index 9bcbc279..aa5522b3 100644
--- a/i386/intel/pmap.c
+++ b/i386/intel/pmap.c
@@ -2462,6 +2462,7 @@ void pmap_collect(pmap_t p)
/*
* Free the page table tree.
---
kern/thread.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kern/thread.c b/kern/thread.c
index a324eed7..9bbe8342 100644
--- a/kern/thread.c
+++ b/kern/thread.c
@@ -57,6 +57,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -2570,7
---
i386/i386at/interrupt.S | 1 +
x86_64/interrupt.S | 10 ++
2 files changed, 11 insertions(+)
diff --git a/i386/i386at/interrupt.S b/i386/i386at/interrupt.S
index 55f4fa0f..1f661f8d 100644
--- a/i386/i386at/interrupt.S
+++ b/i386/i386at/interrupt.S
@@ -123,6 +123,7 @@ _no_eoi:
With this change we can update CPU_NUMBER assembly routine to a simpler
version.
El sábado 5 de agosto de 2023, Damien Zammit escribió:
> This speeds up smp slightly by reducing the cpu_number()
> complexity to have no branching, just a look up table.
> It also addresses the problem that
Applied, thanks!
Damien Zammit, le sam. 05 août 2023 07:49:54 +, a ecrit:
> This speeds up smp slightly by reducing the cpu_number()
> complexity to have no branching, just a look up table.
> It also addresses the problem that CPU_NUMBER was only using
> raw apic_id as an approximation of the
This speeds up smp slightly by reducing the cpu_number()
complexity to have no branching, just a look up table.
It also addresses the problem that CPU_NUMBER was only using
raw apic_id as an approximation of the kernel_id.
Other improvements were to remove unnecessary checks now that
the lookup