diff options
author | Colin Percival <cperciva@FreeBSD.org> | 2017-12-31 09:23:52 +0000 |
---|---|---|
committer | Colin Percival <cperciva@FreeBSD.org> | 2017-12-31 09:23:52 +0000 |
commit | 8b8a7c43a9ac39b9765c7ac3d4615ee5991c5126 (patch) | |
tree | 4cabe2cbac73cabccaa999b19e28622136eec9cc | |
parent | 82614df42c3f81147eae28c8ca58961679f604c5 (diff) | |
download | src-test2-8b8a7c43a9ac39b9765c7ac3d4615ee5991c5126.tar.gz src-test2-8b8a7c43a9ac39b9765c7ac3d4615ee5991c5126.zip |
Notes
-rw-r--r-- | sys/geom/geom_event.c | 5 | ||||
-rw-r--r-- | sys/kern/subr_autoconf.c | 4 | ||||
-rw-r--r-- | sys/kern/vfs_mountroot.c | 4 |
3 files changed, 13 insertions, 0 deletions
diff --git a/sys/geom/geom_event.c b/sys/geom/geom_event.c index e9eed290fdae..b4b902b3495a 100644 --- a/sys/geom/geom_event.c +++ b/sys/geom/geom_event.c @@ -87,9 +87,11 @@ g_waitidle(void) g_topology_assert_not(); mtx_lock(&g_eventlock); + TSWAIT("GEOM events"); while (!TAILQ_EMPTY(&g_events)) msleep(&g_pending_events, &g_eventlock, PPAUSE, "g_waitidle", hz/5); + TSUNWAIT("GEOM events"); mtx_unlock(&g_eventlock); curthread->td_pflags &= ~TDP_GEOM; } @@ -266,6 +268,7 @@ one_event(void) ep->func(ep->arg, 0); g_topology_assert(); mtx_lock(&g_eventlock); + TSRELEASE("GEOM events"); TAILQ_REMOVE(&g_events, ep, events); ep->flag &= ~EV_INPROGRESS; if (ep->flag & EV_WAKEUP) { @@ -324,6 +327,7 @@ g_cancel_event(void *ref) break; if (ep->ref[n] != ref) continue; + TSRELEASE("GEOM events"); TAILQ_REMOVE(&g_events, ep, events); ep->func(ep->arg, EV_CANCEL); mtx_assert(&g_eventlock, MA_OWNED); @@ -367,6 +371,7 @@ g_post_event_x(g_event_t *func, void *arg, int flag, int wuflag, struct g_event ep->func = func; ep->arg = arg; mtx_lock(&g_eventlock); + TSHOLD("GEOM events"); TAILQ_INSERT_TAIL(&g_events, ep, events); mtx_unlock(&g_eventlock); wakeup(&g_wait_event); diff --git a/sys/kern/subr_autoconf.c b/sys/kern/subr_autoconf.c index 278393a4cb7f..6a998a533801 100644 --- a/sys/kern/subr_autoconf.c +++ b/sys/kern/subr_autoconf.c @@ -155,6 +155,7 @@ boot_run_interrupt_driven_config_hooks(void *dummy) run_interrupt_driven_config_hooks(); /* Block boot processing until all hooks are disestablished. */ + TSWAIT("config hooks"); mtx_lock(&intr_config_hook_lock); warned = 0; while (!TAILQ_EMPTY(&intr_config_hook_list)) { @@ -168,6 +169,7 @@ boot_run_interrupt_driven_config_hooks(void *dummy) } } mtx_unlock(&intr_config_hook_lock); + TSUNWAIT("config hooks"); } SYSINIT(intr_config_hooks, SI_SUB_INT_CONFIG_HOOKS, SI_ORDER_FIRST, @@ -183,6 +185,7 @@ config_intrhook_establish(struct intr_config_hook *hook) { struct intr_config_hook *hook_entry; + TSHOLD("config hooks"); mtx_lock(&intr_config_hook_lock); TAILQ_FOREACH(hook_entry, &intr_config_hook_list, ich_links) if (hook_entry == hook) @@ -239,6 +242,7 @@ config_intrhook_disestablish(struct intr_config_hook *hook) if (next_to_notify == hook) next_to_notify = TAILQ_NEXT(hook, ich_links); TAILQ_REMOVE(&intr_config_hook_list, hook, ich_links); + TSRELEASE("config hooks"); /* Wakeup anyone watching the list */ wakeup(&intr_config_hook_list); diff --git a/sys/kern/vfs_mountroot.c b/sys/kern/vfs_mountroot.c index 89641b6dbb56..4b1a56ccddef 100644 --- a/sys/kern/vfs_mountroot.c +++ b/sys/kern/vfs_mountroot.c @@ -176,6 +176,7 @@ root_mount_hold(const char *identifier) h = malloc(sizeof *h, M_DEVBUF, M_ZERO | M_WAITOK); h->who = identifier; mtx_lock(&root_holds_mtx); + TSHOLD("root mount"); LIST_INSERT_HEAD(&root_holds, h, list); mtx_unlock(&root_holds_mtx); return (h); @@ -190,6 +191,7 @@ root_mount_rel(struct root_hold_token *h) mtx_lock(&root_holds_mtx); LIST_REMOVE(h, list); + TSRELEASE("root mount"); wakeup(&root_holds); mtx_unlock(&root_holds_mtx); free(h, M_DEVBUF); @@ -956,8 +958,10 @@ vfs_mountroot_wait(void) printf(" %s", h->who); printf("\n"); } + TSWAIT("root mount"); msleep(&root_holds, &root_holds_mtx, PZERO | PDROP, "roothold", hz); + TSUNWAIT("root mount"); } TSEXIT(); |