diff options
| author | Takashi Iwai <tiwai@suse.de> | 2009-05-12 11:57:09 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2009-05-12 11:57:09 +0200 |
| commit | ddc4097b77bbb227851a44287acb2fb8a9896cc1 (patch) | |
| tree | 319d098879bed7c45543d983de8becd509701b22 /mm/swap.c | |
| parent | bec4c99e8637b5b8bd4b0513eacb51da25885e3b (diff) | |
| parent | ae31c1fbdbb18d917b0a1139497c2dbd35886989 (diff) | |
Merge branch 'topic/drvdata-fix' into topic/asoc
Diffstat (limited to 'mm/swap.c')
| -rw-r--r-- | mm/swap.c | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/mm/swap.c b/mm/swap.c index bede23ce64e..cb29ae5d33a 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -491,49 +491,6 @@ unsigned pagevec_lookup_tag(struct pagevec *pvec, struct address_space *mapping, EXPORT_SYMBOL(pagevec_lookup_tag); -#ifdef CONFIG_SMP -/* - * We tolerate a little inaccuracy to avoid ping-ponging the counter between - * CPUs - */ -#define ACCT_THRESHOLD max(16, NR_CPUS * 2) - -static DEFINE_PER_CPU(long, committed_space); - -void vm_acct_memory(long pages) -{ - long *local; - - preempt_disable(); - local = &__get_cpu_var(committed_space); - *local += pages; - if (*local > ACCT_THRESHOLD || *local < -ACCT_THRESHOLD) { - atomic_long_add(*local, &vm_committed_space); - *local = 0; - } - preempt_enable(); -} - -#ifdef CONFIG_HOTPLUG_CPU - -/* Drop the CPU's cached committed space back into the central pool. */ -static int cpu_swap_callback(struct notifier_block *nfb, - unsigned long action, - void *hcpu) -{ - long *committed; - - committed = &per_cpu(committed_space, (long)hcpu); - if (action == CPU_DEAD || action == CPU_DEAD_FROZEN) { - atomic_long_add(*committed, &vm_committed_space); - *committed = 0; - drain_cpu_pagevecs((long)hcpu); - } - return NOTIFY_OK; -} -#endif /* CONFIG_HOTPLUG_CPU */ -#endif /* CONFIG_SMP */ - /* * Perform any setup for the swap system */ @@ -554,7 +511,4 @@ void __init swap_setup(void) * Right now other parts of the system means that we * _really_ don't want to cluster much more */ -#ifdef CONFIG_HOTPLUG_CPU - hotcpu_notifier(cpu_swap_callback, 0); -#endif } |
