linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Enrico Weigelt, metux IT consult" <lkml@metux.net>
To: "Michal Koutný" <mkoutny@suse.com>,
	"Philipp Hahn" <pmhahn+lkml@pmhahn.de>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"cgroups@vger.kernel.org" <cgroups@vger.kernel.org>
Subject: Re: Prevent inode/dentry trashing?
Date: Mon, 28 Jun 2021 11:40:39 +0200	[thread overview]
Message-ID: <88451906-e537-0ac3-b8f2-16bfc4d77ea6@metux.net> (raw)
In-Reply-To: <YNX8anv2yCnkVPXy@blackbook>

On 25.06.21 17:55, Michal Koutný wrote:
>> Is it possible to prevent inode/dentry trashing for example by limiting the
>> cache per process(-group)?
> 
> Yes. Unless you have disabled it with CONFIG_MEMCG_KMEM or
> cgroup.memory=nokmem, dentries and inodes are charged to respective
> cgroups. And you can limit overall memory of a cgroup, see
> memory.{max,high} attributes. (You suggest this inode/dentry consumption
> is dominant enough to affect other jobs, so the limit would keep it
> constrained as you intend).

Could you please tell a bit more how this really works ?
(maybe some pointers to the code)

I'm curios what happens if those cache objects are used by different
cgroups - are they accounted to multiple times (once per cgroup) ?
What happens when one cgroup using some cache object reaching its limit,
wile another one does not ?


--mtx

-- 
---
Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert
werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren
GPG/PGP-Schlüssel zu.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

  reply	other threads:[~2021-06-28  9:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07 12:39 Prevent inode/dentry trashing? Philipp Hahn
2021-06-25 15:55 ` Michal Koutný
2021-06-28  9:40   ` Enrico Weigelt, metux IT consult [this message]
2021-06-28 13:30     ` Michal Koutný

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=88451906-e537-0ac3-b8f2-16bfc4d77ea6@metux.net \
    --to=lkml@metux.net \
    --cc=cgroups@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkoutny@suse.com \
    --cc=pmhahn+lkml@pmhahn.de \
    /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;
as well as URLs for NNTP newsgroup(s).