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]
Date:   Fri, 25 Jun 2021 10:05:35 +0200
From:   Michal Hocko <mhocko@...e.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Christoph Hellwig <hch@...radead.org>, akpm@...ux-foundation.org,
        linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, Johannes Weiner <hannes@...xchg.org>,
        Vladimir Davydov <vdavydov.dev@...il.com>,
        cgroups@...r.kernel.org
Subject: Re: [PATCH v2 12/46] mm/memcg: Use the node id in
 mem_cgroup_update_tree()

On Thu 24-06-21 17:19:53, Matthew Wilcox wrote:
> On Wed, Jun 23, 2021 at 10:12:40AM +0200, Christoph Hellwig wrote:
> > On Tue, Jun 22, 2021 at 01:15:17PM +0100, Matthew Wilcox (Oracle) wrote:
> > >  static struct mem_cgroup_per_node *
> > > -mem_cgroup_page_nodeinfo(struct mem_cgroup *memcg, struct page *page)
> > > +mem_cgroup_nodeinfo(struct mem_cgroup *memcg, int nid)
> > >  {
> > > -	int nid = page_to_nid(page);
> > > -
> > >  	return memcg->nodeinfo[nid];
> > >  }
> > 
> > I'd just kill this function entirely and open code it into the only
> > caller
> 
> Done.

This makes sense.

> > > -	mctz = soft_limit_tree_from_page(page);
> > > +	mctz = soft_limit_tree_node(nid);
> > 
> > And while were at it, soft_limit_tree_node seems like a completely
> > pointless helper that does nothing but obsfucating the code.  While
> > you touch this area it might be worth to spin another patch to just
> > remove it as well.

Yeah, the whole soft limit reclaim code is kinda pain to even look at.
Opencoding those two will certainly not make it worse so fine with me.

> I'm scared that if I touch this file too much, people will start to
> think I know something about memcgs.  Happy to add it on; cc'ing
> maintainers.

get_maintainers will surely notice ;)

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ