Re: [PATCH 2/2] memcg: Allow guarantee reclaim

Michal Hocko
2014-06-12T13:22:15Z

On Wed 11-06-14 11:36:31, Johannes Weiner wrote:
[...]
> This code is truly dreadful.
>
> Don't call it guarantee when it doesn't guarantee anything. I thought
> we agreed that min, low, high, max, is reasonable nomenclature, please
> use it consistently.

I can certainly change the internal naming. I will use your wmark naming
suggestion.

> With my proposed cleanups and scalability fixes in the other mail, the
> vmscan.c changes to support the min watermark would be something like
> the following.

The semantic is, however, much different as pointed out in the other email.
The following on top of you cleanup will lead to the same deadlock
described in 1st patch (mm, memcg: allow OOM if no memcg is eligible
during direct reclaim).

Anyway, the situation now is pretty chaotic. I plan to gather all the
patchse posted so far and repost for the future discussion. I just need
to finish some internal tasks and will post it soon.

> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 687076b7a1a6..cee19b6d04dc 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -2259,7 +2259,7 @@ static void shrink_zone(struct zone *zone, struct scan_control *sc)
> */
> if (priority < DEF_PRIORITY - 2)
> break;
> -
> + case MEMCG_WMARK_MIN:
> /* XXX: skip the whole subtree */
> memcg = mem_cgroup_iter(root, memcg, &reclaim);
> continue;
>

--
Michal Hocko
SUSE Labs