From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 06:56:31 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 D464F16A420 for ; Fri, 4 Nov 2005 06:56:31 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web35704.mail.mud.yahoo.com (web35704.mail.mud.yahoo.com [66.163.179.158]) by mx1.FreeBSD.org (Postfix) with SMTP id 1A7E943D48 for ; Fri, 4 Nov 2005 06:56:31 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 9594 invoked by uid 60001); 4 Nov 2005 06:56:30 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=YyEtfQTpEi9/vaQJdTKeHfVbJNrsyDGEM2JbbNafddEuYI0hs1CKCSsN2AMdSbpWoGh4x41jvv+hilI3Y3t7Th/RmXavQSEh9WOT3z9TS3uVZFh9W+a6P/x1vY7Y/WbNmYqZ61yWJwEYzdoxs8RJ0jm1ALhFxqVc1nuj5Zjjtns= ; Message-ID: <20051104065630.9592.qmail@web35704.mail.mud.yahoo.com> Received: from [202.79.62.15] by web35704.mail.mud.yahoo.com via HTTP; Thu, 03 Nov 2005 22:56:30 PST Date: Thu, 3 Nov 2005 22:56:30 -0800 (PST) From: kamal kc To: Giorgos Keramidas In-Reply-To: <20051103145729.GA2088@flame.pc> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: freebsd , freebsd 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 06:56:32 -0000 > > for my compression/decompression i use string > tables and temporary > > buffers which take about 14KB of memory per > packet. > > If you're allocating 14 KB of data just to send > (approximately) 1.4 KB > and then you throw away the 14 KB immediately, it > sounds terrible. yes that's true. since i am using the adaptive LZW compression scheme it requires construction of string table for compression/decompression. So an ip packet of size 1500 bytes requires a table of size (4KB + 4KB + 2KB =12KB). further still i copy the ip packet data in another data buffer (about 1.4KB) and then compress it. So all this adds up to about 14KB. Right now i can't do with less than 14KB. as i said before the compression/decompression works fine. but soon the kernel would panic with one of the vm_fault: error message. what would be the best possible way to allocate/deallocate 14KB memory per packet without causing vm_faults ?? is there anything i am missing ?? thanks kamal __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com