Re: HEADS UP: Enabling vt(4) by default

From: Hans Petter Selasky <hps_at_selasky.org>
Date: Tue, 30 Dec 2014 10:48:31 +0100
Hi,

I just had a quick look at "vt_core.c" with regard to callouts. And have 
the following comments:

1) Make sure callout_reset(), callout_schedule() and callout_stop() is 
always called locked. When no lock is specified, that means Giant!

2) callout_drain() must have an unlocked sleeping context, else use 
callout_stop() with the mutex specified in callout_init_mtx() to get 
atomicity.

For now adding MTX_RECURSE to "mtx_init(&main_vd->vd_lock, "vtdev", 
NULL, MTX_DEF | MTX_RECURSE)" solved my problem temporarily, because 
callout_drain() tried to get the vd_lock, which was already taken.

--HPS
Received on Tue Dec 30 2014 - 08:47:55 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:54 UTC