diff options
| author | Andrew Morton <akpm@digeo.com> | 2003-04-12 12:59:51 -0700 |
|---|---|---|
| committer | James Bottomley <jejb@raven.il.steeleye.com> | 2003-04-12 12:59:51 -0700 |
| commit | ba8e8755393fd032e448b3cfa35cb01743807699 (patch) | |
| tree | 75a18c8515be1213c8d0eea312aedb8e39713aaa /kernel | |
| parent | f688c084bc58323c8a7ca19090884ac5da7b6c04 (diff) | |
[PATCH] percpu_counters: approximate but scalable counters
Several places in ext2 and ext3 are using filesystem-wide counters which use
global locking. Mainly for the orlov allocator's heuristics.
To solve the contention which this causes we can trade off accuracy against
speed.
This patch introduces a "percpu_counter" library type in which the counts are
per-cpu and are periodically spilled into a global counter. Readers only
read the global counter.
These objects are *large*. On a 32 CPU P4, they are 4 kbytes. On a 4 way
p3, 128 bytes.
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/ksyms.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/ksyms.c b/kernel/ksyms.c index f7ef45020896..5d31affa36ce 100644 --- a/kernel/ksyms.c +++ b/kernel/ksyms.c @@ -58,6 +58,7 @@ #include <linux/ptrace.h> #include <linux/time.h> #include <linux/backing-dev.h> +#include <linux/percpu_counter.h> #include <asm/checksum.h> #if defined(CONFIG_PROC_FS) @@ -100,6 +101,7 @@ EXPORT_SYMBOL(kfree); #ifdef CONFIG_SMP EXPORT_SYMBOL(kmalloc_percpu); EXPORT_SYMBOL(kfree_percpu); +EXPORT_SYMBOL(percpu_counter_mod); #endif EXPORT_SYMBOL(vfree); EXPORT_SYMBOL(__vmalloc); |
