From owner-freebsd-net Mon Sep 30 15:11:15 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 66B0D37B401 for ; Mon, 30 Sep 2002 15:11:14 -0700 (PDT) Received: from scout.networkphysics.com (fw.networkphysics.com [205.158.104.176]) by mx1.FreeBSD.org (Postfix) with ESMTP id 074A143E7B for ; Mon, 30 Sep 2002 15:11:14 -0700 (PDT) (envelope-from pavel@networkphysics.com) Received: from NetworkPhysics.COM (valiant.fractal.networkphysics.com [10.10.0.243]) by scout.networkphysics.com (8.11.5/8.11.5) with ESMTP id g8UMBDR67174 for ; Mon, 30 Sep 2002 15:11:13 -0700 (PDT) Message-Id: <200209302211.g8UMBDR67174@scout.networkphysics.com> To: freebsd-net@FreeBSD.ORG Subject: Re: Question about mbuf allocation and VM routines In-Reply-To: Message from Tom Pavel of "Fri, 27 Sep 2002 15:06:18 PDT." <200209272206.g8RM6IR43626@scout.networkphysics.com> Date: Mon, 30 Sep 2002 15:11:13 -0700 From: Tom Pavel Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >>>>> On Fri, 27 Sep 2002, Tom Pavel writes: > However, as shown in this excerpt m_mballoc() calls kmem_malloc(), > which from its comments expects to be called at splhigh (or perhaps > splvm?). Ultimately, my call chain leads me to > vm_map_entry_create(mb_map), and I fear that the resulting > zalloc()/zfree() is interrupted by something else at splvm, and > thereby corrupts the kmapentzone free list. That would be consistent > with the crash I've seen. > > So, my question is whether the above analysis makes sense, and whether > the kmem_malloc(M_NOWAIT) call in m_mballoc() should be wrapped in > splvm. I assume the M_WAITOK call should not be wrapped, but I > haven't thought that one through. Any other insights about this? Thanks to Jeffrey Hsu, I realized that I've just been suffering from a bit of versionitis. I wanted to follow up here for the benefit of the archives. This problem I posited is indeed possible in the 4.2-based systems I'm using, but it was fixed in rev 1.187.2.5 of vm_map.c in Feb 2001 (before 4.3). I was confused about whether we'd also seen this in our 4.6-based systems and it turns out that I didn't read the 4.2/4.6 diffs carefully enough. Sorry for any confusion... Tom Pavel Network Physics pavel@networkphysics.com / pavel@alum.mit.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message