[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <49FE47A1.7070700@uwaterloo.ca>
Date: Sun, 03 May 2009 21:40:49 -0400
From: Elad Lahav <elahav@...terloo.ca>
To: linux-kernel@...r.kernel.org
Subject: [PATCH] Implementation of the sendgroup() system call
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
Download attachment "sendgroup.tar.gz" of type "application/gzip" (5759 bytes)
Powered by blists - more mailing lists