diff options
Diffstat (limited to 'mm/page_alloc.c')
| -rw-r--r-- | mm/page_alloc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index af65c4eedc79..d20f8c3139bb 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
| @@ -55,6 +55,7 @@ | |||
| 55 | #include <linux/kmemleak.h> | 55 | #include <linux/kmemleak.h> |
| 56 | #include <linux/compaction.h> | 56 | #include <linux/compaction.h> |
| 57 | #include <trace/events/kmem.h> | 57 | #include <trace/events/kmem.h> |
| 58 | #include <trace/events/oom.h> | ||
| 58 | #include <linux/prefetch.h> | 59 | #include <linux/prefetch.h> |
| 59 | #include <linux/mm_inline.h> | 60 | #include <linux/mm_inline.h> |
| 60 | #include <linux/migrate.h> | 61 | #include <linux/migrate.h> |
| @@ -3468,6 +3469,8 @@ should_reclaim_retry(gfp_t gfp_mask, unsigned order, | |||
| 3468 | ac->nodemask) { | 3469 | ac->nodemask) { |
| 3469 | unsigned long available; | 3470 | unsigned long available; |
| 3470 | unsigned long reclaimable; | 3471 | unsigned long reclaimable; |
| 3472 | unsigned long min_wmark = min_wmark_pages(zone); | ||
| 3473 | bool wmark; | ||
| 3471 | 3474 | ||
| 3472 | available = reclaimable = zone_reclaimable_pages(zone); | 3475 | available = reclaimable = zone_reclaimable_pages(zone); |
| 3473 | available -= DIV_ROUND_UP((*no_progress_loops) * available, | 3476 | available -= DIV_ROUND_UP((*no_progress_loops) * available, |
| @@ -3478,8 +3481,11 @@ should_reclaim_retry(gfp_t gfp_mask, unsigned order, | |||
| 3478 | * Would the allocation succeed if we reclaimed the whole | 3481 | * Would the allocation succeed if we reclaimed the whole |
| 3479 | * available? | 3482 | * available? |
| 3480 | */ | 3483 | */ |
| 3481 | if (__zone_watermark_ok(zone, order, min_wmark_pages(zone), | 3484 | wmark = __zone_watermark_ok(zone, order, min_wmark, |
| 3482 | ac_classzone_idx(ac), alloc_flags, available)) { | 3485 | ac_classzone_idx(ac), alloc_flags, available); |
| 3486 | trace_reclaim_retry_zone(z, order, reclaimable, | ||
| 3487 | available, min_wmark, *no_progress_loops, wmark); | ||
| 3488 | if (wmark) { | ||
| 3483 | /* | 3489 | /* |
| 3484 | * If we didn't make any progress and have a lot of | 3490 | * If we didn't make any progress and have a lot of |
| 3485 | * dirty + writeback pages then we should wait for | 3491 | * dirty + writeback pages then we should wait for |
