Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Jun 2010 08:23:52 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-current@freebsd.org
Cc:        Lawrence Stewart <lstewart@freebsd.org>
Subject:   Re: [RFC] Macro to sum DPCPU vars
Message-ID:  <201006100823.52415.jhb@freebsd.org>
In-Reply-To: <4C10620D.7070904@freebsd.org>
References:  <4C10620D.7070904@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 09 June 2010 11:54:53 pm Lawrence Stewart wrote:
> Does anyone have objections to or feedback on the following patch? The 
> macro simplifies the act of calculating an aggregate from DPCPU counters.
> 
> 
http://people.freebsd.org/~lstewart/patches/tcp_ffcaia2008/dpcpu_sum_9.x.r208900.patch
> 
> If anyone is curious how you would use it, take a look at:

I think this is fine, though I'm about to make it smaller.  At Robert's 
request I've come up with some macros to iterate over CPUs to abstract out the 
CPU_ABSENT(), etc. bits.  It is at www.freebsd.org/~jhb/patches/cpu_iter.patch  
Using CPU_FOREACH() should try your macro down slightly.

-- 
John Baldwin



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