+ zoned-vm-counters-use-per-zone-counters-to-remove-zone_reclaim_interval.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     zoned vm counters: use per zone counters to remove zone_reclaim_interval

has been added to the -mm tree.  Its filename is

     zoned-vm-counters-use-per-zone-counters-to-remove-zone_reclaim_interval.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: use per zone counters to remove zone_reclaim_interval
From: Christoph Lameter <clameter@xxxxxxx>


Use zoned counters to remove zone_reclaim_interval

The zone_reclaim_interval was necessary because we were not able to determine
how many unmapped pages exist in a zone.  Therefore we had to scan in
intervals to figure out if any additional unmapped pages are created.

With the zoned counters we know now the number of pagecache pages and the
number of mapped pages in a zone.  So we are able to establish the number of
unmapped pages.

Caveat: The number of mapped pages includes anonymous pages.  The current
check works but is a bit too cautious.  We could perform zone reclaim down to
the last unmapped page if we would split NR_MAPPED into NR_MAPPED_PAGECACHE
and NR_MAPPED_ANON.  Maybe later.

Drop all support for zone_reclaim_interval.

Signed-off-by: Christoph Lameter <clameter@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 include/linux/mmzone.h |    6 ------
 include/linux/swap.h   |    1 -
 include/linux/sysctl.h |    1 -
 kernel/sysctl.c        |    9 ---------
 mm/vmscan.c            |   28 +++++++---------------------
 5 files changed, 7 insertions(+), 38 deletions(-)

diff -puN include/linux/mmzone.h~zoned-vm-counters-use-per-zone-counters-to-remove-zone_reclaim_interval include/linux/mmzone.h
--- devel/include/linux/mmzone.h~zoned-vm-counters-use-per-zone-counters-to-remove-zone_reclaim_interval	2006-06-09 02:49:35.000000000 -0700
+++ devel-akpm/include/linux/mmzone.h	2006-06-09 02:49:35.000000000 -0700
@@ -187,12 +187,6 @@ struct zone {
 
 	/* Zone statistics */
 	vm_stat_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
-	 * if all memory in the zone is in use.
-	 */
-	unsigned long		last_unsuccessful_zone_reclaim;
 
 	/*
 	 * prev_priority holds the scanning priority for this zone.  It is
diff -puN include/linux/swap.h~zoned-vm-counters-use-per-zone-counters-to-remove-zone_reclaim_interval include/linux/swap.h
--- devel/include/linux/swap.h~zoned-vm-counters-use-per-zone-counters-to-remove-zone_reclaim_interval	2006-06-09 02:49:35.000000000 -0700
+++ devel-akpm/include/linux/swap.h	2006-06-09 02:49:35.000000000 -0700
@@ -189,7 +189,6 @@ extern long vm_total_pages;
 
 #ifdef CONFIG_NUMA
 extern int zone_reclaim_mode;
-extern int zone_reclaim_interval;
 extern int zone_reclaim(struct zone *, gfp_t, unsigned int);
 #else
 #define zone_reclaim_mode 0
diff -puN include/linux/sysctl.h~zoned-vm-counters-use-per-zone-counters-to-remove-zone_reclaim_interval include/linux/sysctl.h
--- devel/include/linux/sysctl.h~zoned-vm-counters-use-per-zone-counters-to-remove-zone_reclaim_interval	2006-06-09 02:49:35.000000000 -0700
+++ devel-akpm/include/linux/sysctl.h	2006-06-09 02:49:35.000000000 -0700
@@ -189,7 +189,6 @@ enum
 	VM_DROP_PAGECACHE=29,	/* int: nuke lots of pagecache */
 	VM_PERCPU_PAGELIST_FRACTION=30,/* int: fraction of pages in each percpu_pagelist */
 	VM_ZONE_RECLAIM_MODE=31, /* reclaim local zone memory before going off node */
-	VM_ZONE_RECLAIM_INTERVAL=32, /* time period to wait after reclaim failure */
 	VM_PANIC_ON_OOM=33,	/* panic at out-of-memory */
 };
 
diff -puN kernel/sysctl.c~zoned-vm-counters-use-per-zone-counters-to-remove-zone_reclaim_interval kernel/sysctl.c
--- devel/kernel/sysctl.c~zoned-vm-counters-use-per-zone-counters-to-remove-zone_reclaim_interval	2006-06-09 02:49:35.000000000 -0700
+++ devel-akpm/kernel/sysctl.c	2006-06-09 02:49:35.000000000 -0700
@@ -1030,15 +1030,6 @@ static ctl_table fs_table[] = {
 		.mode		= 0644,
 		.proc_handler	= &proc_dointvec,
 	},
-	{
-		.ctl_name	= VM_ZONE_RECLAIM_INTERVAL,
-		.procname	= "zone_reclaim_interval",
-		.data		= &zone_reclaim_interval,
-		.maxlen		= sizeof(zone_reclaim_interval),
-		.mode		= 0644,
-		.proc_handler	= &proc_dointvec_jiffies,
-		.strategy	= &sysctl_jiffies,
-	},
 #endif
 #ifdef CONFIG_MMU
 	{
diff -puN mm/vmscan.c~zoned-vm-counters-use-per-zone-counters-to-remove-zone_reclaim_interval mm/vmscan.c
--- devel/mm/vmscan.c~zoned-vm-counters-use-per-zone-counters-to-remove-zone_reclaim_interval	2006-06-09 02:49:35.000000000 -0700
+++ devel-akpm/mm/vmscan.c	2006-06-09 02:49:35.000000000 -0700
@@ -1525,11 +1525,6 @@ int zone_reclaim_mode __read_mostly;
 #define RECLAIM_SLAB (1<<3)	/* Do a global slab shrink if the zone is out of memory */
 
 /*
- * Mininum time between zone reclaim scans
- */
-int zone_reclaim_interval __read_mostly = 30*HZ;
-
-/*
  * Priority for ZONE_RECLAIM. This determines the fraction of pages
  * of a node considered for each zone_reclaim. 4 scans 1/16th of
  * a zone.
@@ -1595,16 +1590,6 @@ static int __zone_reclaim(struct zone *z
 
 	p->reclaim_state = NULL;
 	current->flags &= ~(PF_MEMALLOC | PF_SWAPWRITE);
-
-	if (nr_reclaimed == 0) {
-		/*
-		 * We were unable to reclaim enough pages to stay on node.  We
-		 * now allow off node accesses for a certain time period before
-		 * trying again to reclaim pages from the local zone.
-		 */
-		zone->last_unsuccessful_zone_reclaim = jiffies;
-	}
-
 	return nr_reclaimed >= nr_pages;
 }
 
@@ -1614,13 +1599,14 @@ int zone_reclaim(struct zone *zone, gfp_
 	int node_id;
 
 	/*
-	 * Do not reclaim if there was a recent unsuccessful attempt at zone
-	 * reclaim.  In that case we let allocations go off node for the
-	 * zone_reclaim_interval.  Otherwise we would scan for each off-node
-	 * page allocation.
+	 * Do not reclaim if there are not enough reclaimable pages in this
+	 * zone. We decide this based on the number of mapped pages
+	 * in relation to the number of page cache pages in this zone.
+	 * If there are more pagecache pages than mapped pages then we can
+	 * be certain that pages can be reclaimed.
 	 */
-	if (time_before(jiffies,
-		zone->last_unsuccessful_zone_reclaim + zone_reclaim_interval))
+	if (zone_page_state(zone, NR_PAGECACHE) <
+		zone_page_state(zone, NR_MAPPED))
 			return 0;
 
 	/*
_

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-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-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
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
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

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux