From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mo2.mail-out.ovh.net (2.mo2.mail-out.ovh.net [188.165.53.149]) by dpdk.org (Postfix) with ESMTP id 0EBD89DE for ; Wed, 4 Dec 2013 14:48:02 +0100 (CET) Received: from mail422.ha.ovh.net (gw6.ovh.net [213.251.189.206]) by mo2.mail-out.ovh.net (Postfix) with SMTP id D5777FF962F for ; Wed, 4 Dec 2013 14:49:04 +0100 (CET) Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 4 Dec 2013 15:49:12 +0200 Received: from lneuilly-152-23-9-75.w193-252.abo.wanadoo.fr (HELO pcdeff) (ff@ozog.com@193.252.40.75) by ns0.ovh.net with SMTP; 4 Dec 2013 15:49:10 +0200 From: =?iso-8859-1?Q?Fran=E7ois-Fr=E9d=E9ric_Ozog?= To: "'Sambath Kumar Balasubramanian'" References: In-Reply-To: Date: Wed, 4 Dec 2013 14:47:27 +0100 Message-ID: <03b201cef0f7$5fba0d20$1f2e2760$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac7w5n7AHFcpwU1qS4y7Yb8qLAepKwAD4bPQ Content-Language: fr X-Ovh-Tracer-Id: 3663115347424631001 X-Ovh-Remote: 193.252.40.75 (lneuilly-152-23-9-75.w193-252.abo.wanadoo.fr) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-OVH-SPAMSTATE: OK X-OVH-SPAMSCORE: -100 X-OVH-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeeiledrkeehucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd X-Spam-Check: DONE|U 0.5/N X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeeiledrkeehucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Cc: dev@dpdk.org Subject: Re: [dpdk-dev] Question on the Ring Library X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 13:48:02 -0000 Hi On a 10Gbps link, there is a new packet every 650ns on average on each direction. So handling latency is extremely important. Traditional "fast" userland mutexes involves system call and scheduling costs (look at the kernel code: it is "hairy"). I measured difference between mutex controlled fifo and DPDK controlled fifo on a Xeon = E5-2680v2, 1867MHz RAM: for times the performance... I consider the cost of a mutex lock is something close to 400ns on average (well I don't say that it = always costs that, but the delays can be not predictable and extremely high - I = saw a few ms even if you use isolcpus and precise affinities-). So if you = plan to do 10Gbps stuff, I guess polling is the only way to go. Fran=E7ois-Fr=E9d=E9ric > -----Message d'origine----- > De=A0: dev [mailto:dev-bounces@dpdk.org] De la part de Sambath Kumar > Balasubramanian > Envoy=E9=A0: mercredi 4 d=E9cembre 2013 12:47 > =C0=A0: dev@dpdk.org > Objet=A0: [dpdk-dev] Question on the Ring Library >=20 > Hi, >=20 > The ring library seems to be an excellent IPC. But looking at one = use > case where the fast path code posts events to event thread for = example, the > event thread will spend some cycles polling the ring rather than = waiting > for the event. One approach could be a fast path code basically posts = the > event in the ring as is today and there is a background thread that = polls > the queues and wakes up the event threads. This is similar to Linux > SOFTIRQs.The event threads are asynchronous. Is this a fair model to = avoid > extra polling CPU cycles by the event threads? Is there any other > alternatives in dpdk? >=20 > Regards, > Sambath