Re: [PATCH] mm: Add missed mem_cgroup_iter_break() into shrink_node_memcgs()

From: Vasily Averin
Date: Tue Feb 11 2020 - 06:46:32 EST


On 2/11/20 2:38 PM, Kirill Tkhai wrote:
> Leaving mem_cgroup_iter() loop requires mem_cgroup_iter_break().
>
> Fixes: bf8d5d52ffe8 "memcg: introduce memory.min"
> Signed-off-by: Kirill Tkhai <ktkhai@xxxxxxxxxxxxx>
> ---
> mm/vmscan.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index b1863de475fb..f6efe2348ba3 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -2653,8 +2653,9 @@ static void shrink_node_memcgs(pg_data_t *pgdat, struct scan_control *sc)
> continue;
> }
> memcg_memory_event(memcg, MEMCG_LOW);
> - break;

It is not cycle break, it is switch/case break.

> + /* fallthrough */
> case MEMCG_PROT_NONE:
> + mem_cgroup_iter_break(target_memcg, memcg);
> /*
> * All protection thresholds breached. We may
> * still choose to vary the scan pressure
>
>