Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm/pmap add pmaphist calls around seg_tab[] manipulatio...
details: https://anonhg.NetBSD.org/src/rev/077d0e0e8970
branches: trunk
changeset: 1012979:077d0e0e8970
user: mrg <mrg%NetBSD.org@localhost>
date: Mon Aug 17 08:56:27 2020 +0000
description:
add pmaphist calls around seg_tab[] manipulation. hopefully will
help find what causes this:
panic: pmap_segtab_alloc: pm_segtab.seg_tab[1010] != 0 (0x980000004eeb6068): from free list
diffstat:
sys/uvm/pmap/pmap_segtab.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diffs (65 lines):
diff -r b7cea3b7b999 -r 077d0e0e8970 sys/uvm/pmap/pmap_segtab.c
--- a/sys/uvm/pmap/pmap_segtab.c Mon Aug 17 08:34:36 2020 +0000
+++ b/sys/uvm/pmap/pmap_segtab.c Mon Aug 17 08:56:27 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap_segtab.c,v 1.15 2020/08/07 07:19:45 skrll Exp $ */
+/* $NetBSD: pmap_segtab.c,v 1.16 2020/08/17 08:56:27 mrg Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap_segtab.c,v 1.15 2020/08/07 07:19:45 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_segtab.c,v 1.16 2020/08/17 08:56:27 mrg Exp $");
/*
* Manages physical address maps.
@@ -210,12 +210,18 @@
{
pmap_segtab_t *stp = *stp_p;
+ UVMHIST_FUNC(__func__);
+ UVMHIST_CALLARGS(pmaphist, "pm=%#jx stpp=%#jx free=%jd",
+ (uintptr_t)pmap, (uintptr_t)stp_p, free_stp, 0);
+ UVMHIST_LOG(pmaphist, " callback=%jx flags=%jx va=%jx vinc=%jx",
+ (uintptr_t)callback, flags, (uintptr_t)va, (uintptr_t)vinc);
for (size_t i = (va / vinc) & (PMAP_SEGTABSIZE - 1);
i < PMAP_SEGTABSIZE;
i++, va += vinc) {
#ifdef _LP64
if (vinc > NBSEG) {
if (stp->seg_seg[i] != NULL) {
+ UVMHIST_LOG(pmaphist, " recursing", 0, 0, 0, 0);
pmap_segtab_release(pmap, &stp->seg_seg[i],
true, callback, flags, va, vinc / NSEGPG);
KASSERT(stp->seg_seg[i] == NULL);
@@ -255,6 +261,7 @@
#endif
stp->seg_tab[i] = NULL;
+ UVMHIST_LOG(pmaphist, " zeroing tab[%jd]", i, 0, 0, 0);
}
if (free_stp) {
@@ -448,6 +455,10 @@
pmap_segtab_t *stp = pmap->pm_segtab;
pt_entry_t *pte;
+ UVMHIST_FUNC(__func__);
+ UVMHIST_CALLARGS(pmaphist, "pm=%#jx va=%#jx flags=%jx",
+ (uintptr_t)pmap, (uintptr_t)va, flags, 0);
+
pte = pmap_pte_lookup(pmap, va);
if (__predict_false(pte == NULL)) {
#ifdef _LP64
@@ -513,6 +524,8 @@
*pte_p = pte;
#endif
KASSERT(pte == stp->seg_tab[(va >> SEGSHIFT) & (PMAP_SEGTABSIZE - 1)]);
+ UVMHIST_LOG(pmaphist, " set tab[%jd]=%jx",
+ (va >> SEGSHIFT) & (PMAP_SEGTABSIZE - 1), pte, 0, 0);
#ifdef DEBUG
for (size_t i = 0; i < NPTEPG; i++) {
Home |
Main Index |
Thread Index |
Old Index