From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick McHardy Subject: Re: [PATCH 2/2] nfnetlink_queue: provide rcu enabled callbacks Date: Mon, 18 Jul 2011 16:09:04 +0200 Message-ID: <4E243E80.6010509@trash.net> References: <1309534142.2599.26.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: Florian Westphal , sclark46@earthlink.net, Eric Leblond , Kuzin Andrey , Anders Nilsson Plymoth , netfilter-devel , netdev To: Eric Dumazet Return-path: Received: from stinky.trash.net ([213.144.137.162]:43612 "EHLO stinky.trash.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751322Ab1GROJG (ORCPT ); Mon, 18 Jul 2011 10:09:06 -0400 In-Reply-To: <1309534142.2599.26.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> Sender: netfilter-devel-owner@vger.kernel.org List-ID: On 01.07.2011 17:29, Eric Dumazet wrote: > nenetlink_queue operations on SMP are not efficent if several queues are > used, because of nfnl_mutex contention when applications give packet > verdict. > > Use new call_rcu field in struct nfnl_callback to advertize a callback > that is called under rcu_read_lock instead of nfnl_mutex. > > On my 2x4x2 machine, I was able to reach 2.000.000 pps going through > user land returning NF_ACCEPT verdicts without losses, instead of less > than 500.000 pps before patch. Applied, nice work.