public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Implementation of the sendgroup() system call
@ 2009-05-04  1:40 Elad Lahav
  2009-05-04  7:13 ` Andi Kleen
  2009-05-04  7:43 ` Eric Dumazet
  0 siblings, 2 replies; 15+ messages in thread
From: Elad Lahav @ 2009-05-04  1:40 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1230 bytes --]

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. We have measured an improvement of 42% in CPU utilisation 
when using this system call with the Helix multimedia server (reference: 
http://simula.no/~griff/nossdav2008/27-32.pdf).

The patch includes two implementations: one as described above and one 
that uses the udp_sendmsg() function in a tight loop inside the kernel 
(and thus saves on mode switches, but not on data copies). The latter is 
provided for reference and benchmarking only.

Feedback is welcome.

--Elad

[-- Attachment #2: sendgroup.tar.gz --]
[-- Type: application/gzip, Size: 5759 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-05-06 12:08 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-04  1:40 [PATCH] Implementation of the sendgroup() system call Elad Lahav
2009-05-04  7:13 ` Andi Kleen
2009-05-04  7:30   ` Avi Kivity
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
2009-05-04  7:43 ` Eric Dumazet
2009-05-04  9:03   ` Eric Dumazet
2009-05-04 13:32   ` Elad Lahav

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox