diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2005-07-13 18:09:23 -0400 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2005-07-13 18:09:23 -0400 |
commit | c514720716c7b109ff980f8b3cb93f9af872c91c (patch) | |
tree | 490a9578995705de69712893a190b67651bddc56 /mm | |
parent | 07929dcb963786512c760dd3ecd148d89295e7e5 (diff) | |
parent | 1e279dd855d15b72364b4103f872d67d8592647e (diff) |
Automatic merge with /usr/src/ntfs-2.6.git.
Diffstat (limited to 'mm')
-rw-r--r-- | mm/filemap_xip.c | 2 | ||||
-rw-r--r-- | mm/mempool.c | 2 | ||||
-rw-r--r-- | mm/oom_kill.c | 10 | ||||
-rw-r--r-- | mm/page_alloc.c | 8 | ||||
-rw-r--r-- | mm/slab.c | 15 |
5 files changed, 19 insertions, 18 deletions
diff --git a/mm/filemap_xip.c b/mm/filemap_xip.c index 3b6e384b98..4553b2c5aa 100644 --- a/mm/filemap_xip.c +++ b/mm/filemap_xip.c | |||
@@ -191,7 +191,7 @@ __xip_unmap (struct address_space * mapping, | |||
191 | address); | 191 | address); |
192 | if (!IS_ERR(pte)) { | 192 | if (!IS_ERR(pte)) { |
193 | /* Nuke the page table entry. */ | 193 | /* Nuke the page table entry. */ |
194 | flush_cache_page(vma, address, pte_pfn(pte)); | 194 | flush_cache_page(vma, address, pte_pfn(*pte)); |
195 | pteval = ptep_clear_flush(vma, address, pte); | 195 | pteval = ptep_clear_flush(vma, address, pte); |
196 | BUG_ON(pte_dirty(pteval)); | 196 | BUG_ON(pte_dirty(pteval)); |
197 | pte_unmap(pte); | 197 | pte_unmap(pte); |
diff --git a/mm/mempool.c b/mm/mempool.c index 9a72f7d918..65f2957b8d 100644 --- a/mm/mempool.c +++ b/mm/mempool.c | |||
@@ -205,7 +205,7 @@ void * mempool_alloc(mempool_t *pool, unsigned int __nocast gfp_mask) | |||
205 | void *element; | 205 | void *element; |
206 | unsigned long flags; | 206 | unsigned long flags; |
207 | wait_queue_t wait; | 207 | wait_queue_t wait; |
208 | int gfp_temp; | 208 | unsigned int gfp_temp; |
209 | 209 | ||
210 | might_sleep_if(gfp_mask & __GFP_WAIT); | 210 | might_sleep_if(gfp_mask & __GFP_WAIT); |
211 | 211 | ||
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 59666d905f..1e56076672 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c | |||
@@ -253,14 +253,16 @@ static struct mm_struct *oom_kill_process(struct task_struct *p) | |||
253 | * OR try to be smart about which process to kill. Note that we | 253 | * OR try to be smart about which process to kill. Note that we |
254 | * don't have to be perfect here, we just have to be good. | 254 | * don't have to be perfect here, we just have to be good. |
255 | */ | 255 | */ |
256 | void out_of_memory(unsigned int __nocast gfp_mask) | 256 | void out_of_memory(unsigned int __nocast gfp_mask, int order) |
257 | { | 257 | { |
258 | struct mm_struct *mm = NULL; | 258 | struct mm_struct *mm = NULL; |
259 | task_t * p; | 259 | task_t * p; |
260 | 260 | ||
261 | printk("oom-killer: gfp_mask=0x%x\n", gfp_mask); | 261 | if (printk_ratelimit()) { |
262 | /* print memory stats */ | 262 | printk("oom-killer: gfp_mask=0x%x, order=%d\n", |
263 | show_mem(); | 263 | gfp_mask, order); |
264 | show_mem(); | ||
265 | } | ||
264 | 266 | ||
265 | read_lock(&tasklist_lock); | 267 | read_lock(&tasklist_lock); |
266 | retry: | 268 | retry: |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 3c9f7f8811..1d6ba6a4b5 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -897,12 +897,6 @@ rebalance: | |||
897 | cond_resched(); | 897 | cond_resched(); |
898 | 898 | ||
899 | if (likely(did_some_progress)) { | 899 | if (likely(did_some_progress)) { |
900 | /* | ||
901 | * Go through the zonelist yet one more time, keep | ||
902 | * very high watermark here, this is only to catch | ||
903 | * a parallel oom killing, we must fail if we're still | ||
904 | * under heavy pressure. | ||
905 | */ | ||
906 | for (i = 0; (z = zones[i]) != NULL; i++) { | 900 | for (i = 0; (z = zones[i]) != NULL; i++) { |
907 | if (!zone_watermark_ok(z, order, z->pages_min, | 901 | if (!zone_watermark_ok(z, order, z->pages_min, |
908 | classzone_idx, can_try_harder, | 902 | classzone_idx, can_try_harder, |
@@ -936,7 +930,7 @@ rebalance: | |||
936 | goto got_pg; | 930 | goto got_pg; |
937 | } | 931 | } |
938 | 932 | ||
939 | out_of_memory(gfp_mask); | 933 | out_of_memory(gfp_mask, order); |
940 | goto restart; | 934 | goto restart; |
941 | } | 935 | } |
942 | 936 | ||
@@ -584,7 +584,8 @@ static inline struct array_cache *ac_data(kmem_cache_t *cachep) | |||
584 | return cachep->array[smp_processor_id()]; | 584 | return cachep->array[smp_processor_id()]; |
585 | } | 585 | } |
586 | 586 | ||
587 | static inline kmem_cache_t *__find_general_cachep(size_t size, int gfpflags) | 587 | static inline kmem_cache_t *__find_general_cachep(size_t size, |
588 | unsigned int __nocast gfpflags) | ||
588 | { | 589 | { |
589 | struct cache_sizes *csizep = malloc_sizes; | 590 | struct cache_sizes *csizep = malloc_sizes; |
590 | 591 | ||
@@ -608,7 +609,8 @@ static inline kmem_cache_t *__find_general_cachep(size_t size, int gfpflags) | |||
608 | return csizep->cs_cachep; | 609 | return csizep->cs_cachep; |
609 | } | 610 | } |
610 | 611 | ||
611 | kmem_cache_t *kmem_find_general_cachep(size_t size, int gfpflags) | 612 | kmem_cache_t *kmem_find_general_cachep(size_t size, |
613 | unsigned int __nocast gfpflags) | ||
612 | { | 614 | { |
613 | return __find_general_cachep(size, gfpflags); | 615 | return __find_general_cachep(size, gfpflags); |
614 | } | 616 | } |
@@ -2100,7 +2102,7 @@ cache_alloc_debugcheck_before(kmem_cache_t *cachep, unsigned int __nocast flags) | |||
2100 | #if DEBUG | 2102 | #if DEBUG |
2101 | static void * | 2103 | static void * |
2102 | cache_alloc_debugcheck_after(kmem_cache_t *cachep, | 2104 | cache_alloc_debugcheck_after(kmem_cache_t *cachep, |
2103 | unsigned long flags, void *objp, void *caller) | 2105 | unsigned int __nocast flags, void *objp, void *caller) |
2104 | { | 2106 | { |
2105 | if (!objp) | 2107 | if (!objp) |
2106 | return objp; | 2108 | return objp; |
@@ -2372,6 +2374,9 @@ void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int nodeid) | |||
2372 | struct slab *slabp; | 2374 | struct slab *slabp; |
2373 | kmem_bufctl_t next; | 2375 | kmem_bufctl_t next; |
2374 | 2376 | ||
2377 | if (nodeid == -1) | ||
2378 | return kmem_cache_alloc(cachep, flags); | ||
2379 | |||
2375 | for (loop = 0;;loop++) { | 2380 | for (loop = 0;;loop++) { |
2376 | struct list_head *q; | 2381 | struct list_head *q; |
2377 | 2382 | ||
@@ -2439,7 +2444,7 @@ got_slabp: | |||
2439 | } | 2444 | } |
2440 | EXPORT_SYMBOL(kmem_cache_alloc_node); | 2445 | EXPORT_SYMBOL(kmem_cache_alloc_node); |
2441 | 2446 | ||
2442 | void *kmalloc_node(size_t size, int flags, int node) | 2447 | void *kmalloc_node(size_t size, unsigned int __nocast flags, int node) |
2443 | { | 2448 | { |
2444 | kmem_cache_t *cachep; | 2449 | kmem_cache_t *cachep; |
2445 | 2450 | ||
@@ -3091,7 +3096,7 @@ unsigned int ksize(const void *objp) | |||
3091 | * @s: the string to duplicate | 3096 | * @s: the string to duplicate |
3092 | * @gfp: the GFP mask used in the kmalloc() call when allocating memory | 3097 | * @gfp: the GFP mask used in the kmalloc() call when allocating memory |
3093 | */ | 3098 | */ |
3094 | char *kstrdup(const char *s, int gfp) | 3099 | char *kstrdup(const char *s, unsigned int __nocast gfp) |
3095 | { | 3100 | { |
3096 | size_t len; | 3101 | size_t len; |
3097 | char *buf; | 3102 | char *buf; |