NetBSD-Bugs archive

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

Re: kern/59870: kernel lock runtime diagnostics are difficult



The following reply was made to PR kern/59870; it has been noted by GNATS.

From: David Holland <dholland-sourcechanges%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: kern/59870: kernel lock runtime diagnostics are difficult
Date: Fri, 2 Jan 2026 05:53:30 +0000

 From: Taylor R Campbell <riastradh%netbsd.org@localhost>
 To: source-changes%NetBSD.org@localhost
 Subject: CVS commit: src/sys/kern
 Date: Fri, 2 Jan 2026 04:40:26 +0000
 
 Module Name:	src
 Committed By:	riastradh
 Date:		Fri Jan  2 04:40:26 UTC 2026
 
 Modified Files:
 	src/sys/kern: kern_lock.c
 
 Log Message:
 KERNEL_LOCK(9): Improve diagnostics when hogging kernel lock.
 
 1. Log diagnostics unconditionally, even if !LOCKDEBUG -- only put the
    _KERNEL_LOCK_ABORT("spinout") under LOCKDEBUG.
 
 2. Spin up to ten seconds (not 0x0fffffff iterations of the loop), as
    measured by getticks() and hz, before logging diagnostics.
 
 3. Avoid printing anything if it was already printed in the last ten
    seconds.
 
 This uses a somewhat grody symbol alias hack to keep the declaration
 of kernel_lock intact so it doesn't require changes in sys/lock.h or
 its users.
 
 kern/59870: kernel lock runtime diagnostics are difficult
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.189 -r1.190 src/sys/kern/kern_lock.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 


Home | Main Index | Thread Index | Old Index