Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64 Merge want_ast check in userret() into trap...
details: https://anonhg.NetBSD.org/src/rev/0de74eef8a3b
branches: trunk
changeset: 748218:0de74eef8a3b
user: nakayama <nakayama%NetBSD.org@localhost>
date: Sat Oct 17 08:50:49 2009 +0000
description:
Merge want_ast check in userret() into trap handler, and repeat
preempt() call while want_resched is true. While there remove
unnecessary #if 1.
This should fix a performance degradation of disk I/O on heavy load.
diffstat:
sys/arch/sparc64/include/userret.h | 10 +---------
sys/arch/sparc64/sparc64/trap.c | 14 ++++++++------
2 files changed, 9 insertions(+), 15 deletions(-)
diffs (61 lines):
diff -r 88971cd90784 -r 0de74eef8a3b sys/arch/sparc64/include/userret.h
--- a/sys/arch/sparc64/include/userret.h Fri Oct 16 23:57:39 2009 +0000
+++ b/sys/arch/sparc64/include/userret.h Sat Oct 17 08:50:49 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: userret.h,v 1.8 2008/06/30 14:12:20 nakayama Exp $ */
+/* $NetBSD: userret.h,v 1.9 2009/10/17 08:50:49 nakayama Exp $ */
/*
* Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved.
@@ -63,14 +63,6 @@
mi_userret(l);
- if (want_ast) {
- want_ast = 0;
- if (l->l_pflag & LP_OWEUPC) {
- l->l_pflag &= ~LP_OWEUPC;
- ADDUPROF(l);
- }
- }
-
/*
* If profiling, charge recent system time to the trapped pc.
*/
diff -r 88971cd90784 -r 0de74eef8a3b sys/arch/sparc64/sparc64/trap.c
--- a/sys/arch/sparc64/sparc64/trap.c Fri Oct 16 23:57:39 2009 +0000
+++ b/sys/arch/sparc64/sparc64/trap.c Sat Oct 17 08:50:49 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.157 2009/05/16 19:15:34 nakayama Exp $ */
+/* $NetBSD: trap.c,v 1.158 2009/10/17 08:50:49 nakayama Exp $ */
/*
* Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved.
@@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.157 2009/05/16 19:15:34 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.158 2009/10/17 08:50:49 nakayama Exp $");
#include "opt_ddb.h"
#include "opt_multiprocessor.h"
@@ -608,12 +608,14 @@
#endif
case T_AST:
-#if 1
- if (want_resched)
+ if (l->l_pflag & LP_OWEUPC) {
+ l->l_pflag &= ~LP_OWEUPC;
+ ADDUPROF(l);
+ }
+ while (want_resched)
preempt();
want_ast = 0;
-#endif
- break; /* the work is all in userret() */
+ break;
case T_ILLINST:
case T_INST_EXCEPT:
Home |
Main Index |
Thread Index |
Old Index