From owner-freebsd-current@FreeBSD.ORG Wed Feb 19 20:04:52 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C54B0CA8; Wed, 19 Feb 2014 20:04:52 +0000 (UTC) Received: from mail-qc0-x22f.google.com (mail-qc0-x22f.google.com [IPv6:2607:f8b0:400d:c01::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4F0F71E01; Wed, 19 Feb 2014 20:04:52 +0000 (UTC) Received: by mail-qc0-f175.google.com with SMTP id x13so1487713qcv.34 for ; Wed, 19 Feb 2014 12:04:51 -0800 (PST) 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:cc:content-type; bh=IqvWeHcGadUnOsbPLAtj5kksQ0xjEHFOAFLbQiR/TM8=; b=TXPLYIGrVzR0xx+m67xsrwLglssbQzNe8wLHxJNZ3CyuNj95JHgxcRuQV3Ugp/I+f7 UJQRytl0uUKY6LygLQydJmUs0/2A01+4LL+yqofksit5hoeVUAl6I1zcRi44DAeQEgzB XXD0PARwjac8GKAoGfv+XqPd86FT+OOy0lcZg4+v4KQQ6FOyb6hS6rrt57nhoJa/7jl4 BMXyHuo6vbYRuKF3SXHYo+g3YImZ14L2gqttsLDnYUm56972+QfaBBUDsQUhGr3KAR8z tQtrD+2K31vR7G5aipAk8iKLlz7gJy5soetOEFvww/q450aqbEWPwVVIt6uHVOWRXRvt Y7CA== MIME-Version: 1.0 X-Received: by 10.224.121.137 with SMTP id h9mr53658877qar.55.1392840291480; Wed, 19 Feb 2014 12:04:51 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.16.10 with HTTP; Wed, 19 Feb 2014 12:04:51 -0800 (PST) In-Reply-To: <53050D24.3020505@FreeBSD.org> References: <530508B7.7060102@FreeBSD.org> <53050D24.3020505@FreeBSD.org> Date: Wed, 19 Feb 2014 12:04:51 -0800 X-Google-Sender-Auth: 726LKOLQ3R1buKQFdHLdOFFrTKQ Message-ID: Subject: Re: [rfc] bind per-cpu timeout threads to each CPU From: Adrian Chadd To: Alexander Motin Content-Type: text/plain; charset=ISO-8859-1 Cc: Jeffrey Faden , freebsd-current , "freebsd-arch@freebsd.org" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Feb 2014 20:04:52 -0000 On 19 February 2014 11:59, Alexander Motin wrote: >> So if we're moving towards supporting (among others) a pcbgroup / RSS >> hash style work load distribution across CPUs to minimise >> per-connection lock contention, we really don't want the scheduler to >> decide it can schedule things on other CPUs under enough pressure. >> That'll just make things worse. > True, though it is also not obvious that putting second thread on CPU run > queue is better then executing it right now on another core. Well, it depends if you're trying to optimise for "run all runnable tasks as quickly as possible" or "run all runnable tasks in contexts that minimise lock contention." The former sounds great as long as there's no real lock contention going on. But as you add more chances for contention (something like "100,000 concurrent TCP flows") then you may end up having your TCP timer firing stuff interfere with more TXing or RXing on the same connection. Chasing this stuff down is a pain, because it only really shows up when you're doing lots of concurrency. I'm happy to make this a boot-time option and leave it off for the time being. How's that? -a