Date: Tue, 8 Jun 1999 10:07:01 -0700 (PDT) From: Linus Torvalds <torvalds@transmeta.com> To: Richard Gooch <rgooch@atnf.csiro.au> Subject: Re: Preparations for ZD's upcoming Apache/Linux benchmark On Tue, 8 Jun 1999, Richard Gooch wrote: > > Linus Torvalds writes: > > And I'm very interested in people doing kernel modules for static > > content serving with fall-backs to Apache etc. That is, to a large > > degree, what NT seems to be doing, with IIS-only magic system calls > > etc. And we can do it so much more cleanly. > > Does that mean you'd accept a patch which did this? I've already taken a quick look at the khttpd that Arjan van de Ven did, and it looked very interesting. The regular kernel part of it was simply a matter of exporting the existing "do_generic_read()" functionality, something that I have no problem with at all (it's something that others are looking into for the kernel NFS deamon anyway - so it's not as if this would be a special case, even). > What about the arguments that this would be increased kernel bloat/do > it in user space, etc? I certainly feel that it should be just a kernel module, with all the hard cases punted down to user space - doing just the static content in kernel. The down-punting is the "hard" case, and through a quick look even that doesn't actually look that bad. For example, to me it looks like it would be trivial to punt it down to user space by having the kernel module do only "peek" operations on the data list, and if it encounters a request it can't handle, it just pushes the socket onto a accept-queue - so the user space side would just accept the socket as if it came to it directly. So you could even use a pretty much unmodified apache (or other) web server to do all the non-static cases - although it would probably imply that the user-level deamon would be better off being optimized for the "uncommon" case because it never sees the common case. So yes, I think this is a really solid approach. I can't guarantee that it works, but the initial kernel httpd by Arjan is _very_ small, making me rather optimistic that it's a good idea.. Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/