Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Jul 2006 17:09:23 -0700
From:      Paul Allen <nospam@ugcs.caltech.edu>
To:        Julian Elischer <julian@elischer.org>
Cc:        Peter Jeremy <peterjeremy@optushome.com.au>, freebsd-current@freebsd.org, Brian Candler <B.Candler@pobox.com>
Subject:   Re: vmstat's entries type
Message-ID:  <20060801000923.GA308@mark.ugcs.caltech.edu>
In-Reply-To: <44CE5634.9080205@elischer.org>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
>From Julian Elischer <julian@elischer.org>, 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060801000923.GA308>