Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 May 2013 22:52:07 +0200
From:      =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= <roger.pau@citrix.com>
To:        Jilles Tjoelker <jilles@stack.nl>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, freebsd-current@freebsd.org, "current@freebsd.org" <current@freebsd.org>
Subject:   Re: FreeBSD-HEAD gets stuck on vnode operations
Message-ID:  <51A275F7.9030401@citrix.com>
In-Reply-To: <20130526202058.GA40375@stack.nl>
References:  <5190CBEC.5000704@citrix.com> <20130514163149.GS3047@kib.kiev.ua> <51927143.4080102@citrix.com> <201305201434.55406.jhb@freebsd.org> <51A0FA43.2040503@citrix.com> <51A26245.9060707@citrix.com> <20130526202058.GA40375@stack.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On 26/05/13 22:20, Jilles Tjoelker wrote:
> Instead of a pause() that may be too short or too long, how about
> waiting for the necessary lock? In other words, replace the kern_yield()
> call with VI_LOCK(vp); VI_UNLOCK(vp);. This is also the usual approach
> to acquire two locks without imposing an order between them.

Since there might be more than one locked vnode, waiting on a specific
locked vnode seemed rather arbitrary, but I agree that the pause is also
rather arbitrary.

Also, can we be sure that the v_interlock mutex will not be destroyed
while the syncer process is waiting for it to be unlocked?

> I expect blocking on a mutex to be safe enough; a mutex may not be held
> across waiting for hardware or other events.
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51A275F7.9030401>