From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 4 23:04:10 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 705111065673 for ; Tue, 4 Aug 2009 23:04:10 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outP.internet-mail-service.net (outp.internet-mail-service.net [216.240.47.239]) by mx1.freebsd.org (Postfix) with ESMTP id 516A48FC12 for ; Tue, 4 Aug 2009 23:04:10 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 69F74B9857; Tue, 4 Aug 2009 16:04:10 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 6C6322D6006; Tue, 4 Aug 2009 16:04:09 -0700 (PDT) Message-ID: <4A78BE7D.1010902@elischer.org> Date: Tue, 04 Aug 2009 16:04:29 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 To: Maslan 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> <319cceca0908041536g71e416dao13864b7b220fb89a@mail.gmail.com> In-Reply-To: <319cceca0908041536g71e416dao13864b7b220fb89a@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: =?ISO-8859-1?Q?Dag-Erling_Sm?=, =?ISO-8859-1?Q?=F8rgrav?= , Pawel Jakub Dawidek , 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 23:04:10 -0000 Maslan wrote: >> 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. > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" have a look at the netgraph modules. There is a module called ksocket that allows other netgraph modules to use sockets. more than one person has implemented an in-kernel http server in a netgraph module.