diff options
author | Johannes Weiner <[email protected]> | 2011-02-01 15:52:43 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2011-02-02 16:03:19 -0800 |
commit | 19942822df65ee4a47c2e6d6d70cace1b7f01710 (patch) | |
tree | 1fe6fdcc92ae7e64014c04676fc91e0105bdf344 /net/lapb/lapb_iface.c | |
parent | 9221edb7120e2dc3ae90f1c58514979f7ba40e46 (diff) |
memcg: prevent endless loop when charging huge pages to near-limit group
If reclaim after a failed charging was unsuccessful, the limits are
checked again, just in case they settled by means of other tasks.
This is all fine as long as every charge is of size PAGE_SIZE, because in
that case, being below the limit means having at least PAGE_SIZE bytes
available.
But with transparent huge pages, we may end up in an endless loop where
charging and reclaim fail, but we keep going because the limits are not
yet exceeded, although not allowing for a huge page.
Fix this up by explicitely checking for enough room, not just whether we
are within limits.
Signed-off-by: Johannes Weiner <[email protected]>
Acked-by: KAMEZAWA Hiroyuki <[email protected]>
Reviewed-by: Minchan Kim <[email protected]>
Cc: Balbir Singh <[email protected]>
Cc: Daisuke Nishimura <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'net/lapb/lapb_iface.c')
0 files changed, 0 insertions, 0 deletions