From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 09:49:09 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 58E7216A41F for ; Fri, 4 Nov 2005 09:49:09 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from mail25.syd.optusnet.com.au (mail25.syd.optusnet.com.au [211.29.133.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E7C443D46 for ; Fri, 4 Nov 2005 09:49:08 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail25.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id jA49n5H4017949 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 4 Nov 2005 20:49:06 +1100 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1]) by cirb503493.alcatel.com.au (8.12.10/8.12.10) with ESMTP id jA49n5Hh069040; Fri, 4 Nov 2005 20:49:05 +1100 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost) by cirb503493.alcatel.com.au (8.12.10/8.12.9/Submit) id jA49n5dq069039; Fri, 4 Nov 2005 20:49:05 +1100 (EST) (envelope-from pjeremy) Date: Fri, 4 Nov 2005 20:49:05 +1100 From: Peter Jeremy To: kamal kc Message-ID: <20051104094904.GL39882@cirb503493.alcatel.com.au> References: <20051103145729.GA2088@flame.pc> <20051104065630.9592.qmail@web35704.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051104065630.9592.qmail@web35704.mail.mud.yahoo.com> User-Agent: Mutt/1.4.2.1i X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc Cc: freebsd , Giorgos Keramidas Subject: Re: allocating 14KB memory per packet compression/decompression results in vm_fault X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2005 09:49:09 -0000 [dropping -net] On Thu, 2005-Nov-03 22:56:30 -0800, kamal kc wrote: >as i said before the compression/decompression works >fine. but soon the kernel would panic with one >of the vm_fault: error message. What's the exact panic and traceback? Have you enabled the various sanity checks (WITNESS, DEBUG_MEMGUARD, INVARIANTS)? >what would be the best possible way to >allocate/deallocate 14KB memory per packet without >causing vm_faults ?? The most efficient way would be to statically allocate the dictionary and string tables. The downside is that you then need to serialise the [de]compression. You could look at zone(9) as an alternative to malloc(9). >is there anything i am missing ?? - Are you correctly allocating the mbuf for the outgoing packet correctly? - Are you correctly freeing the mbuf for the incoming packet? - Are you sure that you're not writing outside the bounds of one of the memory blocks you're allocating? -- Peter Jeremy