From owner-freebsd-net@FreeBSD.ORG Fri May 16 17:47:17 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 527A8FCB; Fri, 16 May 2014 17:47:17 +0000 (UTC) Received: from mail-qg0-x232.google.com (mail-qg0-x232.google.com [IPv6:2607:f8b0:400d:c04::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 03845276A; Fri, 16 May 2014 17:47:16 +0000 (UTC) Received: by mail-qg0-f50.google.com with SMTP id z60so4661956qgd.23 for ; Fri, 16 May 2014 10:47:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=3fn/7a/yqhgBNu5ZYOwoheSNoBzqrpBRWoHfCP6v9zQ=; b=D0pim9RdvganPv0jklB+MjLiRlBX0Wn5AOoAfof23uvaDU4PcGXMjCiPml4lffWdA5 GrVMWPlbYa0zgPlxidBHeDEVcKYZ0f05uPj+DvoDTOAgEQ7EbA2uiXafJi6yudkoCoaW kb7rhU2HdpvgGW+YQQCkeWisymPeKB895a6wP1ZW1Owb1fbgjwemh4jVvwF36+WKpe/r 6kb/JczjR5yVIHLlFU6ROc3XFVY7AxVBYeG4/Q/DSDTmHXn8vcLh/jjV8wmg+FhXW9dd fGQPsPD2MYprLNfgwnF8mleELKUCaq3G0b6pxv2/nqKpZn4N43/SPJGApvSz0hBFNSKH 8OUg== MIME-Version: 1.0 X-Received: by 10.224.37.10 with SMTP id v10mr21295121qad.98.1400262436155; Fri, 16 May 2014 10:47:16 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.191.201 with HTTP; Fri, 16 May 2014 10:47:16 -0700 (PDT) In-Reply-To: References: Date: Fri, 16 May 2014 10:47:16 -0700 X-Google-Sender-Auth: sLjaowIUnoP9phseKygkcJhL_n4 Message-ID: Subject: Re: [rfc] tcp timer update for RSS From: Adrian Chadd To: "freebsd-arch@freebsd.org" , FreeBSD Net Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 17:47:17 -0000 Ok, I've given this a whirl on a slightly larger system. There's no 10Gbit/sec in it yet, but it's stable under 64,000 sockets at 1Gbit/sec. I'm going to commit this over the next couple of days unless there are any objections. The defaults are still the same so it won't affect the rest of you. -a On 14 May 2014 22:26, Adrian Chadd wrote: > .. and i've done a little more than no testing, so far so good. > > http://people.freebsd.org/~adrian/norse/20140514-tcp-rss-timers-2.diff > > This adds IP_FLOWID, IP_FLOWTYPE and IP_RSSCPUID to fetch the socket > flowid, flowtype and cpuid from the inp. It's mostly for debugging for > now. > > Thanks, > > > > -a > > > On 14 May 2014 21:43, Adrian Chadd wrote: >> Hi, >> >> here's a completely untested patch for discussion. I'm emailing it out >> mostly as a "is this a good idea" patch rather than a "it should just >> be committed" patch. >> >> The RSS stuff from Robert maps connections to pcbgroups based on the >> RSS hash, but it doesn't map the TCP timers the same way. So by >> default they're all on swi0 and the per CPU timers don't take the hash >> type or correctly choose the CPU. >> >> This patch: >> >> http://people.freebsd.org/~adrian/norse/20140514-tcp-rss-timers-1.diff >> >> does a few things: >> >> * it stores the hashtype in the inp as well as the flowid; >> * the rss code grows a new method that maps the flowid/hashtype to a cpuid >> * .. and the existing mbuf to cpuid method now uses this; >> * the tcp timer code now has an inline function that knows about RSS >> and defaults to the existing way of doing things if RSS isn't enabled. >> >> There's still a bunch of work left before all the lock contention >> compartmentalization and balancing of RSS is realised. I'm just >> chewing off the little corner bits that are easy to get done now. >> >> So, any comments? I'll give it a proper whirl on some 10G hardware in >> a few days but I thought I'd at least get the general idea out there >> for comment. >> >> Thanks, >> >> >> >> >> -a