[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200507174949.GN6345@dhcp22.suse.cz>
Date: Thu, 7 May 2020 19:49:49 +0200
From: Michal Hocko <mhocko@...nel.org>
To: Shakeel Butt <shakeelb@...gle.com>
Cc: Johannes Weiner <hannes@...xchg.org>, Roman Gushchin <guro@...com>,
Greg Thelen <gthelen@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux MM <linux-mm@...ck.org>,
Cgroups <cgroups@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] memcg: effective memory.high reclaim for remote charging
On Thu 07-05-20 10:00:07, Shakeel Butt wrote:
> On Thu, May 7, 2020 at 9:47 AM Michal Hocko <mhocko@...nel.org> wrote:
> >
> > On Thu 07-05-20 09:33:01, Shakeel Butt wrote:
> > [...]
> > > @@ -2600,8 +2596,23 @@ static int try_charge(struct mem_cgroup *memcg, gfp_t gfp_mask,
> > > schedule_work(&memcg->high_work);
> > > break;
> > > }
> > > - current->memcg_nr_pages_over_high += batch;
> > > - set_notify_resume(current);
> > > +
> > > + if (gfpflags_allow_blocking(gfp_mask))
> > > + reclaim_over_high(memcg, gfp_mask, batch);
> > > +
> > > + if (page_counter_read(&memcg->memory) <=
> > > + READ_ONCE(memcg->high))
> > > + break;
> >
> > I am half way to a long weekend so bear with me. Shouldn't this be continue? The
> > parent memcg might be still in excess even the child got reclaimed,
> > right?
> >
>
> The reclaim_high() actually already does this walk up to the root and
> reclaim from ones who are still over their high limit. Though having
> 'continue' here is correct too.
Ohh, right. As I've said weekend brain. I will have a proper look next
week. This just hit my eyes.
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists