Skip to content

Commit 9077546

Browse files
akpm00sfrothwell
authored andcommitted
mm-oom-introduce-oom-reaper-checkpatch-fixes
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]>
1 parent 6849c05 commit 9077546

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

mm/memory.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,10 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb,
11051105

11061106
if (!PageAnon(page)) {
11071107
if (pte_dirty(ptent)) {
1108-
/* oom_reaper cannot tear down dirty pages */
1108+
/*
1109+
* oom_reaper cannot tear down dirty
1110+
* pages
1111+
*/
11091112
if (unlikely(details && details->ignore_dirty))
11101113
continue;
11111114
force_flush = 1;

mm/oom_kill.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,9 @@ static int oom_reaper(void *unused)
482482
{
483483
while (true) {
484484
struct mm_struct *mm;
485-
wait_event_freezable(oom_reaper_wait, (mm = READ_ONCE(mm_to_reap)));
485+
486+
wait_event_freezable(oom_reaper_wait,
487+
(mm = READ_ONCE(mm_to_reap)));
486488
oom_reap_vmas(mm);
487489
WRITE_ONCE(mm_to_reap, NULL);
488490
}
@@ -720,9 +722,9 @@ void oom_kill_process(struct oom_control *oc, struct task_struct *p,
720722
if (unlikely(p->flags & PF_KTHREAD) ||
721723
p->signal->oom_score_adj == OOM_SCORE_ADJ_MIN) {
722724
/*
723-
* We cannot use oom_reaper for the mm shared by this process
724-
* because it wouldn't get killed and so the memory might be
725-
* still used.
725+
* We cannot use oom_reaper for the mm shared by this
726+
* process because it wouldn't get killed and so the
727+
* memory might be still used.
726728
*/
727729
can_oom_reap = false;
728730
continue;

0 commit comments

Comments
 (0)