M sys/kern/subr_taskqueue.c @@ -108,6 +108,7 @@ TQ_UNLOCK(struct taskqueue *tq) static __inline void TQ_SLEEP(struct taskqueue *tq, void *ident, const char *wmesg) { + kprintf("[ALY/DEBUG] %s@cpu#%d: tq=%p, ident=%p ...\n", __func__, mycpuid, tq, ident); ssleep(ident, &tq->tq_lock, 0, wmesg, 0); } @@ -615,8 +616,10 @@ taskqueue_thread_loop(void *arg) tq = *tqp; TQ_LOCK(tq); while ((tq->tq_flags & TQ_FLAGS_ACTIVE) != 0) { + kprintf("[ALY/DEBUG] %s@cpu#%d: running tq=%p ...\n", __func__, mycpuid, tq); taskqueue_run(tq, 1); TQ_SLEEP(tq, tq, "tqthr"); + kprintf("[ALY/DEBUG] %s@cpu#%d: tq=%p woken up\n", __func__, mycpuid, tq); } /* rendezvous with thread that asked us to terminate */ @@ -637,6 +640,7 @@ taskqueue_thread_enqueue(void *context) /* Unlock spinlock before wakeup_one() */ TQ_UNLOCK(tq); + kprintf("[ALY/DEBUG] %s@cpu#%d: waking up tq=%p ...\n", __func__, mycpuid, tq); wakeup_one(tq); TQ_LOCK(tq); } $ ps -ax -O nwchan | grep wg_ PID WCHAN TT STAT TIME COMMAND -1 fffff80065c97e68 ?? B0 0:00.03 (wg_taskq_cpu_0) -1 fffff80065c97d60 ?? B1 0:00.18 (wg_taskq_cpu_1) -1 fffff80065c97e10 ?? B2 0:00.02 (wg_taskq_cpu_2) -1 fffff80065c97ec0 ?? B3 0:00.48 (wg_taskq_cpu_3) [ALY/DEBUG] wg_send_keepalive: staged packet=0xfffff800aafd01d0, queue length=1 wg0: Sending keepalive packet to peer 0 [ALY/DEBUG] wg_peer_send_staged: queued packet=0xfffff800aafd01d0 [ALY/DEBUG] taskqueue_thread_enqueue@cpu#1: waking up tq=0xfffff80065c97d60 ... [ALY/DEBUG] wg_encrypt_dispatch@cpu#1: dispatched to cpu=1 [ALY/DEBUG] taskqueue_thread_loop@cpu#1: tq=0xfffff80065c97d60 woken up [ALY/DEBUG] taskqueue_thread_loop@cpu#1: running tq=0xfffff80065c97d60 ... [ALY/DEBUG] wg_softc_encrypt@cpu#1: processing ... [ALY/DEBUG] wg_softc_encrypt@cpu#1: encrypting pkt=0xfffff800aafd01d0 [ALY/DEBUG] wg_mbuf_reset: m=0xfffff800ac9c9a00, flags: 0x8002 -> 0x8002, csum_flags: 0x0 [ALY/DEBUG] taskqueue_thread_enqueue@cpu#1: waking up tq=0xfffff80065c97ec0 ... [ALY/DEBUG] TQ_SLEEP@cpu#1: tq=0xfffff80065c97d60, ident=0xfffff80065c97d60 ... [ALY/DEBUG] wg_send_keepalive: staged packet=0xfffff800aafd01d0, queue length=1 wg0: Sending keepalive packet to peer 0 [ALY/DEBUG] wg_peer_send_staged: queued packet=0xfffff800aafd01d0 [ALY/DEBUG] taskqueue_thread_enqueue@cpu#3: waking up tq=0xfffff80065c97e10 ... [ALY/DEBUG] wg_encrypt_dispatch@cpu#3: dispatched to cpu=2 [ALY/DEBUG] taskqueue_thread_loop@cpu#3: tq=0xfffff80065c97ec0 woken up [ALY/DEBUG] taskqueue_thread_loop@cpu#3: running tq=0xfffff80065c97ec0 ... [ALY/DEBUG] wg_deliver_out@cpu#3: delivering pkt=0xfffff800aafd01d0 [ALY/DEBUG] wg_send: remote=INET 192.168.33.4:6222, control=0, ret=0 [ALY/DEBUG] TQ_SLEEP@cpu#3: tq=0xfffff80065c97ec0, ident=0xfffff80065c97ec0 ... [ALY/DEBUG] wg_send_keepalive: staged packet=0xfffff800aafd01d0, queue length=1 wg0: Sending keepalive packet to peer 0 [ALY/DEBUG] wg_peer_send_staged: queued packet=0xfffff800aafd01d0 [ALY/DEBUG] taskqueue_thread_enqueue@cpu#3: waking up tq=0xfffff80065c97ec0 ... [ALY/DEBUG] wg_encrypt_dispatch@cpu#3: dispatched to cpu=3 [ALY/DEBUG] taskqueue_thread_loop@cpu#3: tq=0xfffff80065c97ec0 woken up [ALY/DEBUG] taskqueue_thread_loop@cpu#3: running tq=0xfffff80065c97ec0 ... [ALY/DEBUG] wg_softc_encrypt@cpu#3: processing ... [ALY/DEBUG] wg_softc_encrypt@cpu#3: encrypting pkt=0xfffff800aafd01d0 [ALY/DEBUG] wg_mbuf_reset: m=0xfffff800ac5f2200, flags: 0x8002 -> 0x8002, csum_flags: 0x0 [ALY/DEBUG] taskqueue_thread_enqueue@cpu#3: waking up tq=0xfffff80065c97ec0 ... [ALY/DEBUG] wg_deliver_out@cpu#3: delivering pkt=0xfffff800aafd01d0 [ALY/DEBUG] wg_send: remote=INET 192.168.33.4:6222, control=0, ret=0 [ALY/DEBUG] TQ_SLEEP@cpu#3: tq=0xfffff80065c97ec0, ident=0xfffff80065c97ec0 ... [ALY/DEBUG] wg_send_keepalive: staged packet=0xfffff800aafd01d0, queue length=1 wg0: Sending keepalive packet to peer 0 [ALY/DEBUG] wg_peer_send_staged: queued packet=0xfffff800aafd01d0 [ALY/DEBUG] taskqueue_thread_enqueue@cpu#3: waking up tq=0xfffff80065c97e68 ... [ALY/DEBUG] wg_encrypt_dispatch@cpu#3: dispatched to cpu=0 [ALY/DEBUG] taskqueue_thread_loop@cpu#3: tq=0xfffff80065c97ec0 woken up [ALY/DEBUG] taskqueue_thread_loop@cpu#3: running tq=0xfffff80065c97ec0 ... [ALY/DEBUG] wg_deliver_out@cpu#3: delivering pkt=0xfffff800aafd01d0 [ALY/DEBUG] wg_send: remote=INET 192.168.33.4:6222, control=0, ret=0 [ALY/DEBUG] TQ_SLEEP@cpu#3: tq=0xfffff80065c97ec0, ident=0xfffff80065c97ec0 ... [ALY/DEBUG] wg_send_keepalive: staged packet=0xfffff800aafd01d0, queue length=1 wg0: Sending keepalive packet to peer 0 [ALY/DEBUG] wg_peer_send_staged: queued packet=0xfffff800aafd01d0 [ALY/DEBUG] taskqueue_thread_enqueue@cpu#3: waking up tq=0xfffff80065c97d60 ... [ALY/DEBUG] wg_encrypt_dispatch@cpu#3: dispatched to cpu=1 [ALY/DEBUG] taskqueue_thread_loop@cpu#3: tq=0xfffff80065c97ec0 woken up [ALY/DEBUG] taskqueue_thread_loop@cpu#3: running tq=0xfffff80065c97ec0 ... [ALY/DEBUG] wg_deliver_out@cpu#3: delivering pkt=0xfffff800aafd01d0 [ALY/DEBUG] wg_send: remote=INET 192.168.33.4:6222, control=0, ret=0 [ALY/DEBUG] TQ_SLEEP@cpu#3: tq=0xfffff80065c97ec0, ident=0xfffff80065c97ec0 ... [ALY/DEBUG] wg_send_keepalive: staged packet=0xfffff800aafd01d0, queue length=1 wg0: Sending keepalive packet to peer 0 [ALY/DEBUG] wg_peer_send_staged: queued packet=0xfffff800aafd01d0 [ALY/DEBUG] taskqueue_thread_enqueue@cpu#3: waking up tq=0xfffff80065c97e10 ... [ALY/DEBUG] wg_encrypt_dispatch@cpu#3: dispatched to cpu=2 [ALY/DEBUG] taskqueue_thread_loop@cpu#3: tq=0xfffff80065c97ec0 woken up [ALY/DEBUG] taskqueue_thread_loop@cpu#3: running tq=0xfffff80065c97ec0 ... [ALY/DEBUG] wg_deliver_out@cpu#3: delivering pkt=0xfffff800aafd01d0 [ALY/DEBUG] wg_send: remote=INET 192.168.33.4:6222, control=0, ret=0 [ALY/DEBUG] TQ_SLEEP@cpu#3: tq=0xfffff80065c97ec0, ident=0xfffff80065c97ec0 ... [ALY/DEBUG] wg_send_keepalive: staged packet=0xfffff800aafd01d0, queue length=1 wg0: Sending keepalive packet to peer 0 [ALY/DEBUG] wg_peer_send_staged: queued packet=0xfffff800aafd01d0 [ALY/DEBUG] taskqueue_thread_enqueue@cpu#3: waking up tq=0xfffff80065c97ec0 ... [ALY/DEBUG] wg_encrypt_dispatch@cpu#3: dispatched to cpu=3 [ALY/DEBUG] taskqueue_thread_loop@cpu#3: tq=0xfffff80065c97ec0 woken up [ALY/DEBUG] taskqueue_thread_loop@cpu#3: running tq=0xfffff80065c97ec0 ... [ALY/DEBUG] wg_softc_encrypt@cpu#3: processing ... [ALY/DEBUG] wg_softc_encrypt@cpu#3: encrypting pkt=0xfffff800aafd01d0 [ALY/DEBUG] wg_mbuf_reset: m=0xfffff800ac5f2a00, flags: 0x8002 -> 0x8002, csum_flags: 0x0 [ALY/DEBUG] taskqueue_thread_enqueue@cpu#3: waking up tq=0xfffff80065c97ec0 ... [ALY/DEBUG] wg_deliver_out@cpu#3: delivering pkt=0xfffff800aafd01d0 [ALY/DEBUG] wg_send: remote=INET 192.168.33.4:6222, control=0, ret=0 [ALY/DEBUG] TQ_SLEEP@cpu#3: tq=0xfffff80065c97ec0, ident=0xfffff80065c97ec0 ... [ALY/DEBUG] wg_send_keepalive: staged packet=0xfffff800aafd01d0, queue length=1 wg0: Sending keepalive packet to peer 0 [ALY/DEBUG] wg_peer_send_staged: queued packet=0xfffff800aafd01d0 [ALY/DEBUG] taskqueue_thread_enqueue@cpu#3: waking up tq=0xfffff80065c97e68 ... [ALY/DEBUG] wg_encrypt_dispatch@cpu#3: dispatched to cpu=0 [ALY/DEBUG] taskqueue_thread_loop@cpu#3: tq=0xfffff80065c97ec0 woken up [ALY/DEBUG] taskqueue_thread_loop@cpu#3: running tq=0xfffff80065c97ec0 ... [ALY/DEBUG] wg_deliver_out@cpu#3: delivering pkt=0xfffff800aafd01d0 [ALY/DEBUG] wg_send: remote=INET 192.168.33.4:6222, control=0, ret=0 [ALY/DEBUG] TQ_SLEEP@cpu#3: tq=0xfffff80065c97ec0, ident=0xfffff80065c97ec0 ...