diff options
author | Kirill A. Shutemov <[email protected]> | 2014-02-25 15:01:42 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2014-02-25 15:25:44 -0800 |
commit | 9845cbbd113fbb5b769a45d8e88dc47bc12df4e0 (patch) | |
tree | 6ceaa19094138fe27cc6be0009dea1ef770c762b /tools/perf/util/trace-event-scripting.c | |
parent | 01412886b735ef241f9a41adf9f707ce1522eb61 (diff) |
mm, thp: fix infinite loop on memcg OOM
Masayoshi Mizuma reported a bug with the hang of an application under
the memcg limit. It happens on write-protection fault to huge zero page
If we successfully allocate a huge page to replace zero page but hit the
memcg limit we need to split the zero page with split_huge_page_pmd()
and fallback to small pages.
The other part of the problem is that VM_FAULT_OOM has special meaning
in do_huge_pmd_wp_page() context. __handle_mm_fault() expects the page
to be split if it sees VM_FAULT_OOM and it will will retry page fault
handling. This causes an infinite loop if the page was not split.
do_huge_pmd_wp_zero_page_fallback() can return VM_FAULT_OOM if it failed
to allocate one small page, so fallback to small pages will not help.
The solution for this part is to replace VM_FAULT_OOM with
VM_FAULT_FALLBACK is fallback required.
Signed-off-by: Kirill A. Shutemov <[email protected]>
Reported-by: Masayoshi Mizuma <[email protected]>
Reviewed-by: Michal Hocko <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions