vmscan: properly account for the number of page cache pages zone_reclaim() can reclaim
[safe/jmp/linux-2.6] / mm / nommu.c
index 809998a..2fd2ad5 100644 (file)
@@ -66,9 +66,12 @@ struct percpu_counter vm_committed_as;
 int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */
 int sysctl_overcommit_ratio = 50; /* default is 50% */
 int sysctl_max_map_count = DEFAULT_MAX_MAP_COUNT;
-int sysctl_nr_trim_pages = 1; /* page trimming behaviour */
+int sysctl_nr_trim_pages = CONFIG_NOMMU_INITIAL_TRIM_EXCESS;
 int heap_stack_gap = 0;
 
+/* amount of vm to protect from userspace access */
+unsigned long mmap_min_addr = CONFIG_DEFAULT_MMAP_MIN_ADDR;
+
 atomic_long_t mmap_pages_allocated;
 
 EXPORT_SYMBOL(mem_map);
@@ -515,8 +518,6 @@ static void add_nommu_region(struct vm_region *region)
 
        validate_nommu_regions();
 
-       BUG_ON(region->vm_start & ~PAGE_MASK);
-
        parent = NULL;
        p = &nommu_region_tree.rb_node;
        while (*p) {