From: Shakeel Butt <shakeelb@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Hocko <mhocko@kernel.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Vladimir Davydov <vdavydov.dev@gmail.com>,
Jan Kara <jack@suse.com>, Greg Thelen <gthelen@google.com>,
linux-kernel@vger.kernel.org, cgroups@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
Shakeel Butt <shakeelb@google.com>
Subject: [PATCH v6 0/3] Directed kmem charging
Date: Mon, 18 Jun 2018 22:13:24 -0700 [thread overview]
Message-ID: <20180619051327.149716-1-shakeelb@google.com> (raw)
This patchset introduces memcg variant memory allocation functions. The
caller can explicitly pass the memcg to charge for kmem allocations.
Currently the kernel, for __GFP_ACCOUNT memory allocation requests,
extract the memcg of the current task to charge for the kmem allocation.
This patch series introduces kmem allocation functions where the caller
can pass the pointer to the remote memcg. The remote memcg will be
charged for the allocation instead of the memcg of the caller. However
the caller must have a reference to the remote memcg. This patch series
also introduces scope API for targeted memcg charging. So, all the
__GFP_ACCOUNT alloctions within the specified scope will be charged to
the given target memcg.
Shakeel Butt (3):
mm: memcg: remote memcg charging for kmem allocations
fs: fsnotify: account fsnotify metadata to kmemcg
fs, mm: account buffer_head to kmemcg
fs/buffer.c | 14 ++++-
fs/notify/dnotify/dnotify.c | 5 +-
fs/notify/fanotify/fanotify.c | 6 +-
fs/notify/fanotify/fanotify_user.c | 5 +-
fs/notify/group.c | 6 ++
fs/notify/inotify/inotify_fsnotify.c | 2 +-
fs/notify/inotify/inotify_user.c | 5 +-
include/linux/fsnotify_backend.h | 12 ++--
include/linux/memcontrol.h | 14 +++++
include/linux/sched.h | 3 +
include/linux/sched/mm.h | 24 ++++++++
include/linux/slab.h | 83 ++++++++++++++++++++++++++++
kernel/fork.c | 3 +
mm/memcontrol.c | 54 ++++++++++++++++--
14 files changed, 220 insertions(+), 16 deletions(-)
--
2.18.0.rc1.244.gcf134e6275-goog
next reply other threads:[~2018-06-19 5:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-19 5:13 Shakeel Butt [this message]
2018-06-19 5:13 ` [PATCH 1/3] mm: memcg: remote memcg charging for kmem allocations Shakeel Butt
2018-06-19 16:24 ` Johannes Weiner
2018-06-19 23:31 ` Shakeel Butt
2018-06-20 15:22 ` Johannes Weiner
2018-06-19 5:13 ` [PATCH 2/3] fs: fsnotify: account fsnotify metadata to kmemcg Shakeel Butt
2018-06-19 7:20 ` Amir Goldstein
2018-06-19 14:15 ` Shakeel Butt
2018-06-19 5:13 ` [PATCH 3/3] fs, mm: account buffer_head " Shakeel Butt
2018-06-19 16:27 ` Johannes Weiner
2018-06-19 17:40 ` Roman Gushchin
2018-06-19 19:51 ` Shakeel Butt
2018-06-19 19:55 ` Roman Gushchin
2018-06-22 23:33 ` Shakeel Butt
2018-06-19 16:11 ` [PATCH v6 0/3] Directed kmem charging Johannes Weiner
2018-06-19 22:58 ` Shakeel Butt
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=20180619051327.149716-1-shakeelb@google.com \
--to=shakeelb@google.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=gthelen@google.com \
--cc=hannes@cmpxchg.org \
--cc=jack@suse.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--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).