Skip to content

Commit 5fd3dc2

Browse files
akpm00sfrothwell
authored andcommitted
mm-oom-rework-oom-detection-checkpatch-fixes
Cc: David Rientjes <[email protected]> WARNING: line over 80 characters torvalds#99: FILE: mm/page_alloc.c:2965: + * zone list (with a backoff mechanism which is a function of no_progress_loops). WARNING: line over 80 characters torvalds#129: FILE: mm/page_alloc.c:2995: + * Keep reclaiming pages while there is a chance this will lead somewhere. WARNING: line over 80 characters torvalds#134: FILE: mm/page_alloc.c:3000: + for_each_zone_zonelist_nodemask(zone, z, ac->zonelist, ac->high_zoneidx, ac->nodemask) { WARNING: line over 80 characters torvalds#138: FILE: mm/page_alloc.c:3004: + available -= DIV_ROUND_UP(no_progress_loops * available, MAX_RECLAIM_RETRIES); WARNING: line over 80 characters torvalds#142: FILE: mm/page_alloc.c:3008: + * Would the allocation succeed if we reclaimed the whole available? WARNING: line over 80 characters torvalds#146: FILE: mm/page_alloc.c:3012: + /* Wait for some write requests to complete then retry */ total: 0 errors, 6 warnings, 202 lines checked ./patches/mm-oom-rework-oom-detection.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: David Rientjes <[email protected]> Cc: Hillf Danton <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Tetsuo Handa <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 8e510a7 commit 5fd3dc2

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

mm/page_alloc.c

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3100,7 +3100,8 @@ static inline bool is_thp_gfp_mask(gfp_t gfp_mask)
31003100
* the last reclaim round), pages_reclaimed (cumulative number of reclaimed
31013101
* pages) and no_progress_loops (number of reclaim rounds without any progress
31023102
* in a row) is considered as well as the reclaimable pages on the applicable
3103-
* zone list (with a backoff mechanism which is a function of no_progress_loops).
3103+
* zone list (with a backoff mechanism which is a function of
3104+
* no_progress_loops).
31043105
*
31053106
* Returns true if a retry is viable or false to enter the oom path.
31063107
*/
@@ -3130,24 +3131,27 @@ should_reclaim_retry(gfp_t gfp_mask, unsigned order,
31303131
}
31313132

31323133
/*
3133-
* Keep reclaiming pages while there is a chance this will lead somewhere.
3134-
* If none of the target zones can satisfy our allocation request even
3135-
* if all reclaimable pages are considered then we are screwed and have
3136-
* to go OOM.
3134+
* Keep reclaiming pages while there is a chance this will lead
3135+
* somewhere. If none of the target zones can satisfy our allocation
3136+
* request even if all reclaimable pages are considered then we are
3137+
* screwed and have to go OOM.
31373138
*/
3138-
for_each_zone_zonelist_nodemask(zone, z, ac->zonelist, ac->high_zoneidx, ac->nodemask) {
3139+
for_each_zone_zonelist_nodemask(zone, z, ac->zonelist,
3140+
ac->high_zoneidx, ac->nodemask) {
31393141
unsigned long available;
31403142

31413143
available = zone_reclaimable_pages(zone);
3142-
available -= DIV_ROUND_UP(no_progress_loops * available, MAX_RECLAIM_RETRIES);
3144+
available -= DIV_ROUND_UP(no_progress_loops * available,
3145+
MAX_RECLAIM_RETRIES);
31433146
available += zone_page_state_snapshot(zone, NR_FREE_PAGES);
31443147

31453148
/*
3146-
* Would the allocation succeed if we reclaimed the whole available?
3149+
* Would the allocation succeed if we reclaimed the whole
3150+
* available?
31473151
*/
31483152
if (__zone_watermark_ok(zone, order, min_wmark_pages(zone),
31493153
ac->high_zoneidx, alloc_flags, available)) {
3150-
/* Wait for some write requests to complete then retry */
3154+
/* Wait for some writes to complete then retry */
31513155
wait_iff_congested(zone, BLK_RW_ASYNC, HZ/50);
31523156
return true;
31533157
}

0 commit comments

Comments
 (0)