From: Avi Kivity <avi@redhat.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Elad Lahav <elahav@uwaterloo.ca>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] Implementation of the sendgroup() system call
Date: Mon, 04 May 2009 10:30:33 +0300 [thread overview]
Message-ID: <49FE9999.7090103@redhat.com> (raw)
In-Reply-To: <87eiv5ibnd.fsf@basil.nowhere.org>
Andi Kleen wrote:
> Elad Lahav <elahav@uwaterloo.ca> writes:
>
>
>> The attached patch contains an implementation of sendgroup(), a system
>> call that allows a UDP packet to be transmitted efficiently to
>> multiple recipients. Use cases for this system call include
>> live-streaming and multi-player online games.
>> The basic idea is that the caller maintains a group - a list of IP
>> addresses and UDP ports - and calls sendgroup() with the group list
>> and a common payload. Optionally, the call allows for per-recipient
>> data to be prepended or appended to the shared block. The data is
>> copied once in the kernel into an allocated page, and the
>> per-recipient socket buffers point to that page. Savings come from
>> avoiding both the multiple calls and the multiple copies of the data
>> required with regular socket operations.
>>
>
> My guess it's more the copies than the calls? It sounds like
> you want sendfile() for UDP. I think that would be a cleaner solution
> than such a specific hack for your application. It would
> have the advantage of saving the first copy too and be
> truly zero copy on capable NICs.
>
An aio udp send could accomplish both multiple packets per call, and
zero-copy, without adding new syscalls. You could send the same packet
to multiple recipients, or multiple packets to the same recipicent, or
combinations thereof.
> Or perhaps simple send to a local multicast group and let
> some netfilter module turn that into regular UDP.
>
Sounds hacky and rooty.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
next prev parent reply other threads:[~2009-05-04 7:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <49FE47A1.7070700@uwaterloo.ca>
2009-05-04 7:13 ` [PATCH] Implementation of the sendgroup() system call Andi Kleen
2009-05-04 7:30 ` Avi Kivity [this message]
2009-05-04 9:53 ` Andi Kleen
2009-05-04 9:56 ` Eric Dumazet
2009-05-04 10:18 ` Andi Kleen
2009-05-04 9:58 ` Avi Kivity
2009-05-04 7:42 ` Rémi Denis-Courmont
2009-05-04 13:44 ` Elad Lahav
2009-05-04 14:50 ` Andi Kleen
2009-05-05 0:24 ` Elad Lahav
2009-05-06 11:25 ` Tim Brecht
[not found] ` <49FE9C8C.6090705@cosmosbay.com>
2009-05-04 9:03 ` Eric Dumazet
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=49FE9999.7090103@redhat.com \
--to=avi@redhat.com \
--cc=andi@firstfloor.org \
--cc=elahav@uwaterloo.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).