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: <YNW/Xxv74VlxTm6M@casper.infradead.org>
Date:   Fri, 25 Jun 2021 12:34:55 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Michal Hocko <mhocko@...e.com>
Cc:     Christoph Hellwig <hch@...radead.org>, akpm@...ux-foundation.org,
        linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 14/46] mm/memcg: Add folio_charge_cgroup()

On Fri, Jun 25, 2021 at 10:22:35AM +0200, Michal Hocko wrote:
> On Thu 24-06-21 17:42:58, Matthew Wilcox wrote:
> > On Wed, Jun 23, 2021 at 10:15:20AM +0200, Christoph Hellwig wrote:
> > > On Tue, Jun 22, 2021 at 01:15:19PM +0100, Matthew Wilcox (Oracle) wrote:
> > > > mem_cgroup_charge() already assumed it was being passed a non-tail
> > > > page (and looking at the callers, that's true; it's called for freshly
> > > > allocated pages).  The only real change here is that folio_nr_pages()
> > > > doesn't compile away like thp_nr_pages() does as folio support
> > > > is not conditional on transparent hugepage support.  Reimplement
> > > > mem_cgroup_charge() as a wrapper around folio_charge_cgroup().
> > > 
> > > Maybe rename __mem_cgroup_charge to __folio_charge_cgroup as well?
> > 
> > Oh, yeah, should have done that.  Thanks.
> 
> I would stick with __mem_cgroup_charge here. Not that I would insist but the
> folio nature is quite obvious from the parameter already.
> 
> Btw. memcg_check_events doesn't really need the page argument. A nid
> should be sufficient and your earlier patch is already touching the
> softlimit code so maybe it would be worth changing this page -> folio ->
> page back and forth.

I'm not a huge fan of that 'dummy_page' component of uncharge_gather,
so replacing that with nid makes sense.  I'll juggle these patches a bit
and work that in.  Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ