From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Friesen Subject: Re: Best way to set kernel thread affinity for handling a socket? Date: Thu, 23 Aug 2012 11:56:16 -0600 Message-ID: <50366EC0.2060004@genband.com> References: <1345652493.2709.36.camel@bwh-desktop.uk.solarflarecom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Ben Hutchings , netdev@vger.kernel.org To: Roland Dreier Return-path: Received: from exprod7og111.obsmtp.com ([64.18.2.175]:55122 "EHLO exprod7og111.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759156Ab2HWR4p (ORCPT ); Thu, 23 Aug 2012 13:56:45 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On 08/23/2012 11:04 AM, Roland Dreier wrote: > On Wed, Aug 22, 2012 at 9:21 AM, Ben Hutchings > wrote: >> With RFS we try to do the reverse: move the packets to match the socket >> user. But it's not (yet) turned on by default. See >> Documentation/networking/scaling.txt > > Fair enough. However I think at least in this case it sounds like extra > overhead: it should be easy for us to do everything on the CPU where > the packets are being received. In the general case though RFS can be useful. We have a server with one application instance per core. It's beneficial to be able to steer packets destined for a given instance to an eth driver queue whose interrupt is handled by the cpu running that instance. Depending on the hardware being used, it may be possible to do this more efficiently. The ixgbe driver (if the feature is enabled) will periodically look at the outgoing tcp traffic and set up hardware flow filtering rules to direct incoming traffic for that connection to the queue that sent out the messages. Chris