[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 5/5 gnumach] sched_prim.c: Check all run queues not just mast
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 5/5 gnumach] sched_prim.c: Check all run queues not just master processor |
Date: |
Tue, 22 Aug 2023 23:59:06 +0200 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Applied, thanks!
Damien Zammit, le mer. 16 août 2023 01:49:36 +0000, a ecrit:
> ---
> kern/sched_prim.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/kern/sched_prim.c b/kern/sched_prim.c
> index bc7befe8..ce458eb5 100644
> --- a/kern/sched_prim.c
> +++ b/kern/sched_prim.c
> @@ -49,6 +49,7 @@
> #include <kern/queue.h>
> #include <kern/sched.h>
> #include <kern/sched_prim.h>
> +#include <kern/smp.h>
> #include <kern/syscall_subr.h>
> #include <kern/thread.h>
> #include <kern/thread_swap.h>
> @@ -1983,6 +1984,7 @@ void do_thread_scan(void)
> spl_t s;
> boolean_t restart_needed = 0;
> thread_t thread;
> + int i;
> #if MACH_HOST
> processor_set_t pset;
> #endif /* MACH_HOST */
> @@ -1998,8 +2000,12 @@ void do_thread_scan(void)
> #else /* MACH_HOST */
> restart_needed = do_runq_scan(&default_pset.runq);
> #endif /* MACH_HOST */
> - if (!restart_needed)
> - restart_needed = do_runq_scan(&master_processor->runq);
> + if (!restart_needed) {
> + for (i = 0; i < smp_get_numcpus(); i++) {
> + if ((restart_needed =
> do_runq_scan(&cpu_to_processor(i)->runq)))
> + break;
> + }
> + }
>
> /*
> * Ok, we now have a collection of candidates -- fix them.
> --
> 2.40.1
>
>
>
--
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.
- [PATCH 0/5 gnumach] Scheduler fixes, Damien Zammit, 2023/08/15
- [PATCH 2/5 gnumach] sched_prim.c: Set quantum based on priority policy (not minimum), Damien Zammit, 2023/08/15
- [PATCH 1/5 gnumach] sched_prim.c: Split bound processor case into two, Damien Zammit, 2023/08/15
- [PATCH 3/5 gnumach] sched_prim.c: Add missing MACH_HOST pset conditionals, Damien Zammit, 2023/08/15
- [PATCH 4/5 gnumach] sched_prim.c: Lock thread when calling thread_setrun, Damien Zammit, 2023/08/15
- [PATCH 5/5 gnumach] sched_prim.c: Check all run queues not just master processor, Damien Zammit, 2023/08/15
- Re: [PATCH 5/5 gnumach] sched_prim.c: Check all run queues not just master processor,
Samuel Thibault <=