mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roman Gushchin <roman.gushchin@linux.dev>
To: Tejun Heo <tj@kernel.org>
Cc: "Vasily Averin" <vvs@openvz.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Alexander Viro" <viro@zeniv.linux.org.uk>,
	linux-kernel@vger.kernel.org, kernel@openvz.org,
	"Shakeel Butt" <shakeelb@google.com>,
	"Michal Koutný" <mkoutny@suse.com>,
	"Muchun Song" <songmuchun@bytedance.com>,
	"Michal Hocko" <mhocko@suse.com>,
	"Johannes Weiner" <hannes@cmpxchg.org>
Subject: Re: [PATCH 0/3] enable memcg accounting for kernfs objects
Date: Tue, 9 Aug 2022 14:25:05 -0700	[thread overview]
Message-ID: <YvLQsRf7KBezyE+B@P9FQF9L96D.corp.robot.car> (raw)
In-Reply-To: <YvKZ8zYJFhhFvRxO@slm.duckdns.org>

On Tue, Aug 09, 2022 at 07:31:31AM -1000, Tejun Heo wrote:
> (cc'ing Johannes)
> 
> Hello,
> 
> On Sun, Jul 31, 2022 at 06:37:15PM +0300, Vasily Averin wrote:
> > 1) creating a new netdevice allocates ~50Kb of memory, where ~10Kb
> >    was allocated for 80+ kernfs nodes.
> > 
> > 2) cgroupv2 mkdir allocates ~60Kb of memory, ~10Kb of them are kernfs
> >    structures.
> > 
> > 3) Shakeel Butt reports that Google has workloads which create 100s
> >    of subcontainers and they have observed high system overhead
> >    without memcg accounting of kernfs.
> 
> So, I don't have anything against accounting kernfs objects in general but,
> for cgroups, because cgroups are what determines what gets charged where,
> I'm not quite sure whether following the usual "charge it to the allocating
> task's cgroup" is the best way to go about it. I wonder whether it'd be
> better to attach it to the new cgroup's nearest ancestor with memcg enabled.

I also like this approach better, however Michal had some arguments against it.
I don't think there is a huge practical difference, so I'm ok with either
approach.

Thanks!

      parent reply	other threads:[~2022-08-09 21:25 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-31 15:37 Vasily Averin
2022-08-09 17:31 ` Tejun Heo
2022-08-09 17:49   ` Michal Koutný
2022-08-09 17:56     ` Tejun Heo
2022-08-11  3:19       ` Vasily Averin
2022-08-11  4:58         ` [RFC PATCH] kernfs: enable per-inode limits for all xattr types Vasily Averin
2022-08-12 10:20           ` Christian Brauner
2022-08-13  4:16             ` Vasily Averin
2022-08-16  7:47         ` [PATCH 0/3] enable memcg accounting for kernfs objects Vasily Averin
2022-08-17  7:42           ` [RFC PATCH] memcg: adjust memcg for new cgroup allocations Vasily Averin
2022-08-17  9:17             ` Michal Koutný
2022-08-17 15:02               ` Vasily Averin
2022-08-17 16:41               ` Tejun Heo
2022-08-23 12:04                 ` Vasily Averin
2022-08-23 16:22                   ` Tejun Heo
2022-08-18  9:10           ` [RFC PATCH] memcg: adjust memcg used to charge for new simple_xattrs objects Vasily Averin
2022-08-18 12:27             ` Michal Koutný
2022-08-23  8:17               ` Vasily Averin
2022-08-18  9:12           ` [RFC PATCH] simple_xattr: switch from list to rb_tree Vasily Averin
2022-08-18 13:19             ` Christian Brauner
2022-08-23 10:42               ` Vasily Averin
2022-08-09 21:25   ` Roman Gushchin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YvLQsRf7KBezyE+B@P9FQF9L96D.corp.robot.car \
    --to=roman.gushchin@linux.dev \
    --cc=gregkh@linuxfoundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=kernel@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@suse.com \
    --cc=mkoutny@suse.com \
    --cc=shakeelb@google.com \
    --cc=songmuchun@bytedance.com \
    --cc=tj@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=vvs@openvz.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®