Commit ff321feac22313cf53ffceb69224b09ac19ff22b
Committed by
Linus Torvalds
1 parent
b940fd7035
Exists in
master
and in
4 other branches
mm: rename try_set_zone_oom() to try_set_zonelist_oom()
We have been used naming try_set_zone_oom and clear_zonelist_oom. The role of functions is to lock of zonelist for preventing parallel OOM. So clear_zonelist_oom makes sense but try_set_zone_oome is rather awkward and unmatched with clear_zonelist_oom. Let's change it with try_set_zonelist_oom. Signed-off-by: Minchan Kim <minchan.kim@gmail.com> Acked-by: David Rientjes <rientjes@google.com> Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 3 changed files with 4 additions and 4 deletions Side-by-side Diff
include/linux/oom.h
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 | CONSTRAINT_MEMCG, |
26 | 26 | }; |
27 | 27 | |
28 | -extern int try_set_zone_oom(struct zonelist *zonelist, gfp_t gfp_flags); | |
28 | +extern int try_set_zonelist_oom(struct zonelist *zonelist, gfp_t gfp_flags); | |
29 | 29 | extern void clear_zonelist_oom(struct zonelist *zonelist, gfp_t gfp_flags); |
30 | 30 | |
31 | 31 | extern void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, |
mm/oom_kill.c
... | ... | @@ -549,7 +549,7 @@ |
549 | 549 | * if a parallel OOM killing is already taking place that includes a zone in |
550 | 550 | * the zonelist. Otherwise, locks all zones in the zonelist and returns 1. |
551 | 551 | */ |
552 | -int try_set_zone_oom(struct zonelist *zonelist, gfp_t gfp_mask) | |
552 | +int try_set_zonelist_oom(struct zonelist *zonelist, gfp_t gfp_mask) | |
553 | 553 | { |
554 | 554 | struct zoneref *z; |
555 | 555 | struct zone *zone; |
... | ... | @@ -566,7 +566,7 @@ |
566 | 566 | for_each_zone_zonelist(zone, z, zonelist, gfp_zone(gfp_mask)) { |
567 | 567 | /* |
568 | 568 | * Lock each zone in the zonelist under zone_scan_lock so a |
569 | - * parallel invocation of try_set_zone_oom() doesn't succeed | |
569 | + * parallel invocation of try_set_zonelist_oom() doesn't succeed | |
570 | 570 | * when it shouldn't. |
571 | 571 | */ |
572 | 572 | zone_set_flag(zone, ZONE_OOM_LOCKED); |
mm/page_alloc.c
... | ... | @@ -1738,7 +1738,7 @@ |
1738 | 1738 | struct page *page; |
1739 | 1739 | |
1740 | 1740 | /* Acquire the OOM killer lock for the zones in zonelist */ |
1741 | - if (!try_set_zone_oom(zonelist, gfp_mask)) { | |
1741 | + if (!try_set_zonelist_oom(zonelist, gfp_mask)) { | |
1742 | 1742 | schedule_timeout_uninterruptible(1); |
1743 | 1743 | return NULL; |
1744 | 1744 | } |