linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Linux Memory Management List <linux-mm@kvack.org>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Memory cgroup and special hidden inodes
Date: Sat, 6 Jul 2024 17:40:55 +0930	[thread overview]
Message-ID: <603269e5-f3d6-4c42-a2af-6287f5e0ceca@gmx.com> (raw)

Hi,

I'm wondering how memory cgroup handles the special inodes, which are
not exposed to end users and are only utilized by the filesystem itself.

Btrfs has at least 3 usages of such hidden special inodes:

- Btree (metadata) inode
   All metadata are mapped in the page cache of btree inode.
   This is the most critical usage, as btrfs has tons of metadata and
   if mem cgroup is limiting the memory usage of btree inode page cache,
   a lot of thing can go wrong pretty easily.

   And a lot of operation on this inode has no obvious task bound to.
   E.g. a lot of delayed operations happens in workqueue context, I'm not
   sure which cgroup those memory would be charged on.

- Data reloc inode
   This is only utilized by relocation, and is only transient.

- Free space cache inode(s)
   They are already being phased out, and the new free space cache tree
   is fully rely on the btree inode.

So my question is, do these special inodes need to be managed by cgroup
in the first place?

Thanks,
Qu


                 reply	other threads:[~2024-07-06  8:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=603269e5-f3d6-4c42-a2af-6287f5e0ceca@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-mm@kvack.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