aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/memcontrol.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 79abb1fd39d2..50eb50e100fd 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1837,8 +1837,15 @@ static int __mem_cgroup_do_charge(struct mem_cgroup *mem, gfp_t gfp_mask,
1837 flags |= MEM_CGROUP_RECLAIM_NOSWAP; 1837 flags |= MEM_CGROUP_RECLAIM_NOSWAP;
1838 } else 1838 } else
1839 mem_over_limit = mem_cgroup_from_res_counter(fail_res, res); 1839 mem_over_limit = mem_cgroup_from_res_counter(fail_res, res);
1840 1840 /*
1841 if (csize > PAGE_SIZE) /* change csize and retry */ 1841 * csize can be either a huge page (HPAGE_SIZE), a batch of
1842 * regular pages (CHARGE_SIZE), or a single regular page
1843 * (PAGE_SIZE).
1844 *
1845 * Never reclaim on behalf of optional batching, retry with a
1846 * single page instead.
1847 */
1848 if (csize == CHARGE_SIZE)
1842 return CHARGE_RETRY; 1849 return CHARGE_RETRY;
1843 1850
1844 if (!(gfp_mask & __GFP_WAIT)) 1851 if (!(gfp_mask & __GFP_WAIT))