diff options
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 70461f3e3378..1b373096b990 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -2160,11 +2160,11 @@ static struct { | |||
2160 | struct fault_attr attr; | 2160 | struct fault_attr attr; |
2161 | 2161 | ||
2162 | bool ignore_gfp_highmem; | 2162 | bool ignore_gfp_highmem; |
2163 | bool ignore_gfp_wait; | 2163 | bool ignore_gfp_reclaim; |
2164 | u32 min_order; | 2164 | u32 min_order; |
2165 | } fail_page_alloc = { | 2165 | } fail_page_alloc = { |
2166 | .attr = FAULT_ATTR_INITIALIZER, | 2166 | .attr = FAULT_ATTR_INITIALIZER, |
2167 | .ignore_gfp_wait = true, | 2167 | .ignore_gfp_reclaim = true, |
2168 | .ignore_gfp_highmem = true, | 2168 | .ignore_gfp_highmem = true, |
2169 | .min_order = 1, | 2169 | .min_order = 1, |
2170 | }; | 2170 | }; |
@@ -2183,7 +2183,8 @@ static bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order) | |||
2183 | return false; | 2183 | return false; |
2184 | if (fail_page_alloc.ignore_gfp_highmem && (gfp_mask & __GFP_HIGHMEM)) | 2184 | if (fail_page_alloc.ignore_gfp_highmem && (gfp_mask & __GFP_HIGHMEM)) |
2185 | return false; | 2185 | return false; |
2186 | if (fail_page_alloc.ignore_gfp_wait && (gfp_mask & __GFP_DIRECT_RECLAIM)) | 2186 | if (fail_page_alloc.ignore_gfp_reclaim && |
2187 | (gfp_mask & __GFP_DIRECT_RECLAIM)) | ||
2187 | return false; | 2188 | return false; |
2188 | 2189 | ||
2189 | return should_fail(&fail_page_alloc.attr, 1 << order); | 2190 | return should_fail(&fail_page_alloc.attr, 1 << order); |
@@ -2202,7 +2203,7 @@ static int __init fail_page_alloc_debugfs(void) | |||
2202 | return PTR_ERR(dir); | 2203 | return PTR_ERR(dir); |
2203 | 2204 | ||
2204 | if (!debugfs_create_bool("ignore-gfp-wait", mode, dir, | 2205 | if (!debugfs_create_bool("ignore-gfp-wait", mode, dir, |
2205 | &fail_page_alloc.ignore_gfp_wait)) | 2206 | &fail_page_alloc.ignore_gfp_reclaim)) |
2206 | goto fail; | 2207 | goto fail; |
2207 | if (!debugfs_create_bool("ignore-gfp-highmem", mode, dir, | 2208 | if (!debugfs_create_bool("ignore-gfp-highmem", mode, dir, |
2208 | &fail_page_alloc.ignore_gfp_highmem)) | 2209 | &fail_page_alloc.ignore_gfp_highmem)) |