Re: [this_cpu_xx 04/11] Use this_cpu ops for network statistics
From: Robin Holt
Date: Mon Jun 08 2009 - 07:27:50 EST
On Fri, Jun 05, 2009 at 03:18:23PM -0400, cl@xxxxxxxxxxxxxxxxxxxx wrote:
...
> --- linux-2.6.orig/include/net/netfilter/nf_conntrack.h 2009-06-03 16:23:29.000000000 -0500
...
> #define NF_CT_STAT_INC_ATOMIC(net, count) \
> -do { \
> - local_bh_disable(); \
> - per_cpu_ptr((net)->ct.stat, raw_smp_processor_id())->count++; \
> - local_bh_enable(); \
> -} while (0)
> + this_cpu_inc((net)->ct.stat->count)
Why not put this on one line?
#define NF_CT_STAT_INC_ATOMIC(net, count) this_cpu_inc((net)->ct.stat->count)
obin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/