diff options
author | Bret Lambert <blambert@cvs.openbsd.org> | 2009-08-11 18:43:34 +0000 |
---|---|---|
committer | Bret Lambert <blambert@cvs.openbsd.org> | 2009-08-11 18:43:34 +0000 |
commit | a6235ea9f44b36a886c9594593dd80fc9d47fa90 (patch) | |
tree | 0778aeba8f333cc1ba84b49ab44ccad5b155498a /sys | |
parent | 935b5746db4dbaa64a95e16e092ba253ec4313c0 (diff) |
uvm_scheduler() sounds important, but ``while(1) tsleep()'' is kinda lame
inline the loop in the one place it exists, and remove it from uvm
adjust a comment mentioning it accordingly
originally inspired by a diff fixing a comment from oga@
ok art@ beck@ miod@ oga@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/alpha/alpha/cpu.c | 4 | ||||
-rw-r--r-- | sys/kern/init_main.c | 9 | ||||
-rw-r--r-- | sys/uvm/uvm_extern.h | 3 | ||||
-rw-r--r-- | sys/uvm/uvm_glue.c | 18 |
4 files changed, 10 insertions, 24 deletions
diff --git a/sys/arch/alpha/alpha/cpu.c b/sys/arch/alpha/alpha/cpu.c index 17a472e0812..7c66b9dafe9 100644 --- a/sys/arch/alpha/alpha/cpu.c +++ b/sys/arch/alpha/alpha/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.23 2009/04/14 16:01:04 oga Exp $ */ +/* $OpenBSD: cpu.c,v 1.24 2009/08/11 18:43:33 blambert Exp $ */ /* $NetBSD: cpu.c,v 1.44 2000/05/23 05:12:53 thorpej Exp $ */ /*- @@ -174,7 +174,7 @@ struct cputable_struct { * the primary (although the primary idles on proc0's PCB until its * idle PCB is created). * - * Right before calling uvm_scheduler(), main() calls, on proc0's + * As one of the last steps in booting, main() calls, on proc0's * context, cpu_boot_secondary_processors(). This is our key to * actually spin up the additional processors we've found. We * run through our cpu_info[] array looking for secondary processors diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 69f510c89f9..2e0f06f12aa 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_main.c,v 1.161 2009/08/09 12:47:23 dlg Exp $ */ +/* $OpenBSD: init_main.c,v 1.162 2009/08/11 18:43:33 blambert Exp $ */ /* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */ /* @@ -541,8 +541,11 @@ main(void *framep) start_init_exec = 1; wakeup((void *)&start_init_exec); - /* The scheduler is an infinite loop. */ - uvm_scheduler(); + /* + * proc0: nothing to do, back to sleep + */ + while (1) + tsleep(&proc0, PVM, "scheduler", 0); /* NOTREACHED */ } diff --git a/sys/uvm/uvm_extern.h b/sys/uvm/uvm_extern.h index 3754a927046..6c514abcf1e 100644 --- a/sys/uvm/uvm_extern.h +++ b/sys/uvm/uvm_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_extern.h,v 1.81 2009/06/16 23:54:58 oga Exp $ */ +/* $OpenBSD: uvm_extern.h,v 1.82 2009/08/11 18:43:33 blambert Exp $ */ /* $NetBSD: uvm_extern.h,v 1.57 2001/03/09 01:02:12 chs Exp $ */ /* @@ -491,7 +491,6 @@ void uvm_fork(struct proc *, struct proc *, boolean_t, void uvm_exit(struct proc *); void uvm_init_limits(struct proc *); boolean_t uvm_kernacc(caddr_t, size_t, int); -__dead void uvm_scheduler(void); int uvm_vslock(struct proc *, caddr_t, size_t, vm_prot_t); diff --git a/sys/uvm/uvm_glue.c b/sys/uvm/uvm_glue.c index 27141201a8d..475db7d8a80 100644 --- a/sys/uvm/uvm_glue.c +++ b/sys/uvm/uvm_glue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_glue.c,v 1.49 2009/03/20 15:19:04 oga Exp $ */ +/* $OpenBSD: uvm_glue.c,v 1.50 2009/08/11 18:43:33 blambert Exp $ */ /* $NetBSD: uvm_glue.c,v 1.44 2001/02/06 19:54:44 eeh Exp $ */ /* @@ -306,22 +306,6 @@ int swapdebug = 0; #endif /* - * uvm_scheduler: process zero main loop - * - * - if not enough memory, wake the pagedaemon and let it clear space. - */ - -void -uvm_scheduler(void) -{ - /* - * Nothing to do, back to sleep - */ - while (1) - tsleep(&proc0, PVM, "scheduler", 0); -} - -/* * swappable: is process "p" swappable? */ |