From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 4 22:37:00 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1908A1065670; Tue, 4 Aug 2009 22:37:00 +0000 (UTC) (envelope-from maslanbsd@gmail.com) Received: from mail-fx0-f210.google.com (mail-fx0-f210.google.com [209.85.220.210]) by mx1.freebsd.org (Postfix) with ESMTP id 7040C8FC0C; Tue, 4 Aug 2009 22:36:59 +0000 (UTC) (envelope-from maslanbsd@gmail.com) Received: by fxm6 with SMTP id 6so2214060fxm.43 for ; Tue, 04 Aug 2009 15:36:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=6/+ckhG3Ggh67At+ihJgl/+j2bz5AX5D1QpDF4fdTR4=; b=OI2Q4AUgjwlI1Jjpl/GpNrAe1iFWjOnMsVQPnnjVrUlke9OMMROB3IDeH71el1OjxP fWW4EgS+Aeh/urDNYyIw8tHZbvGhRpHxXQRiU0EjyJAvxNUUI47/m5rpBkZkOFDshNNF Z2qOcqVYwgKy3oMUtlLjrJMBp90xUjN4CkpF0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Ki2WQRp3wGXL3af5z2+/wu+OWgC3cGqyVYSZclU6OAsEFXC5p5sUFen5zch6liH0vU FQiQQ5VZGqOqwcRyCJJaqcjWqJPrCRXhV++1TZ6TPcx0VHimwE72uBfxixy8mT4VGER7 zVDCU6AVwhf1FhZBSMXA08rHU12wlkMe7Ln1A= MIME-Version: 1.0 Received: by 10.204.118.207 with SMTP id w15mr182950bkq.126.1249425418403; Tue, 04 Aug 2009 15:36:58 -0700 (PDT) In-Reply-To: <20090804210457.GF2181@garage.freebsd.pl> References: <319cceca0908030119i3432a495ya60aa431dab0e1b1@mail.gmail.com> <864ospvvkv.fsf@ds4.des.no> <319cceca0908031043x6bfe5771wa73553dce922756a@mail.gmail.com> <86eirs65gb.fsf@ds4.des.no> <319cceca0908031425r3516de29q34807cdf2c7489ed@mail.gmail.com> <20090804210457.GF2181@garage.freebsd.pl> Date: Wed, 5 Aug 2009 01:36:58 +0300 Message-ID: <319cceca0908041536g71e416dao13864b7b220fb89a@mail.gmail.com> From: Maslan To: Pawel Jakub Dawidek Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: =?ISO-8859-1?Q?Dag=2DErling_Sm=F8rgrav?= , FreeBSD Hackers Subject: Re: sosend() and mbuf 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: Tue, 04 Aug 2009 22:37:00 -0000 > When you did kern_open() without creating kernel thread, it worked, > because kern_open() used file descriptor table from your current > (userland) process. In FreeBSD 7.x kthread_create() creates a process > without file descriptor table, so you can't use kern_open() and actually > you shouldn't do this either. I understood now. Thanks > Take a look at sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c, > where you can find functions to do what you want. > > I guess you already considered doing all this in userland?:) I'm not deploying this http server for any production, i just want to study its performance compared to a userland http server. And to experience FreeBSD kernel hacking. I'm still trying to figure out, how to play with soreceive() now. But Thanks a lot, It's now clearer for me.