Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm/pmap More UVMHIST_LOG. Remove some commented output...
details: https://anonhg.NetBSD.org/src/rev/845063440de9
branches: trunk
changeset: 1012821:845063440de9
user: skrll <skrll%NetBSD.org@localhost>
date: Tue Aug 11 06:09:44 2020 +0000
description:
More UVMHIST_LOG. Remove some commented output printfs.
diffstat:
sys/uvm/pmap/pmap.c | 11 +++++++++--
sys/uvm/pmap/pmap_tlb.c | 19 ++++++++++++++-----
2 files changed, 23 insertions(+), 7 deletions(-)
diffs (123 lines):
diff -r 618c98e01f02 -r 845063440de9 sys/uvm/pmap/pmap.c
--- a/sys/uvm/pmap/pmap.c Tue Aug 11 05:43:45 2020 +0000
+++ b/sys/uvm/pmap/pmap.c Tue Aug 11 06:09:44 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.52 2020/08/11 05:43:45 skrll Exp $ */
+/* $NetBSD: pmap.c,v 1.53 2020/08/11 06:09:44 skrll Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.52 2020/08/11 05:43:45 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.53 2020/08/11 06:09:44 skrll Exp $");
/*
* Manages physical address maps.
@@ -388,6 +388,8 @@
static void
pmap_page_syncicache(struct vm_page *pg)
{
+ UVMHIST_FUNC(__func__);
+ UVMHIST_CALLED(pmaphist);
#ifndef MULTIPROCESSOR
struct pmap * const curpmap = curlwp->l_proc->p_vmspace->vm_map.pmap;
#endif
@@ -403,9 +405,14 @@
VM_PAGEMD_PVLIST_READLOCK(mdpg);
pmap_pvlist_check(mdpg);
+ UVMHIST_LOG(pmaphist, "pv %jx pv_pmap %jx\n", (uintptr_t)pv,
+ (uintptr_t)pv->pv_pmap, 0, 0);
+
if (pv->pv_pmap != NULL) {
for (; pv != NULL; pv = pv->pv_next) {
#ifdef MULTIPROCESSOR
+ UVMHIST_LOG(pmaphist, "pv %jx pv_pmap %jx\n",
+ (uintptr_t)pv, (uintptr_t)pv->pv_pmap, 0, 0);
kcpuset_merge(onproc, pv->pv_pmap->pm_onproc);
if (kcpuset_match(onproc, kcpuset_running)) {
break;
diff -r 618c98e01f02 -r 845063440de9 sys/uvm/pmap/pmap_tlb.c
--- a/sys/uvm/pmap/pmap_tlb.c Tue Aug 11 05:43:45 2020 +0000
+++ b/sys/uvm/pmap/pmap_tlb.c Tue Aug 11 06:09:44 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap_tlb.c,v 1.34 2020/08/09 06:26:49 skrll Exp $ */
+/* $NetBSD: pmap_tlb.c,v 1.35 2020/08/11 06:09:44 skrll Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.34 2020/08/09 06:26:49 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.35 2020/08/11 06:09:44 skrll Exp $");
/*
* Manages address spaces in a TLB.
@@ -214,6 +214,9 @@
static void
pmap_tlb_pai_check(struct pmap_tlb_info *ti, bool locked_p)
{
+ UVMHIST_FUNC(__func__);
+ UVMHIST_CALLARGS(pmaphist, "(ti=%#jx)", (uintptr_t)ti, 0, 0, 0);
+
#ifdef DIAGNOSTIC
struct pmap_asid_info *pai;
if (!locked_p)
@@ -233,6 +236,7 @@
if (!locked_p)
TLBINFO_UNLOCK(ti);
#endif
+ UVMHIST_LOG(pmaphist, " <-- done", 0, 0, 0, 0);
}
static void
@@ -268,9 +272,13 @@
*/
if (PMAP_TLB_FLUSH_ASID_ON_RESET) {
#ifndef MULTIPROCESSOR
+ UVMHIST_LOG(maphist, " ... asid %u flushed", pai->pai_asid, 0,
+ 0, 0);
tlb_invalidate_asids(pai->pai_asid, pai->pai_asid);
#endif
if (TLBINFO_ASID_INUSE_P(ti, pai->pai_asid)) {
+ UVMHIST_LOG(maphist, " ... asid marked unused",
+ pai->pai_asid, 0, 0, 0);
TLBINFO_ASID_MARK_UNUSED(ti, pai->pai_asid);
ti->ti_asids_free++;
}
@@ -363,13 +371,13 @@
#endif /* MULTIPROCESSOR */
KASSERT(ti == &pmap_tlb0_info);
KASSERT(ti->ti_lock == &pmap_tlb0_lock);
- //printf("ti_lock %p ", ti->ti_lock);
+
mutex_init(ti->ti_lock, MUTEX_DEFAULT, IPL_SCHED);
#if defined(MULTIPROCESSOR) && PMAP_TLB_MAX > 1
kcpuset_create(&ti->ti_kcpuset, true);
kcpuset_set(ti->ti_kcpuset, cpu_index(curcpu()));
#endif
- //printf("asid ");
+
if (ti->ti_asid_max == 0) {
ti->ti_asid_max = pmap_md_tlb_asid_max();
ti->ti_asids_free = TLBINFO_ASID_INITIAL_FREE(ti->ti_asid_max);
@@ -991,12 +999,13 @@
}
#endif
curcpu()->ci_pmap_asid_cur = KERNEL_PID;
- UVMHIST_LOG(maphist, " <-- done (pm=%#jx)", (uintptr_t)pm, 0, 0, 0);
tlb_set_asid(KERNEL_PID);
+
pmap_tlb_pai_check(cpu_tlb_info(curcpu()), false);
#if defined(DEBUG)
pmap_tlb_asid_check();
#endif
+ UVMHIST_LOG(maphist, " <-- done (pm=%#jx)", (uintptr_t)pm, 0, 0, 0);
}
void
Home |
Main Index |
Thread Index |
Old Index