]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/swap.c
[S390] appldata enhancements.
[linux-2.6-omap-h63xx.git] / mm / swap.c
index 91b7e2026f696718d3a51b49d40dd660ea308047..990868afc1c6aed8d3716af0fcea25d4e6776d8f 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -86,8 +86,7 @@ int rotate_reclaimable_page(struct page *page)
        zone = page_zone(page);
        spin_lock_irqsave(&zone->lru_lock, flags);
        if (PageLRU(page) && !PageActive(page)) {
-               list_del(&page->lru);
-               list_add_tail(&page->lru, &zone->inactive_list);
+               list_move_tail(&page->lru, &zone->inactive_list);
                inc_page_state(pgrotated);
        }
        if (!test_clear_page_writeback(page))
@@ -480,48 +479,6 @@ static int cpu_swap_callback(struct notifier_block *nfb,
 #endif /* CONFIG_HOTPLUG_CPU */
 #endif /* CONFIG_SMP */
 
-#ifdef CONFIG_SMP
-void percpu_counter_mod(struct percpu_counter *fbc, long amount)
-{
-       long count;
-       long *pcount;
-       int cpu = get_cpu();
-
-       pcount = per_cpu_ptr(fbc->counters, cpu);
-       count = *pcount + amount;
-       if (count >= FBC_BATCH || count <= -FBC_BATCH) {
-               spin_lock(&fbc->lock);
-               fbc->count += count;
-               *pcount = 0;
-               spin_unlock(&fbc->lock);
-       } else {
-               *pcount = count;
-       }
-       put_cpu();
-}
-EXPORT_SYMBOL(percpu_counter_mod);
-
-/*
- * Add up all the per-cpu counts, return the result.  This is a more accurate
- * but much slower version of percpu_counter_read_positive()
- */
-long percpu_counter_sum(struct percpu_counter *fbc)
-{
-       long ret;
-       int cpu;
-
-       spin_lock(&fbc->lock);
-       ret = fbc->count;
-       for_each_cpu(cpu) {
-               long *pcount = per_cpu_ptr(fbc->counters, cpu);
-               ret += *pcount;
-       }
-       spin_unlock(&fbc->lock);
-       return ret < 0 ? 0 : ret;
-}
-EXPORT_SYMBOL(percpu_counter_sum);
-#endif
-
 /*
  * Perform any setup for the swap system
  */