mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
include/linux/nodemask.h: create next_node_in() helper
Lots of code does node = next_node(node, XXX); if (node == MAX_NUMNODES) node = first_node(XXX); so create next_node_in() to do this and use it in various places. [[email protected]: use next_node_in() helper] Acked-by: Vlastimil Babka <[email protected]> Acked-by: Michal Hocko <[email protected]> Signed-off-by: Michal Hocko <[email protected]> Cc: Xishi Qiu <[email protected]> Cc: Joonsoo Kim <[email protected]> Cc: David Rientjes <[email protected]> Cc: Naoya Horiguchi <[email protected]> Cc: Laura Abbott <[email protected]> Cc: Hui Zhu <[email protected]> Cc: Wang Xiaoqiang <[email protected]> Cc: Johannes Weiner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
48a270554a
commit
0edaf86cf1
11 changed files with 54 additions and 59 deletions
|
|
@ -1389,9 +1389,7 @@ int mem_cgroup_select_victim_node(struct mem_cgroup *memcg)
|
|||
mem_cgroup_may_update_nodemask(memcg);
|
||||
node = memcg->last_scanned_node;
|
||||
|
||||
node = next_node(node, memcg->scan_nodes);
|
||||
if (node == MAX_NUMNODES)
|
||||
node = first_node(memcg->scan_nodes);
|
||||
node = next_node_in(node, memcg->scan_nodes);
|
||||
/*
|
||||
* We call this when we hit limit, not when pages are added to LRU.
|
||||
* No LRU may hold pages because all pages are UNEVICTABLE or
|
||||
|
|
|
|||
Loading…
Reference in a new issue