[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <87eiv5ibnd.fsf@basil.nowhere.org>
Date: Mon, 04 May 2009 09:13:10 +0200
From: Andi Kleen <andi@...stfloor.org>
To: Elad Lahav <elahav@...terloo.ca>
Cc: linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] Implementation of the sendgroup() system call
Elad Lahav <elahav@...terloo.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.
Or perhaps simple send to a local multicast group and let
some netfilter module turn that into regular UDP.
-Andi
--
ak@...ux.intel.com -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists