linux/lib
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
..
lzo lzo: add some missing casts 2007-07-31 15:39:37 -07:00
reed_solomon [MTD] [NAND] Replace -1 with -EBADMSG in nand error correction code 2007-10-20 22:30:54 +01:00
zlib_deflate
zlib_inflate [ZLIB]: Fix external builds of zlib_inflate code. 2007-10-11 22:17:20 -07:00
.gitignore
Kconfig Introduce CONFIG_CHECK_SIGNATURE 2007-08-22 19:52:45 -07:00
Kconfig.debug sched: latencytop support 2008-01-25 21:08:34 +01:00
Makefile [LIB]: Introduce struct pcounter 2008-01-28 14:54:39 -08:00
argv_split.c LIB: Replace inappropriate include of <linux/bug.h> 2007-10-20 00:26:10 +02:00
audit.c [PATCH] audit signal recipients 2007-05-11 05:38:25 -04:00
bitmap.c Fix bitmap_scnlistprintf for empty masks 2007-11-05 15:12:32 -08:00
bitrev.c [PATCH] add MODULE_* attributes to bit reversal library 2006-12-10 10:07:52 -08:00
bug.c generic bug: use show_regs() instead of dump_stack() 2007-07-16 09:05:51 -07:00
bust_spinlocks.c handle recursive calls to bust_spinlocks() 2007-10-17 08:42:56 -07:00
check_signature.c uninline check_signature() 2007-07-16 09:05:50 -07:00
cmdline.c [PATCH] Numerous fixes to kernel-doc info in source files. 2007-02-11 10:51:32 -08:00
cpumask.c Safer nr_node_ids and nr_node_ids determination and initial values 2007-05-07 12:12:51 -07:00
crc-ccitt.c
crc-itu-t.c CRC ITU-T V.41 2007-05-10 18:24:13 +02:00
crc7.c CRC7 support 2007-07-17 10:23:04 -07:00
crc16.c
crc32.c Replace __attribute_pure__ with __pure 2007-10-18 14:37:32 -07:00
crc32defs.h
ctype.c
debug_locks.c
dec_and_lock.c
devres.c iomap: implement pcim_iounmap_regions() 2007-04-28 14:15:58 -04:00
div64.c [S390]: Fix build on 31-bit. 2007-04-25 22:28:53 -07:00
dump_stack.c
extable.c
fault-inject.c fault_inject: silence a warning 2007-07-24 12:24:59 -07:00
find_next_bit.c
gen_crc32table.c
genalloc.c Slab allocators: Replace explicit zeroing with __GFP_ZERO 2007-07-17 10:23:02 -07:00
halfmd4.c
hexdump.c hexdump: don't print bytes with bit 7 set 2007-11-29 09:24:53 -08:00
hweight.c remove asm/bitops.h includes 2007-10-19 11:53:41 -07:00
idr.c Slab API: remove useless ctor parameter and reorder parameters 2007-10-17 08:42:45 -07:00
inflate.c [PATCH] x86-64: deflate inflate_dynamic too 2007-05-02 19:27:15 +02:00
int_sqrt.c
iomap.c lib/iomap.c:bad_io_access(): print 0x hex prefix 2007-10-17 08:42:57 -07:00
iomap_copy.c
ioremap.c lib/ioremap.c should #include <linux/io.h> 2007-10-17 08:42:50 -07:00
irq_regs.c [PATCH] irq_reqs: export __irq_regs 2006-10-06 08:53:40 -07:00
kasprintf.c lib: move kasprintf to a separate file 2007-07-31 15:39:39 -07:00
kernel_lock.c sched: remove the !PREEMPT_BKL code 2008-01-25 21:08:33 +01:00
klist.c Driver core: Don't call put methods while holding a spinlock 2006-09-25 21:08:40 -07:00
kobject.c Kobject: fix coding style issues in kobject c files 2008-01-24 21:59:04 -08:00
kobject_uevent.c Kobject: fix coding style issues in kobject c files 2008-01-24 21:59:04 -08:00
kref.c kref: add kref_set() 2008-01-24 20:40:05 -08:00
libcrc32c.c [LIB] crc32c: Keep intermediate crc state in cpu order 2007-11-08 21:34:09 +08:00
list_debug.c [PATCH] More list debugging context 2006-12-07 08:39:35 -08:00
locking-selftest-hardirq.h
locking-selftest-mutex.h
locking-selftest-rlock-hardirq.h
locking-selftest-rlock-softirq.h
locking-selftest-rlock.h
locking-selftest-rsem.h
locking-selftest-softirq.h
locking-selftest-spin-hardirq.h
locking-selftest-spin-softirq.h
locking-selftest-spin.h
locking-selftest-wlock-hardirq.h
locking-selftest-wlock-softirq.h
locking-selftest-wlock.h
locking-selftest-wsem.h
locking-selftest.c [PATCH] lockdep: show more details about self-test failures 2006-12-07 08:39:43 -08:00
parser.c [AFS]: Make the match_*() functions take const options. 2007-05-03 03:10:39 -07:00
pcounter.c [LIB] pcounter : unline too big functions 2008-01-28 15:00:35 -08:00
percpu_counter.c Add irq protection in the percpu-counters cpu-hotplug-callback path 2007-10-19 11:53:44 -07:00
plist.c
prio_heap.c Fix cpusets update_cpumask 2007-10-19 11:53:41 -07:00
prio_tree.c
proportions.c lib: proportion: fix underflow in prop_norm_percpu() 2007-12-23 12:54:37 -08:00
radix-tree.c avoid negative (and full-width) shifts in radix-tree.c 2007-10-17 08:42:56 -07:00
random32.c [PATCH] severing module.h->sched.h 2006-12-04 02:00:22 -05:00
rbtree.c [PATCH] rbtree: fixed reversed RB_EMPTY_NODE and rb_next/prev 2006-09-30 20:26:56 +02:00
reciprocal_div.c [PATCH] SLAB: use a multiply instead of a divide in obj_to_index() 2006-12-13 09:05:49 -08:00
rwsem-spinlock.c Lockdep: add lockdep_set_class_and_subclass() and lockdep_set_subclass() 2006-10-11 01:45:14 -04:00
rwsem.c sched: mark rwsem functions as __sched for wchan/profiling 2007-12-18 15:21:13 +01:00
scatterlist.c SG: work with the SCSI fixed maximum allocations. 2008-01-28 10:54:49 +01:00
semaphore-sleepers.c
sha1.c [PATCH] Numerous fixes to kernel-doc info in source files. 2007-02-11 10:51:32 -08:00
smp_processor_id.c
sort.c lib/sort.c optimization 2007-10-17 08:42:52 -07:00
spinlock_debug.c Use helpers to obtain task pid in printks 2007-10-19 11:53:43 -07:00
string.c [STRING]: Move strcasecmp/strncasecmp to lib/string.c 2007-04-26 01:54:39 -07:00
swiotlb.c Update swiotlb to use sg helpers 2007-10-22 21:19:58 +02:00
textsearch.c [TEXTSEARCH]: Do not allow zero length patterns in the textsearch infrastructure 2007-12-01 00:03:52 +11:00
ts_bm.c
ts_fsm.c [PATCH] lib/ts_fsm.c: constify structs 2006-09-29 09:18:23 -07:00
ts_kmp.c
vsprintf.c lib: move kasprintf to a separate file 2007-07-31 15:39:39 -07:00