diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2008-07-18 23:43:32 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2008-07-18 23:43:32 +0000 |
commit | cbf40e0f6a4ee8fde77e05f8b74ca4b989937d38 (patch) | |
tree | 761b8494073324eacc2b020b8dcffd3c81afb3ee /sys/arch/m88k/include/cpu.h | |
parent | 7dde4e5a62193339964b0d2205abffd301cc786b (diff) |
Add a macro that clears the want_resched flag that need_resched sets.
Right now when mi_switch picks up the same proc, we didn't clear the
flag which would mean that every time we service an AST we would attempt
a context switch. For some architectures, amd64 being probably the
most extreme, that meant attempting to context switch for every
trap and interrupt.
Now we clear_resched explicitly after every context switch, even if it
didn't do anything. Which also allows us to remove some more code
in cpu_switchto (not done yet).
miod@ ok
Diffstat (limited to 'sys/arch/m88k/include/cpu.h')
-rw-r--r-- | sys/arch/m88k/include/cpu.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/m88k/include/cpu.h b/sys/arch/m88k/include/cpu.h index aa3acd6438b..2e196920d8f 100644 --- a/sys/arch/m88k/include/cpu.h +++ b/sys/arch/m88k/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.34 2008/01/13 20:20:29 miod Exp $ */ +/* $OpenBSD: cpu.h,v 1.35 2008/07/18 23:43:31 art Exp $ */ /* * Copyright (c) 1996 Nivas Madhur * Copyright (c) 1992, 1993 @@ -241,6 +241,7 @@ do { \ if (ci->ci_curproc != NULL) \ aston(ci->ci_curproc); \ } while (0) +#define clear_resched(ci) (ci)->ci_want_resched = 0 /* * Give a profiling tick to the current process when the user profiling |