From: Andi Kleen <ak@muc.de>
To: Andrew Morton <akpm@zip.com.au>
Cc: linux-kernel@vger.kernel.org
Subject: Re: khttpd rotten?
Date: 10 May 2002 12:20:17 +0200 [thread overview]
Message-ID: <m3elgk8ftq.fsf@averell.firstfloor.org> (raw)
In-Reply-To: <20020509114009.GD3855@higherplane.net> <20020509.042938.78984470.davem@redhat.com> <3CDACE73.6692A31E@zip.com.au>
Andrew Morton <akpm@zip.com.au> writes:
> "David S. Miller" wrote:
> >
> > From: john slee <indigoid@higherplane.net>
> > Date: Thu, 9 May 2002 21:40:09 +1000
> >
> > tux is more an application than an interface or mechanism. applications
> > historically haven't been distributed as part of the main kernel tree.
> >
> > Arguable nfsd is an application.
> >
> > Providing a direct in-kernel link between the page cache and providing
> > content (be it HTTP, FTP, NFS files, whatever) over sockets is a very
> > powerful concept.
>
> We want to expose all the zerocopy infrastructure to
> userspace so all relevant applications can benefit.
It is basically impossible without hardware support/major stack changes to
do it securely for networking RX. The problem is that to put data directly
from the NIC into an user space address range the NIC already needs
to demultiplex the sockets before it starts to DMA.
With kernel space applications you can just DMA into a shared buffer
like it is currently done and give whoever ends up to be the socket owner
that shared buffer.
For userspace you would need to put it into an page aligned buffer and
change the page tables of the user space process, but especially on SMP
that is usually slower than just copying. Managing the stuff in a shared
memory segment is also likely not secure
[There is a special hack in the stack to do it for network sniffing,
but it is not general purpose enough for real protocols]
Zerocopy TX is different of course and easier and can be exposed to user
space. The natural interface for that is POSIX aio; I believe one of the
kernel aio patchkits floating around already does it.
-Andi
next prev parent reply other threads:[~2002-05-10 10:20 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-06 0:28 khttpd rotten? Dan Kegel
2002-05-06 2:14 ` David S. Miller
2002-05-06 2:39 ` Dan Kegel
2002-05-06 10:23 ` Christoph Hellwig
2002-05-06 11:28 ` [PATCH] " Dan Kegel
2002-05-06 17:23 ` Luigi Genoni
2002-05-09 9:49 ` David S. Miller
2002-05-09 10:09 ` Christoph Hellwig
2002-05-09 13:04 ` Luigi Genoni
2002-05-11 0:13 ` Ken Brownfield
2002-05-06 14:17 ` Tux in main kernel tree? (was khttpd rotten?) Roy Sigurd Karlsbakk
2002-05-06 16:08 ` Andy Carlson
2002-05-06 23:35 ` Anton Blanchard
2002-05-07 14:42 ` Alan Cox
2002-05-07 15:03 ` Andrea Arcangeli
2002-05-07 15:26 ` Alan Cox
2002-05-07 15:38 ` Andrea Arcangeli
2002-05-07 16:02 ` Luigi Genoni
2002-05-06 17:21 ` Dan Kegel
2002-05-06 18:42 ` John Stoffel
2002-05-06 19:07 ` Diego Calleja
2002-05-06 19:18 ` Cort Dougan
2002-05-06 20:47 ` Michael Rothwell
2002-05-09 11:20 ` Appications in kernelspace (was:Tux in main kernel tree?) Anders Peter Fugmann
2002-05-06 21:52 ` Tux in main kernel tree? (was khttpd rotten?) Paul Jakma
2002-05-09 11:28 ` john slee
2002-05-07 3:00 ` J Sloan
2002-05-09 11:40 ` khttpd rotten? john slee
2002-05-09 11:29 ` David S. Miller
2002-05-09 19:30 ` Andrew Morton
2002-05-09 19:35 ` David S. Miller
2002-05-09 19:39 ` Martin Dalecki
2002-05-10 10:20 ` Andi Kleen [this message]
2002-05-10 10:49 ` David S. Miller
2002-05-09 20:12 ` Ian Molton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3elgk8ftq.fsf@averell.firstfloor.org \
--to=ak@muc.de \
--cc=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox