lkml.org 
[lkml]   [2021]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC PATCH] mm: have kswapd only reclaiming use min protection on memcg
On Wed, Oct 27, 2021 at 4:26 PM Michal Hocko <mhocko@suse.com> wrote:
>
> On Wed 27-10-21 15:46:19, Zhaoyang Huang wrote:
> > On Wed, Oct 27, 2021 at 3:20 PM Michal Hocko <mhocko@suse.com> wrote:
> > >
> > > On Wed 27-10-21 15:01:50, Huangzhaoyang wrote:
> > > > From: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
> > > >
> > > > For the kswapd only reclaiming, there is no chance to try again on
> > > > this group while direct reclaim has. fix it by judging gfp flag.
> > >
> > > There is no problem description (same as in your last submissions. Have
> > > you looked at the patch submission documentation as recommended
> > > previously?).
> > >
> > > Also this patch doesn't make any sense. Both direct reclaim and kswapd
> > > use a gfp mask which contains __GFP_DIRECT_RECLAIM (see balance_pgdat
> > > for the kswapd part)..
> > ok, but how does the reclaiming try with memcg's min protection on the
> > alloc without __GFP_DIRECT_RECLAIM?
>
> I do not follow. There is no need to protect memcg if the allocation
> request doesn't have __GFP_DIRECT_RECLAIM because that would fail the
> charge if a hard limit is reached, see try_charge_memcg and
> gfpflags_allow_blocking check.
>
> Background reclaim, on the other hand never breaches reclaim protection.
>
> What is the actual problem you want to solve?
Imagine there is an allocation with gfp_mask & ~GFP_DIRECT_RECLAIM and
all processes are under cgroups. Kswapd is the only hope here which
however has a low efficiency of get_scan_count. I would like to have
kswapd work as direct reclaim in 2nd round which will have
protection=memory.min.

>
> --
> Michal Hocko
> SUSE Labs

\
 
 \ /
  Last update: 2021-10-27 11:20    [W:0.300 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site