Date: Tue, 30 Dec 2014 10:48:31 +0100 From: Hans Petter Selasky <hps@selasky.org> To: Chris H <bsd-lists@bsdforge.com>, Warren Block <wblock@wonkity.com> Cc: =?windows-1252?Q?Jean-S=E9bastienP=E9dron?= <jean-sebastien.pedron@dumbbell.fr>, freebsd-current@freebsd.org Subject: Re: HEADS UP: Enabling vt(4) by default Message-ID: <54A274EF.2030903@selasky.org> In-Reply-To: <54A1B383.1040902@selasky.org> References: <544E7679.7070207@FreeBSD.org> <54590B3E.2070701@dumbbell.fr> <f52865dc55453b0079591a1782e72a77@ultimatedns.net>, <20141105101951.48542120@ernst.home> <f583517ff2e4ef8bae754a95108b4b1c@ultimatedns.net>, <alpine.BSF.2.11.1411050813040.53621@wonkity.com> <b790a1f9cfe6c53c96e36aed2479abce@ultimatedns.net>, <alpine.BSF.2.11.1411051250590.40770@wonkity.com> <bdd3ce608647ba4bf21b513ab781675a@ultimatedns.net>, <545A96D1.9070600@selasky.org> <9c1df797dde6628b43661c0356d9103f@ultimatedns.net> <54A1B383.1040902@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54A274EF.2030903>