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: <Ymer0qeaJlRY1Ju6@dhcp22.suse.cz>
Date:   Tue, 26 Apr 2022 10:22:42 +0200
From:   Michal Hocko <mhocko@...e.com>
To:     Yosry Ahmed <yosryahmed@...gle.com>
Cc:     David Rientjes <rientjes@...gle.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Shakeel Butt <shakeelb@...gle.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Roman Gushchin <roman.gushchin@...ux.dev>,
        Tejun Heo <tj@...nel.org>, Zefan Li <lizefan.x@...edance.com>,
        Jonathan Corbet <corbet@....net>,
        Shuah Khan <shuah@...nel.org>, Yu Zhao <yuzhao@...gle.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Wei Xu <weixugc@...gle.com>, Greg Thelen <gthelen@...gle.com>,
        Chen Wandun <chenwandun@...wei.com>,
        Vaibhav Jain <vaibhav@...ux.ibm.com>,
        Michal Koutný <mkoutny@...e.com>,
        Tim Chen <tim.c.chen@...ux.intel.com>, cgroups@...r.kernel.org,
        linux-doc@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux-MM <linux-mm@...ck.org>, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v5 1/4] memcg: introduce per-memcg reclaim interface

On Mon 25-04-22 12:31:51, Yosry Ahmed wrote:
> On Mon, Apr 25, 2022 at 12:15 PM David Rientjes <rientjes@...gle.com> wrote:
[...]
> > "can over or under reclaim from the target cgroup" begs the question of
> > how much more memory the kernel can decide to reclaim :)  I think it's
> > assumed that it's minimal and that matches the current implementation that
> > rounds up to SWAP_CLUSTER_MAX, though, so looks good.
> >
> > Thanks Yosry!
> 
> I think it could be more complex than this. Some functions that get
> called during reclaim only use the nr_to_reclaim parameter to check if
> they need one more iteration, but not to limit the actual reclaimed
> pages per say. For example, nr_to_reclaim is not even passed to
> shrink_slab() or mem_cgroup_soft_limit_reclaim(), so they have no way
> to know that they should stop if nr_to_reclaim was already satisfied.
> I think the general assumption is that each of these calls normally
> does not reclaim a huge number of pages, so like you said, the kernel
> should not over-reclaim too much. However, I don't think there are
> guarantees about this.

There are no guarantees indeed and it si definitely good to be explicit
about that so that userspace tools expect that and consider that in
the imeplementation. Sure we do not want to go overboard and huge excess
should be considered a bug. I am not sure we do agree on the notion of
"huge" so let's see.
-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ