From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 18 13:52:44 2005 Return-Path: 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 941AC16A4CE for ; Tue, 18 Jan 2005 13:52:44 +0000 (GMT) Received: from node15.coopprint.com (node15.cooperativeprinting.com [208.4.77.15]) by mx1.FreeBSD.org (Postfix) with SMTP id D75E743D62 for ; Tue, 18 Jan 2005 13:52:43 +0000 (GMT) (envelope-from ryans@gamersimpact.com) Received: (qmail 99846 invoked by uid 0); 18 Jan 2005 13:50:50 -0000 Received: from unknown (HELO ?192.168.0.5?) (63.231.157.250) by node15.coopprint.com with SMTP; 18 Jan 2005 13:50:50 -0000 Message-ID: <41ED14B0.8070600@gamersimpact.com> Date: Tue, 18 Jan 2005 07:52:48 -0600 From: Ryan Sommers User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: - Felix - References: <002201c4fd4a$c5a81230$0700a8c0@felix> In-Reply-To: <002201c4fd4a$c5a81230$0700a8c0@felix> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: Kernel mode programming X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jan 2005 13:52:44 -0000 - Felix - wrote: > Hi everyone, > > Doing lot of syscalls interrupts in a soft seems to take quite a long time, and seriously slow performances. As far as you can't reduce the syscall amount, is there any way to run apps in kernel mode, in order to call sysfonctions directly ? Perhaps by re-writing softs in kernel modules ? > > thanks for your time. Yes, it is possible to write loadable kernel modules. As far as if your programs can be rewritten as kernel modules and achieve better performance that's entirely dependent on what you are doing. What type of syscalls are you executing? What is the rate at which you are calling them? If you are calling a syscall on the same arguments thousands of times could you implement some sort of cache system for syscall results? In my opinion it's bad practice to just throw a program into the kernel to get better performance without evaluating why the performance is bad. Making it a kernel module invites all kinds of security and stability issues. -- Ryan Sommers ryans@gamersimpact.com