Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 x86: Revert previous syscall biglock slippa...



details:   https://anonhg.NetBSD.org/src/rev/de89b783611f
branches:  trunk
changeset: 363940:de89b783611f
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Thu Mar 17 22:22:49 2022 +0000

description:
x86: Revert previous syscall biglock slippage attribution.

The attribution in userret is good enough as is, because the stack
trace on panic shows the syscall number in the trap frame, so no need
to put extra cost in the syscall entry logic even under DIAGNOSTIC.

diffstat:

 sys/arch/x86/x86/syscall.c |  11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)

diffs (32 lines):

diff -r 51275ffacad9 -r de89b783611f sys/arch/x86/x86/syscall.c
--- a/sys/arch/x86/x86/syscall.c        Thu Mar 17 08:08:03 2022 +0000
+++ b/sys/arch/x86/x86/syscall.c        Thu Mar 17 22:22:49 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: syscall.c,v 1.20 2022/03/12 15:50:53 riastradh Exp $   */
+/*     $NetBSD: syscall.c,v 1.21 2022/03/17 22:22:49 riastradh Exp $   */
 
 /*-
  * Copyright (c) 1998, 2000, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.20 2022/03/12 15:50:53 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.21 2022/03/17 22:22:49 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -136,13 +136,6 @@
        }
 #endif
        error = sy_invoke(callp, l, args, rval, code);
-#ifdef DIAGNOSTIC
-       kpreempt_disable();     /* make curcpu() stable */
-       KASSERTMSG(curcpu()->ci_biglock_count == 0,
-           "syscall %ld of emul %s leaked %d kernel locks",
-           (long)code, p->p_emul->e_name, curcpu()->ci_biglock_count);
-       kpreempt_enable();
-#endif
 
        if (__predict_true(error == 0)) {
                X86_TF_RAX(frame) = rval[0];



Home | Main Index | Thread Index | Old Index