linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Shakeel Butt <shakeelb@google.com>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>,
	Michal Hocko <mhocko@kernel.org>,
	Greg Thelen <gthelen@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs, mm: account filp and names caches to kmemcg
Date: Wed, 11 Oct 2017 00:32:48 +0100	[thread overview]
Message-ID: <20171010233248.GY21978@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20171005222144.123797-1-shakeelb@google.com>

On Thu, Oct 05, 2017 at 03:21:44PM -0700, Shakeel Butt wrote:
> The allocations from filp and names kmem caches can be directly
> triggered by user space applications. A buggy application can
> consume a significant amount of unaccounted system memory. Though
> we have not noticed such buggy applications in our production
> but upon close inspection, we found that a lot of machines spend
> very significant amount of memory on these caches. So, these
> caches should be accounted to kmemcg.

IDGI...  Surely, it's not hard to come up with a syscall that can
allocate a page for the duration of syscall?  Just to pick a random
example: reading from /proc/self/cmdline does that.  So does
readlink of /proc/self/cwd, etc.

What does accounting for such temporary allocations (with fixed
limit per syscall, always freed by the end of syscall) buy you,
why is it needed and what makes it not needed for the examples
above (and a slew of similar ones)?

While we are at it, how much overhead does it add on syscall-heavy
loads?  As in, a whole lot of threads is calling something like
stat("/", &stbuf); in parallel?  Because outside of that kind of
loads it's completely pointless...

      parent reply	other threads:[~2017-10-10 23:32 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-05 22:21 [PATCH] fs, mm: account filp and names caches to kmemcg Shakeel Butt
2017-10-06  7:59 ` Michal Hocko
2017-10-06 19:33   ` Shakeel Butt
2017-10-09  6:24     ` Michal Hocko
2017-10-09 17:52       ` Greg Thelen
2017-10-09 18:04         ` Michal Hocko
2017-10-09 18:17           ` Michal Hocko
2017-10-10  9:10             ` Michal Hocko
2017-10-10 22:21               ` Shakeel Butt
2017-10-11  9:09                 ` Michal Hocko
2017-10-09 20:26         ` Johannes Weiner
2017-10-10  9:14           ` Michal Hocko
2017-10-10 14:17             ` Johannes Weiner
2017-10-10 14:24               ` Michal Hocko
2017-10-12 19:03                 ` Johannes Weiner
2017-10-12 23:57                   ` Greg Thelen
2017-10-13  6:51                     ` Michal Hocko
2017-10-13  6:35                   ` Michal Hocko
2017-10-13  7:00                     ` Michal Hocko
2017-10-13 15:24                       ` Michal Hocko
2017-10-24 12:18                         ` Michal Hocko
2017-10-24 17:54                           ` Johannes Weiner
2017-10-24 16:06                         ` Johannes Weiner
2017-10-24 16:22                           ` Michal Hocko
2017-10-24 17:23                             ` Johannes Weiner
2017-10-24 17:55                               ` Michal Hocko
2017-10-24 18:58                                 ` Johannes Weiner
2017-10-24 20:15                                   ` Michal Hocko
2017-10-25  6:51                                     ` Greg Thelen
2017-10-25  7:15                                       ` Michal Hocko
2017-10-25 13:11                                         ` Johannes Weiner
2017-10-25 14:12                                           ` Michal Hocko
2017-10-25 16:44                                             ` Johannes Weiner
2017-10-25 17:29                                               ` Michal Hocko
2017-10-25 18:11                                                 ` Johannes Weiner
2017-10-25 19:00                                                   ` Michal Hocko
2017-10-25 21:13                                                     ` Johannes Weiner
2017-10-25 22:49                                                       ` Greg Thelen
2017-10-26  7:49                                                         ` Michal Hocko
2017-10-26 12:45                                                           ` Tetsuo Handa
2017-10-26 14:31                                                         ` Johannes Weiner
2017-10-26 19:56                                                           ` Greg Thelen
2017-10-27  8:20                                                             ` Michal Hocko
2017-10-27 20:50                                               ` Shakeel Butt
2017-10-30  8:29                                                 ` Michal Hocko
2017-10-30 19:28                                                   ` Shakeel Butt
2017-10-31  8:00                                                     ` Michal Hocko
2017-10-31 16:49                                                       ` Johannes Weiner
2017-10-31 18:50                                                         ` Michal Hocko
2017-10-24 15:45                     ` Johannes Weiner
2017-10-24 16:30                       ` Michal Hocko
2017-10-10 23:32 ` Al Viro [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=20171010233248.GY21978@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=gthelen@google.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=shakeelb@google.com \
    --cc=vdavydov.dev@gmail.com \
    /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).