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] [day] [month] [year] [list]
Message-ID: <20171115123412.erspvvuqkeuioftt@dhcp22.suse.cz>
Date:   Wed, 15 Nov 2017 13:34:12 +0100
From:   Michal Hocko <mhocko@...nel.org>
To:     Roman Gushchin <guro@...com>
Cc:     linux-mm@...ck.org, Johannes Weiner <hannes@...xchg.org>,
        Vladimir Davydov <vdavydov.dev@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Tejun Heo <tj@...nel.org>,
        Mike Kravetz <mike.kravetz@...cle.com>,
        Dave Hansen <dave.hansen@...el.com>, kernel-team@...com,
        cgroups@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] memcg: hugetlbfs basic usage accounting

On Wed 15-11-17 12:23:14, Roman Gushchin wrote:
> On Wed, Nov 15, 2017 at 12:42:23PM +0100, Michal Hocko wrote:
> > On Wed 15-11-17 11:18:13, Roman Gushchin wrote:
> > > On Wed, Nov 15, 2017 at 09:35:04AM +0100, Michal Hocko wrote:
> > [...]
> > > > So my primary question is, why don't you simply allow hugetlb controller
> > > > rather than tweak stats for memcg? Is there any fundamental reason why
> > > > hugetlb controller is not v2 compatible?
> > > 
> > > I really don't know if the hugetlb controller has enough users to deserve
> > > full support in v2 interface: adding knobs like memory.hugetlb.current,
> > > memory.hugetlb.min, memory.hugetlb.high, memory.hugetlb.max, etc.
> > > 
> > > I'd be rather conservative here and avoid adding a lot to the interface
> > > without clear demand. Also, hugetlb pages are really special, and it's
> > > at least not obvious how, say, memory.high should work for it.
> > 
> > But you clearly want the hugetlb accoutning and that is what hugetlb
> > controller is for. You might not be interested in the limit enforcement
> > but that is not strictly required. So my question remains. Why don't we
> > reuse an existing infrastructure and add a new which might confuse users
> > in an extreme case?
> 
> Hm, but to use a small part of hugetlb controller infrastructure I would
> have to add a whole set of cgroup v2 controls.

And? I mean how does that differ from somebody using memcg only for stat
purposes?

> And control knobs (like memory.hugetlb.current) are much more obligatory
> than an entry in memory.stat, where we have some internal stats as well.
> 
> So, I don't really know why confusion should come from in this case?

Because you stat data that is not controlled by the controller. Just
imagine if somebody wanted to sum counters to get the resulting
accounted and enforced memory.

You are simply trying to push a square through circle without a good
reason. Unless there is a fundamental reason to not enable hugetlb
controller to v2 I would rather go that way rather than to have another
hugetlb weirdness. Enabling the controller should be a matter of
exporting knobs. Trivial thing AFAICS.
-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ