Skip to content

Commit

Permalink
mm-oom-introduce-oom-reaper-checkpatch-fixes
Browse files Browse the repository at this point in the history
Cc: Mel Gorman <[email protected]>

WARNING: line over 80 characters
torvalds#124: FILE: mm/memory.c:1107:
+					/* oom_reaper cannot tear down dirty pages */

WARNING: line over 80 characters
torvalds#125: FILE: mm/memory.c:1108:
+					if (unlikely(details && details->ignore_dirty))

WARNING: line over 80 characters
torvalds#245: FILE: mm/oom_kill.c:483:
+		wait_event_freezable(oom_reaper_wait, (mm = READ_ONCE(mm_to_reap)));

WARNING: Missing a blank line after declarations
torvalds#245: FILE: mm/oom_kill.c:483:
+		struct mm_struct *mm;
+		wait_event_freezable(oom_reaper_wait, (mm = READ_ONCE(mm_to_reap)));

WARNING: line over 80 characters
torvalds#301: FILE: mm/oom_kill.c:721:
+			 * We cannot use oom_reaper for the mm shared by this process

WARNING: line over 80 characters
torvalds#302: FILE: mm/oom_kill.c:722:
+			 * because it wouldn't get killed and so the memory might be

total: 0 errors, 6 warnings, 228 lines checked

./patches/mm-oom-introduce-oom-reaper.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Mel Gorman <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Michal Hocko <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
akpm00 authored and sfrothwell committed Jan 5, 2016
1 parent 2ab8d3f commit af3a1d8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 4 additions & 1 deletion mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,10 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb,

if (!PageAnon(page)) {
if (pte_dirty(ptent)) {
/* oom_reaper cannot tear down dirty pages */
/*
* oom_reaper cannot tear down dirty
* pages
*/
if (unlikely(details && details->ignore_dirty))
continue;
force_flush = 1;
Expand Down
10 changes: 6 additions & 4 deletions mm/oom_kill.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,9 @@ static int oom_reaper(void *unused)
{
while (true) {
struct mm_struct *mm;
wait_event_freezable(oom_reaper_wait, (mm = READ_ONCE(mm_to_reap)));

wait_event_freezable(oom_reaper_wait,
(mm = READ_ONCE(mm_to_reap)));
oom_reap_vmas(mm);
WRITE_ONCE(mm_to_reap, NULL);
}
Expand Down Expand Up @@ -720,9 +722,9 @@ void oom_kill_process(struct oom_control *oc, struct task_struct *p,
if (unlikely(p->flags & PF_KTHREAD) ||
p->signal->oom_score_adj == OOM_SCORE_ADJ_MIN) {
/*
* We cannot use oom_reaper for the mm shared by this process
* because it wouldn't get killed and so the memory might be
* still used.
* We cannot use oom_reaper for the mm shared by this
* process because it wouldn't get killed and so the
* memory might be still used.
*/
can_oom_reap = false;
continue;
Expand Down

0 comments on commit af3a1d8

Please sign in to comment.