From owner-freebsd-current@FreeBSD.ORG Sun Jul 10 11:10:35 2005 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CA3A216A41C; Sun, 10 Jul 2005 11:10:35 +0000 (GMT) (envelope-from antony.t.curtis@ntlworld.com) Received: from mta08-winn.ispmail.ntl.com (mta08-winn.ispmail.ntl.com [81.103.221.48]) by mx1.FreeBSD.org (Postfix) with ESMTP id 79CD243D45; Sun, 10 Jul 2005 11:10:33 +0000 (GMT) (envelope-from antony.t.curtis@ntlworld.com) Received: from aamta12-winn.ispmail.ntl.com ([81.103.221.35]) by mta08-winn.ispmail.ntl.com with ESMTP id <20050710111035.DXPJ889.mta08-winn.ispmail.ntl.com@aamta12-winn.ispmail.ntl.com>; Sun, 10 Jul 2005 12:10:35 +0100 Received: from pcgem.xiphis.org ([81.103.110.177]) by aamta12-winn.ispmail.ntl.com with ESMTP id <20050710111032.CGNI4721.aamta12-winn.ispmail.ntl.com@pcgem.xiphis.org>; Sun, 10 Jul 2005 12:10:32 +0100 From: Antony T Curtis To: Norikatsu Shigemura In-Reply-To: <200507100439.j6A4dlMK074874@sakura.ninth-nine.com> References: <20050704010715.A36404@saturn.kn-bremen.de> <200507040037.j640bg0v085158@gate.bitblocks.com> <200507100439.j6A4dlMK074874@sakura.ninth-nine.com> Content-Type: text/plain Date: Sun, 10 Jul 2005 12:10:28 +0100 Message-Id: <1120993828.46929.7.camel@pcgem.xiphis.org> Mime-Version: 1.0 X-Mailer: Evolution 2.2.1.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: Craig Boston , jhb@FreeBSD.org, alc@FreeBSD.org, jeff@FreeBSD.org, qemu-devel@nongnu.org, freebsd-current@FreeBSD.org, Bakul Shah , Juergen Lock Subject: Re: [Qemu-devel] kqemu freebsd host smp problems? 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, 10 Jul 2005 11:10:35 -0000 On Sun, 2005-07-10 at 13:39 +0900, Norikatsu Shigemura wrote: > On Sun, 03 Jul 2005 17:37:42 -0700 > Bakul Shah wrote: > > Lock writes: > > > Is kqemu and the freebsd wrapper smp aware? I just saw this panic > > > report again, > > > http://lists.freebsd.org/pipermail/freebsd-current/2005-May/050161.html > > > and noticed it apparently happened with an smp kernel. > > My guess is > > .d_flags = D_NEEDGIANT, > > needs to be added to the initializer of kqemu_cdevsw for the > > freebsd-current case. AFAIK this flag ensures only one > > thread can be in this driver at a time (but caveat emptor: I > > don't play in the kernel these days). > > I confirmed that qemu on latest FreeBSD 6-current got more > stability!!, but more little slowly:-( and a panic:-( too. IMO, That flag is not the cause of the panics and that it should(tm) work without requiring GIANT... I think it is possible that the kqemu code is freeing a page without unlocking it so that when another process does file IO which requires pages to be allocated, attempts to wire those pages results in failure and so a panic occurrs. Perhaps if a different method for allocating memory rather than contigmalloc/contigfree should be used by the kernel module. Offtopic - but am I the only person who has modified the if_tap driver to permit opening by non-superuser? -- Antony T Curtis, BSc. UNIX, Linux, *BSD, Networking antony.t.curtis@ntlworld.com C++, J2EE, Perl, MySQL, Apache IT Consultancy.