The patch titled zoned VM counters: Drop VM_STAT macros and vm_stat_t has been added to the -mm tree. Its filename is zoned-vm-counters-per-zone-counter-functionality-fix-fix.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: zoned VM counters: Drop VM_STAT macros and vm_stat_t From: Christoph Lameter <clameter@xxxxxxx> Seems that they are not needed since UP has no special needs. Signed-off-by: Christoph Lameter <clameter@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- include/linux/mmzone.h | 12 +----------- include/linux/page-flags.h | 6 +++--- mm/page_alloc.c | 8 ++++---- 3 files changed, 8 insertions(+), 18 deletions(-) diff -puN include/linux/mmzone.h~zoned-vm-counters-per-zone-counter-functionality-fix-fix include/linux/mmzone.h --- devel/include/linux/mmzone.h~zoned-vm-counters-per-zone-counter-functionality-fix-fix 2006-06-09 12:06:55.000000000 -0700 +++ devel-akpm/include/linux/mmzone.h 2006-06-09 12:06:55.000000000 -0700 @@ -49,16 +49,6 @@ struct zone_padding { enum zone_stat_item { NR_STAT_ITEMS }; -#ifdef CONFIG_SMP -typedef atomic_long_t vm_stat_t; -#define VM_STAT_GET(x) atomic_long_read(&(x)) -#define VM_STAT_ADD(x,v) atomic_long_add(v, &(x)) -#else -typedef unsigned long vm_stat_t; -#define VM_STAT_GET(x) (x) -#define VM_STAT_ADD(x,v) (x) += (v) -#endif - struct per_cpu_pages { int count; /* number of pages in the list */ int high; /* high watermark, emptying needed */ @@ -183,7 +173,7 @@ struct zone { atomic_t reclaim_in_progress; /* Zone statistics */ - vm_stat_t vm_stat[NR_STAT_ITEMS]; + atomic_long_t vm_stat[NR_STAT_ITEMS]; /* * timestamp (in jiffies) of the last zone reclaim that did not * result in freeing of pages. This is used to avoid repeated scans diff -puN include/linux/page-flags.h~zoned-vm-counters-per-zone-counter-functionality-fix-fix include/linux/page-flags.h --- devel/include/linux/page-flags.h~zoned-vm-counters-per-zone-counter-functionality-fix-fix 2006-06-09 12:06:55.000000000 -0700 +++ devel-akpm/include/linux/page-flags.h 2006-06-09 12:06:55.000000000 -0700 @@ -233,11 +233,11 @@ extern void __mod_page_state_offset(unsi /* * Zone based accounting with per cpu differentials. */ -extern vm_stat_t vm_stat[NR_STAT_ITEMS]; +extern atomic_long_t vm_stat[NR_STAT_ITEMS]; static inline unsigned long global_page_state(enum zone_stat_item item) { - long x = VM_STAT_GET(vm_stat[item]); + long x = atomic_long_read(&vm_stat[item]); #ifdef CONFIG_SMP if (x < 0) x = 0; @@ -248,7 +248,7 @@ static inline unsigned long global_page_ static inline unsigned long zone_page_state(struct zone *zone, enum zone_stat_item item) { - long x = VM_STAT_GET(zone->vm_stat[item]); + long x = atomic_long_read(&zone->vm_stat[item]); #ifdef CONFIG_SMP if (x < 0) x = 0; diff -puN mm/page_alloc.c~zoned-vm-counters-per-zone-counter-functionality-fix-fix mm/page_alloc.c --- devel/mm/page_alloc.c~zoned-vm-counters-per-zone-counter-functionality-fix-fix 2006-06-09 12:06:55.000000000 -0700 +++ devel-akpm/mm/page_alloc.c 2006-06-09 12:06:55.000000000 -0700 @@ -618,13 +618,13 @@ static int rmqueue_bulk(struct zone *zon * * vm_stat contains the global counters */ -vm_stat_t vm_stat[NR_STAT_ITEMS]; +atomic_long_t vm_stat[NR_STAT_ITEMS]; static inline void zone_page_state_add(long x, struct zone *zone, enum zone_stat_item item) { - VM_STAT_ADD(zone->vm_stat[item], x); - VM_STAT_ADD(vm_stat[item], x); + atomic_long_add(x, &zone->vm_stat[item]); + atomic_long_add(x, &vm_stat[item]); } #ifdef CONFIG_SMP @@ -878,7 +878,7 @@ unsigned long node_page_state(int node, long v = 0; for (i = 0; i < MAX_NR_ZONES; i++) - v += VM_STAT_GET(zones[i].vm_stat[item]); + v += atomic_long_read(&zones[i].vm_stat[item]); if (v < 0) v = 0; return v; _ Patches currently in -mm which might be from clameter@xxxxxxx are page-migration-make-do_swap_page-redo-the-fault.patch slab-extract-cache_free_alien-from-__cache_free.patch migration-remove-unnecessary-pageswapcache-checks.patch page-migration-cleanup-rename-ignrefs-to-migration.patch page-migration-cleanup-group-functions.patch page-migration-cleanup-remove-useless-definitions.patch page-migration-cleanup-drop-nr_refs-in-remove_references.patch page-migration-cleanup-extract-try_to_unmap-from-migration-functions.patch page-migration-cleanup-pass-mapping-to-migration-functions.patch page-migration-cleanup-move-fallback-handling-into-special-function.patch swapless-pm-add-r-w-migration-entries.patch swapless-page-migration-rip-out-swap-based-logic.patch swapless-page-migration-modify-core-logic.patch more-page-migration-do-not-inc-dec-rss-counters.patch more-page-migration-use-migration-entries-for-file-pages.patch page-migration-update-documentation.patch mm-remove-vm_locked-before-remap_pfn_range-and-drop-vm_shm.patch page-migration-simplify-migrate_pages.patch page-migration-simplify-migrate_pages-tweaks.patch page-migration-handle-freeing-of-pages-in-migrate_pages.patch page-migration-use-allocator-function-for-migrate_pages.patch page-migration-support-moving-of-individual-pages.patch page-migration-detailed-status-for-moving-of-individual-pages.patch page-migration-support-moving-of-individual-pages-fixes.patch page-migration-support-moving-of-individual-pages-x86_64-support.patch page-migration-support-moving-of-individual-pages-x86-support.patch page-migration-support-a-vma-migration-function.patch allow-migration-of-mlocked-pages.patch zoned-vm-counters-per-zone-counter-functionality.patch zoned-vm-counters-per-zone-counter-functionality-tidy.patch zoned-vm-counters-per-zone-counter-functionality-fix-fix.patch zoned-vm-counters-include-per-zone-counters-in-proc-vmstat.patch zoned-vm-counters-conversion-of-nr_mapped-to-per-zone-counter.patch zoned-vm-counters-conversion-of-nr_pagecache-to-per-zone-counter.patch zoned-vm-counters-conversion-of-nr_pagecache-to-per-zone-counter-fix.patch zoned-vm-counters-use-per-zone-counters-to-remove-zone_reclaim_interval.patch zoned-vm-counters-add-per-zone-counters-to-zone-node-and-global-vm-statistics.patch zoned-vm-counters-conversion-of-nr_slab-to-per-zone-counter.patch zoned-vm-counters-conversion-of-nr_pagetable-to-per-zone-counter.patch zoned-vm-counters-conversion-of-nr_dirty-to-per-zone-counter.patch zoned-vm-counters-conversion-of-nr_writeback-to-per-zone-counter.patch zoned-vm-counters-conversion-of-nr_unstable-to-per-zone-counter.patch zoned-vm-counters-remove-unused-get_page_stat-functions.patch zoned-vm-counters-conversion-of-nr_bounce-to-per-zone-counter.patch zoned-vm-counters-remove-useless-writeback-structure.patch zoned-vm-stats-remove-nr_mapped-from-zone-reclaim.patch zoned-vm-stats-add-nr_anon.patch cpuset-remove-extra-cpuset_zone_allowed-check-in-__alloc_pages.patch swap_prefetch-conversion-of-nr_mapped-to-per-zone-counter.patch swap_prefetch-conversion-of-nr_slab-to-per-zone-counter.patch swap_prefetch-conversion-of-nr_dirty-to-per-zone-counter.patch swap_prefetch-conversion-of-nr_writeback-to-per-zone-counter.patch swap_prefetch-conversion-of-nr_unstable-to-per-zone-counter.patch swap_prefetch-remove-unused-get_page_stat-functions.patch zoned-vm-stats-nr_slab-is-accurate-fix-comment.patch swap_prefetch-zoned-vm-stats-add-nr_anon.patch reiser4-conversion-of-nr_dirty-to-per-zone-counter.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html