diff options
| author | Hugh Dickins <[email protected]> | 2009-09-21 17:02:16 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2009-09-22 07:17:32 -0700 |
| commit | d952b79136a6c32a3f97e0628ca78340f1d5c6f9 (patch) | |
| tree | d46b096fa097c39faa21c89f329d0c84bd700062 /tools/perf/scripts/python | |
| parent | 81464e30609cdbd3d96d8dd6991e7481195a89a1 (diff) | |
ksm: fix endless loop on oom
break_ksm has been looping endlessly ignoring VM_FAULT_OOM: that should
only be a problem for ksmd when a memory control group imposes limits
(normally the OOM killer will kill others with an mm until it succeeds);
but in general (especially for MADV_UNMERGEABLE and KSM_RUN_UNMERGE) we
do need to route the error (or kill) back to the caller (or sighandling).
Test signal_pending in unmerge_ksm_pages, which could be a lengthy
procedure if it has to spill into swap: returning -ERESTARTSYS so that
trivial signals will restart but fatals will terminate (is that right?
we do different things in different places in mm, none exactly this).
unmerge_and_remove_all_rmap_items was forgetting to lock when going
down the mm_list: fix that. Whether it's successful or not, reset
ksm_scan cursor to head; but only if it's successful, reset seqnr
(shown in full_scans) - page counts will have gone down to zero.
This patch leaves a significant OOM deadlock, but it's a good step
on the way, and that deadlock is fixed in a subsequent patch.
Signed-off-by: Hugh Dickins <[email protected]>
Acked-by: Izik Eidus <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions