lkml.org 
[lkml]   [2019]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC] mm/memcontrol: reclaim severe usage over high limit in get_user_pages loop
On Tue 06-08-19 10:19:49, Konstantin Khlebnikov wrote:
> On 8/6/19 10:07 AM, Michal Hocko wrote:
> > On Fri 02-08-19 13:44:38, Michal Hocko wrote:
> > [...]
> > > > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> > > > > index ba9138a4a1de..53a35c526e43 100644
> > > > > --- a/mm/memcontrol.c
> > > > > +++ b/mm/memcontrol.c
> > > > > @@ -2429,8 +2429,12 @@ 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_high(memcg, nr_pages, GFP_KERNEL);
> > >
> > > ups, this should be s@GFP_KERNEL@gfp_mask@
> > >
> > > > > + } else {
> > > > > + current->memcg_nr_pages_over_high += batch;
> > > > > + set_notify_resume(current);
> > > > > + }
> > > > > break;
> > > > > }
> > > > > } while ((memcg = parent_mem_cgroup(memcg)));
> > > > >
> >
> > Should I send an official patch for this?
> >
>
> I prefer to keep it as is while we have no better solution.

Fine with me.

--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2019-08-06 09:36    [W:1.558 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site