Source-Changes-HG archive

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

[src/trunk]: src/sys/kern KERNEL_LOCK(9): Record kernel lock holder in fast p...



details:   https://anonhg.NetBSD.org/src/rev/d7b1b6715b7b
branches:  trunk
changeset: 369428:d7b1b6715b7b
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue Aug 16 18:13:09 2022 +0000

description:
KERNEL_LOCK(9): Record kernel lock holder in fast path too.

diffstat:

 sys/kern/kern_lock.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r cc9ffd34a924 -r d7b1b6715b7b sys/kern/kern_lock.c
--- a/sys/kern/kern_lock.c      Tue Aug 16 16:25:16 2022 +0000
+++ b/sys/kern/kern_lock.c      Tue Aug 16 18:13:09 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_lock.c,v 1.175 2022/08/16 16:25:16 riastradh Exp $        */
+/*     $NetBSD: kern_lock.c,v 1.176 2022/08/16 18:13:09 riastradh Exp $        */
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008, 2009, 2020 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_lock.c,v 1.175 2022/08/16 16:25:16 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lock.c,v 1.176 2022/08/16 18:13:09 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_lockdebug.h"
@@ -216,6 +216,7 @@
            0);
 
        if (__predict_true(__cpu_simple_lock_try(kernel_lock))) {
+               kernel_lock_holder = curcpu();
                ci->ci_biglock_count = nlocks;
                l->l_blcnt = nlocks;
                LOCKDEBUG_LOCKED(kernel_lock_dodebug, kernel_lock, NULL,



Home | Main Index | Thread Index | Old Index