From owner-freebsd-current@FreeBSD.ORG Sun Jul 8 15:18:03 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85BE6106566B for ; Sun, 8 Jul 2012 15:18:03 +0000 (UTC) (envelope-from imb@protected-networks.net) Received: from sarah.protected-networks.net (sarah.protected-networks.net [IPv6:2001:470:1f07:4e1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 4A1BB8FC0A for ; Sun, 8 Jul 2012 15:18:03 +0000 (UTC) Received: from toshi.auburn.protected-networks.net (toshi.auburn.protected-networks.net [202.12.127.84]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "Iain Butler", Issuer "RSA Class 2 Personal CA" (not verified)) (Authenticated sender: imb@protected-networks.net) by sarah.protected-networks.net (Postfix) with ESMTPSA id 370DA6194; Sun, 8 Jul 2012 11:18:02 -0400 (EDT) DomainKey-Signature: a=rsa-sha1; s=200509; d=protected-networks.net; c=nofws; q=dns; h=message-id:date:from:user-agent:mime-version:to:cc:subject: references:in-reply-to:x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=PHypqx/yeDmX0Bb96iGKz6fYxtxzKoYmbLzZmbjNHDwB5nyzv8MLTKt9b6xUj0xhE aVIa/O3dB2U26iy75x46ZGC+kjPAs2nCdk0KRs9ZHdz8PrIecXI3bu91TGx5SYx Message-ID: <4FF9A4A8.5050903@protected-networks.net> Date: Sun, 08 Jul 2012 11:18:00 -0400 From: Michael Butler User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:13.0) Gecko/20120619 Thunderbird/13.0.1 MIME-Version: 1.0 To: Konstantin Belousov References: <4FF98128.6050607@protected-networks.net> <20120708133455.GX2338@deviant.kiev.zoral.com.ua> <4FF98F21.9060003@protected-networks.net> <20120708143113.GZ2338@deviant.kiev.zoral.com.ua> In-Reply-To: <20120708143113.GZ2338@deviant.kiev.zoral.com.ua> X-Enigmail-Version: 1.4.2 OpenPGP: id=0442D492 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: current@freebsd.org Subject: Re: sleeping thread panic? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2012 15:18:03 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 07/08/12 10:31, Konstantin Belousov wrote: > Catch it next time ? This should be quite reproducable, if real. > > Actually, try this. > > diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c > index 9485fdd..de33afc 100644 > --- a/sys/vm/vm_pageout.c > +++ b/sys/vm/vm_pageout.c > @@ -1030,7 +1030,6 @@ rescan0: > ++pageout_lock_miss; > if (object->flags & OBJ_MIGHTBEDIRTY) > vnodes_skipped++; > - vm_page_lock_queues(); > goto unlock_and_continue; > } > KASSERT(mp != NULL, > @@ -1041,7 +1040,6 @@ rescan0: > if (vget(vp, LK_EXCLUSIVE | LK_TIMELOCK, > curthread)) { > VM_OBJECT_LOCK(object); > - vm_page_lock_queues(); > ++pageout_lock_miss; > if (object->flags & OBJ_MIGHTBEDIRTY) > vnodes_skipped++; > @@ -1082,15 +1080,17 @@ rescan0: > * If the page has become held it might > * be undergoing I/O, so skip it > */ > + KASSERT(queues_locked, ("unlocked queues 2")); > + mtx_assert(&vm_page_queue_mtx, MA_OWNED); > if (m->hold_count) { > - vm_page_lock_queues(); > - queues_locked = TRUE; > vm_page_unlock(m); > vm_page_requeue(m); > if (object->flags & OBJ_MIGHTBEDIRTY) > vnodes_skipped++; > goto unlock_and_continue; > } > + vm_page_unlock_queues(); > + queues_locked = FALSE; > } > > /* > Just waiting for the second of two attached RAID arrays to finish rebuilding and I'll give this a shot - thanks! imb -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/5pKgACgkQQv9rrgRC1JKXAgCdEJhZIKRmLbAzIROKmN2WuZCU mb4AnR3Z+BrN7uqwYnXwubBEBx/QlWf8 =Ne6G -----END PGP SIGNATURE-----