lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YXkNJjD4axYlmqQ5@dhcp22.suse.cz>
Date:   Wed, 27 Oct 2021 10:26:14 +0200
From:   Michal Hocko <mhocko@...e.com>
To:     Zhaoyang Huang <huangzhaoyang@...il.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Johannes Weiner <hannes@...xchg.org>,
        Vladimir Davydov <vdavydov.dev@...il.com>,
        Zhaoyang Huang <zhaoyang.huang@...soc.com>,
        "open list:MEMORY MANAGEMENT" <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH] mm: have kswapd only reclaiming use min protection
 on memcg

On Wed 27-10-21 15:46:19, Zhaoyang Huang wrote:
> On Wed, Oct 27, 2021 at 3:20 PM Michal Hocko <mhocko@...e.com> wrote:
> >
> > On Wed 27-10-21 15:01:50, Huangzhaoyang wrote:
> > > From: Zhaoyang Huang <zhaoyang.huang@...soc.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?

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ