Re: [RFC] Macro to sum DPCPU vars

From: Lawrence Stewart <lstewart_at_freebsd.org>
Date: Thu, 10 Jun 2010 23:05:22 +1000
On 06/10/10 22:23, John Baldwin wrote:
> 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.

Nice, I'll rework my patch and commit once your new bits hit the tree.

Cheers,
Lawrence
Received on Thu Jun 10 2010 - 11:05:27 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:04 UTC