From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 11 03:24:45 2006 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 4C04716A41F for ; Wed, 11 Jan 2006 03:24:45 +0000 (GMT) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2905A43D75 for ; Wed, 11 Jan 2006 03:24:32 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.23.146]) ([10.251.23.146]) by a50.ironport.com with ESMTP; 10 Jan 2006 19:24:32 -0800 X-IronPort-Anti-Spam-Filtered: true Message-ID: <43C47A6F.4070903@elischer.org> Date: Tue, 10 Jan 2006 19:24:31 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.11) Gecko/20050727 X-Accept-Language: en-us, en MIME-Version: 1.0 To: kamal kc References: <20060111015504.48492.qmail@web30015.mail.mud.yahoo.com> In-Reply-To: <20060111015504.48492.qmail@web30015.mail.mud.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd Subject: Re: using get_system_info() - obtaining system load averages 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: Wed, 11 Jan 2006 03:24:45 -0000 kamal kc wrote: > >actually the thing is , i have put some code in the >bridge.c >routine that attempts to compress/decompress ip >packets. > >i don't know if it was a good idea since i am just a >beginner >in programming in the kernel and have a little >knowledge >regarding it. > >after i put my code i got a very high amount >of interrupts (irq 21: xl1 interrupts) that overloads >the >cpu withing seconds if i pump about 4Mbps traffic >through it. > >so i thought as a temp solution that i could turn off >the >compression if ever the cpu gets overloaded and that's >it. > >But after a second thought--> > the very idea of putting the large compression >routine >in the bridge code now seems awkward to me. since the >compression >takes time and putting the code in the bridge may be >causing high interrupts i now think if i can do the >compression >stuffs in separate thread/process than in the bridge >process itself. > >but right now i don't know how do i create a separate >process/thread, >what are the routines that i need to implement for >this.. >and also how to dispatch control from the bridge >process to a new >process without blocking. i am looking into these >stuffs and >hope i find something from the sources but it is >getting really >difficult ... > >maybe you people could have something to say, any >advice >on whether i am doing the right stuffs would be >greatly >helpful to me .. > > > you could bridge through a userland process using netgraph. I've done it.. it does work. (doing other things than compression) check out netgraph bridging..