diff options
-rw-r--r-- | Documentation/sysctl/vm.txt | 13 | ||||
-rw-r--r-- | include/linux/mmzone.h | 6 | ||||
-rw-r--r-- | include/linux/swap.h | 1 | ||||
-rw-r--r-- | kernel/sysctl.c | 9 | ||||
-rw-r--r-- | mm/vmscan.c | 31 |
5 files changed, 10 insertions, 50 deletions
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index 2dc246af4885..86754eb390da 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt | |||
@@ -28,7 +28,6 @@ Currently, these files are in /proc/sys/vm: | |||
28 | - block_dump | 28 | - block_dump |
29 | - drop-caches | 29 | - drop-caches |
30 | - zone_reclaim_mode | 30 | - zone_reclaim_mode |
31 | - zone_reclaim_interval | ||
32 | - panic_on_oom | 31 | - panic_on_oom |
33 | 32 | ||
34 | ============================================================== | 33 | ============================================================== |
@@ -167,18 +166,6 @@ use of files and builds up large slab caches. However, the slab | |||
167 | shrink operation is global, may take a long time and free slabs | 166 | shrink operation is global, may take a long time and free slabs |
168 | in all nodes of the system. | 167 | in all nodes of the system. |
169 | 168 | ||
170 | ================================================================ | ||
171 | |||
172 | zone_reclaim_interval: | ||
173 | |||
174 | The time allowed for off node allocations after zone reclaim | ||
175 | has failed to reclaim enough pages to allow a local allocation. | ||
176 | |||
177 | Time is set in seconds and set by default to 30 seconds. | ||
178 | |||
179 | Reduce the interval if undesired off node allocations occur. However, too | ||
180 | frequent scans will have a negative impact onoff node allocation performance. | ||
181 | |||
182 | ============================================================= | 169 | ============================================================= |
183 | 170 | ||
184 | panic_on_oom | 171 | panic_on_oom |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 4833abd4458b..839e9a04fd49 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -178,12 +178,6 @@ struct zone { | |||
178 | 178 | ||
179 | /* Zone statistics */ | 179 | /* Zone statistics */ |
180 | atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS]; | 180 | atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS]; |
181 | /* | ||
182 | * timestamp (in jiffies) of the last zone reclaim that did not | ||
183 | * result in freeing of pages. This is used to avoid repeated scans | ||
184 | * if all memory in the zone is in use. | ||
185 | */ | ||
186 | unsigned long last_unsuccessful_zone_reclaim; | ||
187 | 181 | ||
188 | /* | 182 | /* |
189 | * prev_priority holds the scanning priority for this zone. It is | 183 | * prev_priority holds the scanning priority for this zone. It is |
diff --git a/include/linux/swap.h b/include/linux/swap.h index c41e2d6d1acc..cf6ca6e377bd 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -189,7 +189,6 @@ extern long vm_total_pages; | |||
189 | 189 | ||
190 | #ifdef CONFIG_NUMA | 190 | #ifdef CONFIG_NUMA |
191 | extern int zone_reclaim_mode; | 191 | extern int zone_reclaim_mode; |
192 | extern int zone_reclaim_interval; | ||
193 | extern int zone_reclaim(struct zone *, gfp_t, unsigned int); | 192 | extern int zone_reclaim(struct zone *, gfp_t, unsigned int); |
194 | #else | 193 | #else |
195 | #define zone_reclaim_mode 0 | 194 | #define zone_reclaim_mode 0 |
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 93a2c5398648..ee0db45e2438 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -933,15 +933,6 @@ static ctl_table vm_table[] = { | |||
933 | .strategy = &sysctl_intvec, | 933 | .strategy = &sysctl_intvec, |
934 | .extra1 = &zero, | 934 | .extra1 = &zero, |
935 | }, | 935 | }, |
936 | { | ||
937 | .ctl_name = VM_ZONE_RECLAIM_INTERVAL, | ||
938 | .procname = "zone_reclaim_interval", | ||
939 | .data = &zone_reclaim_interval, | ||
940 | .maxlen = sizeof(zone_reclaim_interval), | ||
941 | .mode = 0644, | ||
942 | .proc_handler = &proc_dointvec_jiffies, | ||
943 | .strategy = &sysctl_jiffies, | ||
944 | }, | ||
945 | #endif | 936 | #endif |
946 | #ifdef CONFIG_X86_32 | 937 | #ifdef CONFIG_X86_32 |
947 | { | 938 | { |
diff --git a/mm/vmscan.c b/mm/vmscan.c index 2f0390161c0e..0960846d649f 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -1518,11 +1518,6 @@ int zone_reclaim_mode __read_mostly; | |||
1518 | #define RECLAIM_SLAB (1<<3) /* Do a global slab shrink if the zone is out of memory */ | 1518 | #define RECLAIM_SLAB (1<<3) /* Do a global slab shrink if the zone is out of memory */ |
1519 | 1519 | ||
1520 | /* | 1520 | /* |
1521 | * Mininum time between zone reclaim scans | ||
1522 | */ | ||
1523 | int zone_reclaim_interval __read_mostly = 30*HZ; | ||
1524 | |||
1525 | /* | ||
1526 | * Priority for ZONE_RECLAIM. This determines the fraction of pages | 1521 | * Priority for ZONE_RECLAIM. This determines the fraction of pages |
1527 | * of a node considered for each zone_reclaim. 4 scans 1/16th of | 1522 | * of a node considered for each zone_reclaim. 4 scans 1/16th of |
1528 | * a zone. | 1523 | * a zone. |
@@ -1587,16 +1582,6 @@ static int __zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order) | |||
1587 | 1582 | ||
1588 | p->reclaim_state = NULL; | 1583 | p->reclaim_state = NULL; |
1589 | current->flags &= ~(PF_MEMALLOC | PF_SWAPWRITE); | 1584 | current->flags &= ~(PF_MEMALLOC | PF_SWAPWRITE); |
1590 | |||
1591 | if (nr_reclaimed == 0) { | ||
1592 | /* | ||
1593 | * We were unable to reclaim enough pages to stay on node. We | ||
1594 | * now allow off node accesses for a certain time period before | ||
1595 | * trying again to reclaim pages from the local zone. | ||
1596 | */ | ||
1597 | zone->last_unsuccessful_zone_reclaim = jiffies; | ||
1598 | } | ||
1599 | |||
1600 | return nr_reclaimed >= nr_pages; | 1585 | return nr_reclaimed >= nr_pages; |
1601 | } | 1586 | } |
1602 | 1587 | ||
@@ -1606,13 +1591,17 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order) | |||
1606 | int node_id; | 1591 | int node_id; |
1607 | 1592 | ||
1608 | /* | 1593 | /* |
1609 | * Do not reclaim if there was a recent unsuccessful attempt at zone | 1594 | * Do not reclaim if there are not enough reclaimable pages in this |
1610 | * reclaim. In that case we let allocations go off node for the | 1595 | * zone that would satify this allocations. |
1611 | * zone_reclaim_interval. Otherwise we would scan for each off-node | 1596 | * |
1612 | * page allocation. | 1597 | * All unmapped pagecache pages are reclaimable. |
1598 | * | ||
1599 | * Both counters may be temporarily off a bit so we use | ||
1600 | * SWAP_CLUSTER_MAX as the boundary. It may also be good to | ||
1601 | * leave a few frequently used unmapped pagecache pages around. | ||
1613 | */ | 1602 | */ |
1614 | if (time_before(jiffies, | 1603 | if (zone_page_state(zone, NR_FILE_PAGES) - |
1615 | zone->last_unsuccessful_zone_reclaim + zone_reclaim_interval)) | 1604 | zone_page_state(zone, NR_FILE_MAPPED) < SWAP_CLUSTER_MAX) |
1616 | return 0; | 1605 | return 0; |
1617 | 1606 | ||
1618 | /* | 1607 | /* |