Re: generalizing khttpd
H. Peter Anvin (hpa@transmeta.com)
11 Jun 1999 02:29:00 GMT
Followup to: <37606048.82A981AB@wserv.com>
By author: Jordan Mendelson <jordy@wserv.com>
In newsgroup: linux.dev.kernel
>
> Christoph Lameter wrote:
> >
> > You are talking about a function call taking a filehandle and a socket
> > which would send the file contents directly onto the socket right?
> >
> > something like send_file(filehandle,sockethandle)
>
> If that's the only thing khttpd gains from being in the kernel then
> yes. Is the sendfile syscall which exists right now somehow inferior
> to khttpd in terms of raw speed and efficiency of outputing a file
> to a socket?
>
> I was under the impression that khttpd had other reasons for going
> kernel mode such as faster ability to get timestamps and what not on
> the file itself.
>
Actually, the main reason would be to avoid the context switch to user
mode and back after the packet arrives; in addition, on the more
exotic level it would be possible for it to do odd thinks like keep
things cached in ready-made skbuffs.
-hpa
--
"The user's computer downloads the ActiveX code and simulates a 'Blue
Screen' crash, a generally benign event most users are familiar with
and that would not necessarily arouse suspicions."
-- Security exploit description on http://www.zks.net/p3/how.asp
-
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/