Eric Dumazet 571e768202 [LIB] pcounter : unline too big functions
Before pushing pcounter to Linus tree, I would like to make some adjustments.

Goal is to reduce kernel text size, by unlining too big functions.

When a pcounter is bound to a statically defined per_cpu variable,
we define two small helpers functions. (No more folding function
using the fat for_each_possible_cpu(cpu) ... )

static DEFINE_PER_CPU(int, NAME##_pcounter_values);
static void NAME##_pcounter_add(struct pcounter *self, int val)
{
       __get_cpu_var(NAME##_pcounter_values) += val;
}
static int NAME##_pcounter_getval(const struct pcounter *self, int cpu)
{
       return per_cpu(NAME##_pcounter_values, cpu);
}

Fast path is therefore unchanged, while folding/alloc/free is now unlined.

This saves 228 bytes on i386

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:00:35 -08:00
..
2007-07-31 15:39:37 -07:00
2005-10-18 08:26:15 -07:00
2007-05-11 05:38:25 -04:00
2007-07-16 09:05:50 -07:00
2007-07-17 10:23:04 -07:00
2006-06-25 10:01:20 -07:00
2007-10-18 14:37:32 -07:00
2005-04-16 15:20:36 -07:00
2006-06-25 10:01:20 -07:00
2007-05-10 18:24:13 +02:00
2005-04-16 15:20:36 -07:00
2007-04-25 22:28:53 -07:00
2005-04-16 15:20:36 -07:00
2007-07-24 12:24:59 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2007-10-19 11:53:41 -07:00
2006-06-20 20:24:58 -07:00
2006-10-06 08:53:40 -07:00
2007-08-22 19:52:45 -07:00
2008-01-25 21:08:34 +01:00
2008-01-24 20:40:05 -08:00
2008-01-28 14:54:39 -08:00
2007-10-19 11:53:41 -07:00
2005-04-16 15:20:36 -07:00
2006-12-04 02:00:22 -05:00
2007-10-17 08:42:52 -07:00
2007-10-22 21:19:58 +02:00