From owner-freebsd-current@FreeBSD.ORG Tue Aug 1 00:09:25 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0FB3216A4DD; Tue, 1 Aug 2006 00:09:25 +0000 (UTC) (envelope-from jd@ugcs.caltech.edu) Received: from mark.ugcs.caltech.edu (mark.ugcs.caltech.edu [131.215.176.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1494943D45; Tue, 1 Aug 2006 00:09:24 +0000 (GMT) (envelope-from jd@ugcs.caltech.edu) Received: by mark.ugcs.caltech.edu (Postfix, from userid 3640) id 2C6D83F050; Mon, 31 Jul 2006 17:09:23 -0700 (PDT) Date: Mon, 31 Jul 2006 17:09:23 -0700 From: Paul Allen To: Julian Elischer Message-ID: <20060801000923.GA308@mark.ugcs.caltech.edu> References: <200607251254.k6PCsBef092737@lurza.secnetix.de> <20060728134701.GA45273@uk.tiscali.com> <20060728210154.GC748@turion.vk2pj.dyndns.org> <200607311437.57273.jhb@freebsd.org> <44CE5634.9080205@elischer.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44CE5634.9080205@elischer.org> Sender: jd@ugcs.caltech.edu Cc: Peter Jeremy , freebsd-current@freebsd.org, Brian Candler Subject: Re: vmstat's entries type X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 01 Aug 2006 00:09:25 -0000 >From Julian Elischer , Mon, Jul 31, 2006 at 12:12:52PM -0700: > but you do want to disable interrupts so that you don't get switched to > another cpu in the middle of it. > That would result in the possibility of 2 threads writing to the same > stats at the same time. Or just setup the sched to pin the kernel thread to the CPU and then use N_CPU threads for your packet processing + a load balancing algorithm to allocate flows between threads. I'm not saying this always the best solution, but certainly it is worth consideration--especially in cases where the word 'flow' can be omitted from my earlier statement without making anyone quesy. (Parallelism versus pipelining: the difference between Time-Division-Multiplexing each step in a packet's lifetime and Spacial-Division Multiplexing the flows versus Time-Division-Multiplexing the flows and Spacial-Division Multiplexing the packet's lifetime.