HEADS UP: Enabling vt(4) by default
Hans Petter Selasky
hps at selasky.org
Tue Dec 30 09:47:55 UTC 2014
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
More information about the freebsd-current
mailing list